:root {
  font-family: Tahoma, 'Noto Sans Thai', system-ui, sans-serif;
  color: #21384a;
  background: #f5f4ef;
  font-synthesis: none;
  --navy: #132b42;
  --muted: #6b7882;
  --teal: #176e65;
  --line: #dde3e1;
  --warm: #eeeadd;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  outline-offset: 4px;
}
button {
  border: 0;
  border-radius: 8px;
  padding: 11px 17px;
  background: var(--teal);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.5;
}
button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button.secondary {
  background: #edf2f0;
  color: #28443d;
}
button.quiet {
  background: transparent;
  color: var(--teal);
  padding: 7px 0;
}
button.danger {
  background: #a23e38;
}
button.small {
  padding: 7px 12px;
  font-size: 12px;
}
a {
  color: var(--teal);
}
p {
  line-height: 1.85;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1.1px;
  line-height: 1.45;
  margin-bottom: 12px;
}
h2 {
  font-size: 19px;
  line-height: 1.6;
  margin-bottom: 6px;
}
h3 {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 8px;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  display: block;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--teal);
  margin-bottom: 13px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: #dfbd77;
  border-radius: 10px;
  color: var(--navy);
  font:
    700 27px Georgia,
    serif;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}
.brand small {
  display: block;
  color: #a2b1bf;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 2px;
  margin-top: 4px;
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 238px 1fr;
}
.sidebar {
  background: var(--navy);
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar nav {
  display: grid;
  gap: 4px;
  margin-top: 28px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
.nav-section {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 10px 14px 2px;
}
.nav-section:first-child {
  padding-top: 0;
}
.nav-btn {
  display: flex;
  gap: 13px;
  align-items: center;
  text-align: left;
  background: transparent;
  color: #b9c8d5;
  font-size: 14px;
  padding: 10px 14px;
}
.nav-btn.active {
  background: #284359;
  color: #fff;
}
.nav-icon {
  font-size: 19px;
  width: 21px;
  text-align: center;
}
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid #395062;
  padding-top: 24px;
  color: #9eb0bd;
  font-size: 11px;
  line-height: 1.9;
}
@media (max-height: 850px) and (min-width: 701px) {
  .sidebar {
    padding-top: 22px;
    padding-bottom: 18px;
  }
  .sidebar nav {
    margin-top: 20px;
  }
  .nav-btn {
    padding-block: 8px;
    font-size: 12px;
  }
  .nav-icon {
    font-size: 16px;
  }
  .nav-section {
    padding-top: 7px;
  }
  .sidebar-footer {
    display: none;
  }
}
.sidebar-footer b {
  color: #e6c583;
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
}
.main {
  min-width: 0;
}
.topbar {
  min-height: 83px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 19px 42px;
  background: #fffdf9;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb strong {
  color: #294657;
}
.identity {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e4ebe6;
  color: #1d5e4e;
  font-weight: 700;
}
.identity-email {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.identity .quiet {
  font-size: 11px;
}
.content {
  max-width: 1280px;
  margin: auto;
  padding: 38px 42px 70px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 27px;
}
.page-heading p {
  font-size: 13px;
  max-width: 680px;
  margin-bottom: 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: 0.4px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 20px;
  background: #e7efea;
  color: #2f6754;
}
.pill.warning {
  color: #956322;
  background: #f7edda;
}
.pill.error {
  color: #9a4139;
  background: #f8e8e5;
}
.pill.neutral {
  color: #617280;
  background: #eef1f2;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.panel {
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 25px;
  margin-bottom: 22px;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 21px;
}
.panel-heading p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.grid .panel {
  margin-bottom: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.stat {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffefa;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}
.stat strong {
  font-size: 30px;
  font-weight: 500;
  display: block;
  margin: 8px 0 2px;
}
.stat small {
  font-size: 11px;
  color: var(--muted);
}
.hero-panel {
  background: #e9eee6;
  border: 0;
  position: relative;
  padding: 28px 30px;
}
.hero-panel h2 {
  font-size: 22px;
  max-width: 670px;
}
.hero-panel p {
  font-size: 13px;
  max-width: 720px;
  margin-bottom: 20px;
}
.feature-list {
  display: grid;
  gap: 0;
}
.feature-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 0;
  border-bottom: 1px solid #e8ebe7;
}
.feature-row:last-child {
  border: 0;
}
.feature-number {
  background: #f0f3ed;
  border-radius: 9px;
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #527260;
  flex-shrink: 0;
}
.feature-row h3 {
  margin: 0;
}
.feature-row p {
  font-size: 11px;
  color: var(--muted);
  margin: 2px 0 0;
}
.feature-row .pill {
  margin-left: auto;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}
.field {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
}
.field.full {
  grid-column: 1/-1;
}
.field input,
.field select,
select.workspace-picker {
  background: #fff;
  border: 1px solid #cdd7d3;
  border-radius: 7px;
  padding: 11px 12px;
  color: #203b49;
  width: 100%;
  min-width: 0;
}
.field input[type='file'] {
  font-size: 12px;
  padding: 15px;
}
.field small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.6;
}
.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
th {
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--muted);
  font-weight: 500;
  background: #f5f6f1;
  padding: 12px 13px;
  white-space: nowrap;
}
td {
  padding: 15px 13px;
  border-bottom: 1px solid #e8ece7;
  line-height: 1.7;
}
tr:last-child td {
  border-bottom: 0;
}
td small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.table-action {
  display: flex;
  gap: 12px;
  align-items: center;
}
.member-list {
  display: grid;
  gap: 16px;
}
.member-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  background: var(--surface-2, #f7f8f5);
}
.member-card-heading,
.member-card-heading > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.member-card-heading h3 {
  margin: 0;
  font-size: 15px;
}
.access-list {
  display: grid;
  gap: 8px;
  margin-top: 15px;
}
.access-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: center;
  gap: 18px;
  background: var(--surface, #fff);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 15px;
}
.access-row strong,
.access-row small {
  display: block;
}
.access-row small {
  color: var(--muted);
  margin-top: 3px;
}
.access-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.access-actions {
  margin-top: 22px;
}
.invitation-history {
  margin-top: 22px;
}
.invitation-history summary {
  cursor: pointer;
  font-weight: 700;
}
.empty {
  padding: 27px;
  border: 1px dashed #cfdad4;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
  text-align: center;
}
.notice {
  border: 1px solid #d9e4db;
  background: #edf4ee;
  border-radius: 9px;
  padding: 15px 18px;
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 22px;
}
.notice.warning {
  background: #fcf3df;
  border-color: #edddb8;
  color: #7c602d;
}
.notice.error {
  background: #fff0eb;
  border-color: #eac8bd;
  color: #943f31;
}
.notice a {
  font-weight: 700;
}
.notice p:last-child {
  margin: 0;
}
.workspace-line {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 26px;
}
.workspace-line label {
  font-size: 12px;
  font-weight: 600;
}
.workspace-picker {
  max-width: 330px;
}
.activity-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  border-bottom: 1px solid #e4e9e3;
  padding: 16px 0;
  align-items: start;
  font-size: 12px;
}
.activity-item:last-child {
  border: 0;
}
.activity-item time {
  font-size: 11px;
  color: var(--muted);
  padding-top: 2px;
}
.activity-item p {
  font-size: 11px;
  margin: 3px 0 0;
  color: var(--muted);
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-story {
  background: var(--navy);
  color: white;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-story .eyebrow {
  color: #dfbd77;
}
.login-story h1 {
  font-size: 48px;
  letter-spacing: -1.5px;
  line-height: 1.45;
  margin-top: 44px;
}
.login-story p {
  color: #adbfcc;
  max-width: 470px;
  font-size: 14px;
}
.login-story footer {
  font-size: 11px;
  color: #8fa5b6;
  margin-top: 48px;
}
.login-form {
  padding: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  width: 100%;
  max-width: 425px;
}
.login-card h2 {
  font-size: 29px;
  margin: 12px 0;
}
.login-card > p {
  font-size: 13px;
  color: var(--muted);
  margin: 15px 0 26px;
}
.login-button {
  width: 100%;
  padding: 14px;
  margin-bottom: 20px;
}
.demo {
  padding: 18px;
  background: #eeeade;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.9;
  margin-top: 22px;
}
.demo p {
  margin: 7px 0 12px;
}
.demo dl {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 5px;
  margin: 12px 0;
}
.demo dt {
  color: #797565;
}
.demo dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.demo output {
  display: block;
  font:
    600 26px ui-monospace,
    monospace;
  letter-spacing: 5px;
  margin-top: 12px;
  color: var(--navy);
}
.login-note {
  font-size: 11px !important;
  margin-top: 20px !important;
}
.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.boot h1 {
  margin-top: 22px;
}
.boot p {
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
dialog {
  border: 1px solid #d8dfd9;
  border-radius: 14px;
  width: min(470px, calc(100% - 40px));
  padding: 30px;
  box-shadow: 0 25px 100px #132b4233;
  color: #21384a;
}
dialog::backdrop {
  background: #10263888;
}
dialog p {
  font-size: 13px;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.8;
  margin-top: 16px;
}
.check input {
  margin-top: 4px;
}
.upload-progress {
  padding: 15px 0;
  font-size: 12px;
  color: var(--teal);
  line-height: 1.8;
}
.result-link {
  display: block;
  background: #f4f6f0;
  border: 1px solid #dce2d6;
  border-radius: 6px;
  padding: 12px;
  margin-top: 12px;
  overflow-wrap: anywhere;
  font-size: 11px;
}
.margin-top {
  margin-top: 22px;
}
.storage-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
  margin: 16px 0 0;
}
@media (min-width: 1500px) {
  .content {
    padding-top: 48px;
  }
  .login-story {
    padding: 60px 85px;
  }
  .login-story h1 {
    font-size: 57px;
  }
}
@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 190px 1fr;
  }
  .sidebar {
    padding: 25px 16px;
  }
  .content {
    padding: 28px 24px 50px;
  }
  .topbar {
    padding: 18px 24px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 35px;
  }
  .login-form {
    padding: 35px;
  }
  .login-story h1 {
    font-size: 38px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: 18px 20px;
  }
  .sidebar .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 23px;
  }
  .sidebar nav {
    display: flex;
    margin-top: 20px;
    gap: 5px;
    overflow: auto;
  }
  .nav-btn {
    font-size: 11px;
    padding: 9px 10px;
    white-space: nowrap;
    gap: 6px;
  }
  .nav-icon {
    font-size: 15px;
  }
  .sidebar-footer {
    display: none;
  }
  .topbar {
    min-height: 65px;
    padding: 13px 20px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .identity-email {
    max-width: 130px;
    font-size: 10px;
  }
  .content {
    padding: 26px 18px 40px;
  }
  .page-heading {
    display: block;
  }
  .page-heading > .pill {
    margin-top: 15px;
  }
  h1 {
    font-size: 26px;
  }
  .stats {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .stat {
    padding: 14px 11px;
  }
  .stat strong {
    font-size: 26px;
  }
  .stat span,
  .stat small {
    font-size: 10px;
  }
  .panel {
    padding: 20px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 28px 27px;
  }
  .login-story h1 {
    font-size: 32px;
    margin: 30px 0 14px;
  }
  .login-story footer {
    display: none;
  }
  .login-form {
    padding: 32px 25px;
  }
  .login-card h2 {
    font-size: 25px;
  }
  .workspace-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .workspace-picker {
    max-width: none;
  }
  .activity-item {
    grid-template-columns: 60px 1fr;
    gap: 10px;
  }
  .activity-item > .pill {
    grid-column: 2;
    justify-self: start;
  }
  .identity .avatar {
    display: none;
  }
  .panel-heading {
    flex-wrap: wrap;
  }
}

textarea {
  font: inherit;
  border: 1px solid #ccd4da;
  border-radius: 8px;
  padding: 12px;
  width: 100%;
  resize: vertical;
}
.result {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 24rem;
  overflow: auto;
  background: #f4f6f8;
  padding: 16px;
  font-size: 12px;
  border-radius: 8px;
}
.lesson-text {
  white-space: pre-wrap;
  line-height: 1.9;
}
.run-card {
  border-top: 1px solid #dde3e7;
  padding: 16px 0;
}
[data-editor] {
  border-top: 1px solid #dde3e7;
  margin-top: 24px;
  padding-top: 16px;
}
/* Product workspace: learning library, course studio and focused reading. */
:root {
  --navy: #183b35;
  --teal: #23664f;
  --muted: #718078;
  --line: #dfe5dc;
  color: #263e34;
  background: #f6f7f2;
  font-family: system-ui, Tahoma, sans-serif;
}
.sidebar {
  background: #f0f3ec;
  border-right: 1px solid var(--line);
  padding: 30px 20px;
}
.brand {
  color: #193c33;
}
.brand small {
  color: #7b877a;
  font-size: 9px;
  letter-spacing: 1.6px;
}
.brand-mark {
  background: #cee398;
  color: #204a35;
  border-radius: 50%;
}
.nav-btn {
  color: #6e7d70;
  padding: 13px 15px;
  font-weight: 500;
}
.nav-btn.active {
  background: #214e3e;
  color: white;
}
.nav-btn:hover {
  background: #dfe8d7;
  color: #214e3e;
}
.nav-btn.active:hover {
  background: #214e3e;
  color: white;
}
.sidebar nav {
  margin-top: 40px;
}
.sidebar-footer {
  border-color: #d4ddce;
  color: #82907f;
}
.sidebar-footer b {
  color: #335643;
}
.topbar {
  background: #fff;
  min-height: 76px;
}
.content {
  max-width: 1380px;
  padding-top: 32px;
}
.page-heading {
  margin-bottom: 12px;
}
h1 {
  font-size: 29px;
  letter-spacing: -0.6px;
}
h2 {
  font-size: 21px;
}
.panel {
  background: #fff;
  border-radius: 16px;
}
.panel form {
  margin-top: 22px;
}
.panel .field {
  margin-bottom: 16px;
}
.panel form > button {
  margin-top: 16px;
}
.environment-note {
  font-size: 11px;
  color: #8b7447;
  margin-bottom: 16px;
}
.workspace-line {
  margin: 8px 0 25px;
  font-size: 11px;
}
.workspace-picker {
  max-width: 245px;
  padding: 7px 10px !important;
  font-size: 12px;
}
.workspace-line label {
  font-size: 11px;
}
.workspace-line #refresh {
  margin-left: auto;
  font-size: 11px;
}
.learning-hero {
  border-radius: 22px;
  background: #e4ecd7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 38px 42px;
  margin-bottom: 36px;
  overflow: hidden;
  min-height: 300px;
}
.learning-hero h2 {
  font-size: 36px;
  line-height: 1.45;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.learning-hero p {
  font-size: 14px;
  color: #5b715a;
}
.learning-hero .eyebrow {
  font-size: 10px;
}
.hero-art {
  display: flex;
  align-items: center;
  gap: 24px;
  transform: rotate(-7deg);
  padding: 30px;
  color: #33593c;
}
.hero-art > span {
  font-size: 140px;
  font-family: Georgia;
  line-height: 1;
}
.hero-art > div {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
}
.section-intro {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
}
.section-intro h2,
.section-intro h3 {
  margin: 0;
}
.section-intro p {
  margin: 7px 0 0;
  font-size: 13px;
}
.count {
  font-size: 14px;
  color: #6f8468;
  margin-left: 10px;
}
.course-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}
.search-field {
  flex: 1;
}
.search-field input,
.course-toolbar select {
  background: white;
  border: 1px solid var(--line);
  padding: 12px 15px;
  border-radius: 9px;
  font: inherit;
  color: inherit;
  width: 100%;
}
.course-toolbar select {
  width: auto;
  max-width: 190px;
}
.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.course-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.course-cover {
  height: 160px;
  background: #e3eccc;
  color: #3d6039;
  position: relative;
  padding: 20px;
  overflow: hidden;
}
.course-cover > span {
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 700;
}
.course-cover small {
  position: absolute;
  bottom: 19px;
  left: 20px;
  font-size: 11px;
}
.cover-symbol {
  position: absolute;
  right: 18px;
  top: 5px;
  font-size: 106px;
  line-height: 1.2;
  opacity: 0.65;
}
.cover-1 {
  background: #ede5d4;
  color: #87653c;
}
.cover-2 {
  background: #dce8ea;
  color: #466c76;
}
.cover-3 {
  background: #e8e0ed;
  color: #786382;
}
.course-card-body {
  padding: 23px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.course-card h2 {
  font-size: 18px;
  line-height: 1.65;
  margin: 14px 0 8px;
  overflow-wrap: anywhere;
}
.course-card p {
  font-size: 12px;
}
.course-card .pill {
  align-self: flex-start;
}
.course-card button {
  width: 100%;
  margin-top: auto;
}
.course-card progress {
  margin-bottom: 20px;
}
progress {
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 10px;
  background: #e8ede4;
  accent-color: #477a50;
}
progress::-webkit-progress-bar {
  background: #e8ede4;
  border-radius: 10px;
}
progress::-webkit-progress-value {
  background: #477a50;
  border-radius: 10px;
}
.course-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 20px 0;
}
.course-heading h2 {
  font-size: 27px;
  margin-top: 10px;
}
.course-heading p {
  font-size: 13px;
}
.course-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
  margin-bottom: 25px;
}
.studio-layout,
.classroom-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 25px;
  align-items: start;
}
.lesson-outline {
  padding: 23px 18px;
  background: #eef2e9;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.lesson-outline > h3 {
  margin-bottom: 18px;
}
.lesson-outline progress {
  margin-bottom: 20px;
}
.outline-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  text-align: left;
  line-height: 1.8;
  width: 100%;
  background: transparent;
  color: #63715f;
  font-size: 13px;
  padding: 13px 10px;
  font-weight: 500;
}
.outline-item.selected {
  background: white;
  color: #28553c;
  box-shadow: 0 2px 8px #25482409;
}
.outline-item > span {
  font-size: 11px;
  padding-top: 2px;
  min-width: 20px;
}
.outline-row {
  margin-bottom: 8px;
}
.order-actions {
  display: flex;
  gap: 17px;
  padding-left: 12px;
}
.order-actions button {
  padding: 0 4px;
}
.add-lesson {
  border-top: 1px solid #d8e0d1;
  margin-top: 20px;
  padding-top: 20px;
}
.add-lesson .field {
  margin: 18px 0;
}
.writing-panel {
  padding: 30px;
}
[data-editor] {
  border: 0;
  margin: 0;
  padding: 0;
}
[data-editor] textarea {
  min-height: 340px;
  font-size: 16px;
  line-height: 1.9;
  padding: 20px;
}
.editor-options {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.editor-options > summary {
  margin-bottom: 10px;
}
.editor-options p {
  font-size: 12px;
}
.save-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}
.save-bar span {
  font-size: 11px;
}
.reading-panel {
  padding: 42px 48px;
}
.reading-panel h3 {
  font-size: 26px;
  line-height: 1.7;
  margin-bottom: 18px;
}
.lesson-text {
  font-size: 16px;
  line-height: 2.1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.reading-panel article > .muted {
  font-size: 11px;
}
.reading-footer {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  margin-top: 35px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.reading-footer p {
  font-size: 12px;
  margin: 0;
}
.completion {
  font-size: 14px;
  color: #38714b;
}
.review-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  background: #edf2e7;
  padding: 20px;
  border-radius: 10px;
  margin: 25px 0;
}
.review-summary span {
  font-size: 13px;
}
.publish-section {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 25px;
}
summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.8;
}
details[open] > summary {
  margin-bottom: 18px;
}
.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.source-list .panel h2 {
  margin-bottom: 16px;
}
.source-history,
.budget-list > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.budget-list {
  margin-bottom: 25px;
}
.login-story {
  background: #214e3e;
}
.login-story .brand {
  color: #fff;
}
.login-story .brand small {
  color: #aabcaa;
}
.login-story p {
  color: #c3d1be;
}
.login-story .brand-mark {
  color: #214e3e;
}
.login-story h1 {
  font-size: 52px;
}
button:disabled {
  cursor: not-allowed;
}
button:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid #75a862;
  outline-offset: 4px;
}
@media (max-width: 1200px) {
  .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-art {
    padding: 0;
    gap: 8px;
  }
  .hero-art > span {
    font-size: 90px;
  }
  .hero-art > div {
    font-size: 21px;
  }
  .classroom-layout,
  .studio-layout {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 18px;
  }
  .reading-panel {
    padding: 28px;
  }
}
@media (max-width: 850px) {
  .hero-art {
    display: none;
  }
  .learning-hero {
    padding: 30px;
    min-height: 260px;
  }
  .learning-hero h2 {
    font-size: 30px;
  }
  .studio-layout,
  .classroom-layout {
    grid-template-columns: 1fr;
  }
  .reading-panel {
    padding: 28px;
  }
  .sidebar nav {
    gap: 4px;
  }
  .nav-btn {
    padding: 12px 10px;
    font-size: 12px;
  }
  .source-list {
    grid-template-columns: 1fr;
  }
  .access-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
@media (max-width: 700px) {
  .sidebar {
    border-bottom: 1px solid var(--line);
  }
  .sidebar nav {
    margin-top: 18px;
  }
  .course-grid {
    grid-template-columns: 1fr;
  }
  .course-cover {
    height: 165px;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .learning-hero {
    padding: 28px;
  }
  .course-toolbar {
    flex-wrap: wrap;
  }
  .search-field {
    min-width: 160px;
  }
  .course-toolbar select {
    max-width: none;
    width: 100%;
  }
  .course-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .course-tabs {
    overflow: auto;
  }
  .course-tabs button {
    white-space: nowrap;
    font-size: 12px;
  }
  .course-heading h2 {
    font-size: 24px;
  }
  .reading-panel {
    padding: 25px 22px;
  }
  .reading-panel h3 {
    font-size: 22px;
  }
  .workspace-line {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .workspace-line #refresh {
    margin-left: 0;
  }
  .workspace-picker {
    max-width: 200px;
  }
  .writing-panel {
    padding: 22px;
  }
  .save-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .section-intro {
    align-items: flex-start;
  }
  .section-intro > button {
    white-space: nowrap;
    font-size: 12px;
  }
  .identity-email {
    max-width: 160px;
  }
  .topbar .breadcrumb {
    display: none;
  }
  .topbar {
    justify-content: flex-end;
    min-height: 58px;
  }
  .lesson-text {
    font-size: 15px;
  }
}
.field input,
.field textarea,
.field select {
  font-weight: 400;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.media-card {
  border: 1px solid var(--border, #dce5de);
  border-radius: 14px;
  padding: 20px;
  overflow-wrap: anywhere;
}
.lesson-media {
  display: block;
  max-width: 100%;
  width: 100%;
  max-height: 480px;
  margin: 16px 0;
  border-radius: 10px;
}
.media-card .actions {
  flex-wrap: wrap;
}

.assignment-card {
  border-top: 1px solid var(--line, #deded7);
  padding: 1.3rem 0;
  margin-top: 1rem;
}
.assignment-card h4 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}
.assignment-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.assignment-submission {
  padding: 1rem;
  margin: 1rem 0;
  background: #f5f6f1;
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.lesson-assignments {
  border-top: 1px solid #deded7;
  margin-top: 2rem;
  padding-top: 1rem;
}
.assignment-card form {
  margin-top: 1rem;
}

/* Shared appearance tokens: role color follows the active work area, never grants access. */
:root {
  --bg: #f3f5fa;
  --surface: #ffffff;
  --surface-2: #e9eef6;
  --text: #172338;
  --muted: #56647b;
  --line: #ccd5e3;
  --accent: #075bb4;
  --accent-soft: #dfedff;
  --on-accent: #ffffff;
  --navy: #102640;
  --teal: var(--accent);
  --warm: var(--surface-2);
  --success-bg: #e0f4eb;
  --success-text: #126343;
  --warning-bg: #fff0ce;
  --warning-text: #785013;
  --error-bg: #ffe8eb;
  --error-text: #a7233e;
  color: var(--text);
  background: var(--bg);
  font-family: 'Noto Sans Thai', Tahoma, system-ui, sans-serif;
}
:root[data-role='creator'] {
  --accent: #6941ce;
  --accent-soft: #ede5ff;
}
:root[data-role='instructor'] {
  --accent: #087058;
  --accent-soft: #d9f4ea;
}
:root[data-role='reviewer'] {
  --accent: #a12b73;
  --accent-soft: #fbe0ef;
}
:root[data-role='media'] {
  --accent: #8a459f;
  --accent-soft: #f1e3f7;
}
:root[data-role='admin'] {
  --accent: #955110;
  --accent-soft: #fff0d6;
}
:root[data-role='community'] {
  --accent: #245fbd;
  --accent-soft: #e1ebff;
}
:root[data-mode='dark'] {
  --bg: #0b1020;
  --surface: #141d30;
  --surface-2: #1e2a40;
  --text: #edf2ff;
  --muted: #adbbd1;
  --line: #394760;
  --accent: #73b8ff;
  --accent-soft: #182f4d;
  --on-accent: #081425;
  --navy: #0d1729;
  --success-bg: #153d32;
  --success-text: #85e4bd;
  --warning-bg: #453418;
  --warning-text: #f2ce82;
  --error-bg: #482437;
  --error-text: #ffadbd;
}
:root[data-mode='dark'][data-role='creator'] {
  --accent: #bda1ff;
  --accent-soft: #30224b;
}
:root[data-mode='dark'][data-role='instructor'] {
  --accent: #64dec0;
  --accent-soft: #15392f;
}
:root[data-mode='dark'][data-role='reviewer'] {
  --accent: #f4a2d3;
  --accent-soft: #41253a;
}
:root[data-mode='dark'][data-role='media'] {
  --accent: #d5a9f0;
  --accent-soft: #372448;
}
:root[data-mode='dark'][data-role='admin'] {
  --accent: #f5c679;
  --accent-soft: #3c2e1e;
}
:root[data-mode='dark'][data-role='community'] {
  --accent: #9cbbff;
  --accent-soft: #1c2e50;
}
body,
.main,
.login,
.login-form {
  background: var(--bg);
  color: var(--text);
}
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.sidebar .brand,
.brand,
.brand small,
.sidebar-footer,
.sidebar-footer b {
  color: var(--text);
}
.brand small,
.sidebar-footer {
  color: var(--muted);
}
.brand-mark {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 12px;
}
.nav-btn {
  color: var(--muted);
  border-radius: 12px;
}
.nav-btn.active,
.nav-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.nav-btn.active {
  box-shadow: inset 3px 0 var(--accent);
}
.sidebar-footer {
  border-color: var(--line);
}
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  gap: 14px;
  flex-wrap: wrap;
}
.breadcrumb,
.breadcrumb strong,
.field,
.field small,
th,
td {
  color: var(--text);
}
.breadcrumb,
.field small,
small,
.muted,
.login-note,
.storage-note {
  color: var(--muted);
}
.avatar {
  color: var(--accent);
  background: var(--accent-soft);
}
.panel,
.course-card,
.lesson-editor,
.reading-panel,
.lesson-outline,
.login-card,
dialog,
.media-card {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}
.panel,
.course-card {
  box-shadow: 0 7px 24px #00000006;
  border-radius: 18px;
}
button,
button.login-button {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 10px;
}
button.secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
}
button.quiet {
  background: transparent;
  color: var(--accent);
}
button.danger {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-text);
}
button.nav-btn {
  background: transparent;
  color: var(--muted);
}
button.nav-btn.active,
button.nav-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
input,
textarea,
select,
.workspace-picker {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
input,
select,
textarea {
  accent-color: var(--accent);
}
a,
.eyebrow,
.completion,
.outline-item.selected {
  color: var(--accent);
}
.pill,
.notice {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: var(--line);
}
.pill.neutral,
.demo,
.result,
.source-history,
.assignment-submission,
.upload-progress,
.context-note {
  background: var(--surface-2);
  color: var(--text);
}
.pill.warning,
.notice.warning {
  background: var(--warning-bg);
  color: var(--warning-text);
}
.pill.error,
.notice.error {
  background: var(--error-bg);
  color: var(--error-text);
  border-color: var(--error-text);
}
.environment-note {
  color: var(--muted);
  background: transparent;
}
.course-tabs {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  flex-wrap: wrap;
}
.course-tabs button {
  color: var(--muted);
  background: transparent;
  border: 0;
}
.course-tabs button.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 1px 5px #0002;
}
.outline-item {
  background: transparent;
  color: var(--text);
}
.outline-item.selected,
.outline-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.learning-hero {
  background: linear-gradient(115deg, var(--accent-soft), var(--surface));
  border: 1px solid var(--line);
  color: var(--text);
}
.learning-hero h2,
.learning-hero p,
.hero-art,
.hero-art span,
.hero-art div {
  color: var(--text);
}
.learning-hero .eyebrow {
  color: var(--accent);
}
.hero-art {
  opacity: 0.7;
}
.course-cover,
.cover-0 {
  background: var(--accent-soft);
  color: var(--accent);
}
.cover-1 {
  background: var(--surface-2);
  color: var(--text);
}
.cover-2 {
  background: var(--accent-soft);
  color: var(--text);
}
.cover-3 {
  background: var(--surface-2);
  color: var(--accent);
}
.course-cover small,
.course-cover span {
  color: inherit;
}
progress,
progress::-webkit-progress-bar {
  background: var(--surface-2);
}
progress::-webkit-progress-value {
  background: var(--accent);
}
progress::-moz-progress-bar {
  background: var(--accent);
}
progress {
  accent-color: var(--accent);
}
.login-story {
  background: linear-gradient(155deg, #162748, #11182c);
  color: #f0f5ff;
}
.login-story .brand,
.login-story .brand small,
.login-story p,
.login-story footer {
  color: #c2d1e9;
}
.login-story .eyebrow {
  color: #96c8ff;
}
.demo,
.notice,
.quiz-question,
.reading-footer,
.assignment-card,
.lesson-assignments,
.media-card {
  border-color: var(--line);
}
.quiz-question {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin: 18px 0;
  min-width: 0;
}
.quiz-question legend {
  font-weight: 600;
  padding: 0 8px;
}
.quiz-question .check {
  padding: 9px 0;
  min-height: 44px;
}
.appearance {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.appearance select {
  width: auto;
  padding: 8px 10px;
  min-height: 40px;
  border-radius: 10px;
  font-size: 13px;
}
.role-badge {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--line);
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.login-card .appearance {
  margin-bottom: 32px;
  justify-content: flex-end;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.assignment-card,
.discussion-list,
.notice,
.panel {
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .topbar {
    padding: 14px 18px;
  }
  .breadcrumb {
    width: 100%;
  }
  .appearance {
    flex: 1;
  }
  .course-tabs {
    gap: 4px;
  }
  .course-tabs button {
    padding: 9px 11px;
  }
  .quiz-question {
    padding: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
:root[data-mode] .workspace-line select,
:root[data-mode] .field input,
:root[data-mode] .field textarea,
:root[data-mode] .field select {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}
:root[data-mode] .course-heading h2,
:root[data-mode] .lesson-outline h3,
:root[data-mode] .reading-panel h3 {
  color: var(--text);
}
:root[data-mode] .field,
:root[data-mode] input,
:root[data-mode] select,
:root[data-mode] textarea {
  font-size: 14px;
}
:root[data-mode] .field input,
:root[data-mode] .field select {
  min-height: 44px;
}
:root[data-mode] .field small,
:root[data-mode] small {
  font-size: 12px;
}
:root[data-mode] .reading-panel {
  font-size: 15px;
}
:root[data-mode] .reading-panel p {
  line-height: 1.9;
}

:root[data-mode] .search-field input,
:root[data-mode] .course-toolbar select {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 22px;
  margin-top: 24px;
}
.offer-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.offer-card > button {
  margin-top: auto;
}
.offer-price {
  font-size: 30px;
  font-weight: 700;
  color: var(--accent);
}
.billing-order {
  margin: 18px 0;
}
.billing-order .actions {
  margin-top: 18px;
  flex-wrap: wrap;
}
.billing-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 11px 16px;
  text-decoration: none;
  min-height: 44px;
}
.billing-order details {
  margin: 18px 0;
}
.billing-order form {
  display: grid;
  gap: 14px;
  max-width: 620px;
}

/* Course Studio: reveal only the selected source input, even under .field display rules. */
form[id^='studio-'] [hidden] {
  display: none !important;
}
form[id^='studio-'] fieldset {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin: 16px 0;
}
form[id^='studio-'] fieldset .field {
  margin-bottom: 12px;
}

.maintenance-diff {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.maintenance-diff pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.8;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.maintenance-watch {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.maintenance-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 14px 0;
}
form[id^='maintenance-'] {
  display: grid;
  gap: 14px;
}
.maintenance-watch form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
@media (max-width: 760px) {
  .maintenance-diff {
    grid-template-columns: 1fr;
  }
  .maintenance-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

.research-source {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 28rem;
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* Keep every navigation group discoverable on common laptop-height screens. */
@media (max-height: 850px) and (min-width: 701px) {
  .sidebar {
    padding-top: 22px;
    padding-bottom: 18px;
  }
  .sidebar nav {
    gap: 3px;
    margin-top: 18px;
  }
  .nav-btn {
    padding: 7px 11px;
    font-size: 12px;
  }
  .nav-icon {
    font-size: 15px;
  }
  .nav-section {
    padding: 6px 11px 1px;
  }
  .sidebar-footer {
    display: none;
  }
}
