/* Shared appearance tokens. Images, video and embedded Drive controls retain their originals. */
:root {
  color-scheme:light;
  --canvas:#f7f6f2; --paper:#fffdf8; --ink:#292e2c; --muted:#5c655f;
  --line:#dddcd4; --night:#1d2521; --gold:#785921; --gold-light:#e6ca91;
  --violet:#604795; --violet-light:#eee8f8; --green:#226449; --green-light:#e4f1e8;
  --blue:#285f85; --blue-light:#e6f0f6; --amber:#775315; --amber-light:#faf0d9;
  --red:#9b3340; --red-light:#fce9e9;
  --gc-surface:#fffdf8; --gc-soft:#f0eee7; --gc-selected:#eae2cf; --gc-control:#7b8173;
  --gc-focus:#805c1c; --gc-on-dark:#f8f4e9; --gc-on-dark-muted:#d0d4c9;
  --gc-code:#e9ede8; --gc-code-ink:#344d41; --gc-disabled:#e9e9e1;
  --shadow:0 14px 38px #27231e08;
}
:root[data-theme="dark"] {
  color-scheme:dark;
  --canvas:#171c1b; --paper:#212825; --ink:#f0eee5; --muted:#bcc4b9;
  --line:#414b44; --night:#17201b; --gold:#e1c38b; --gold-light:#e6ca91;
  --violet:#d0bcfa; --violet-light:#3b334d; --green:#a4d9b5; --green-light:#263e30;
  --blue:#abcfe6; --blue-light:#273c49; --amber:#edd196; --amber-light:#423a25;
  --red:#ffbdc1; --red-light:#4a2c32;
  --gc-surface:#252e29; --gc-soft:#2b352e; --gc-selected:#403b2c; --gc-control:#83927f;
  --gc-focus:#f0cf90; --gc-on-dark:#f8f4e9; --gc-on-dark-muted:#d0d4c9;
  --gc-code:#17231d; --gc-code-ink:#c0ddc8; --gc-disabled:#333d35;
  --shadow:0 14px 38px #0000001a;
}
html { background:var(--canvas); }
body { background:var(--canvas); color:var(--ink); }
::selection { background:var(--gc-selected); color:var(--ink); }
.gc-theme-toggle { display:inline-flex; align-items:center; justify-content:center; flex:0 0 44px; width:44px; height:44px; min-width:44px; min-height:44px; padding:11px; border:1px solid var(--gc-control); border-radius:50%; background:var(--paper); color:var(--gold); cursor:pointer; }
.gc-theme-toggle:hover { background:var(--gc-soft); }
.gc-theme-toggle svg { width:20px; height:20px; flex-shrink:0; }
.gc-theme-sun { display:none; }
[data-theme="dark"] .gc-theme-moon { display:none; }
[data-theme="dark"] .gc-theme-sun { display:block; }
.gc-theme-access { position:absolute; top:22px; right:24px; z-index:10; }
/* A double boundary keeps keyboard focus visible on light, dark and image surfaces. */
html :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline:3px solid var(--gc-focus); outline-offset:3px; box-shadow:0 0 0 2px var(--canvas); }
html :is(button,input,select,textarea) { accent-color:var(--gold); }
html :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),
html #gc-profile-dialog input:not([type=file]):not([type=checkbox]),html #gc-profile-dialog select,
html .gc-player-tools select { background:var(--paper); color:var(--ink); border-color:var(--gc-control); }
html :is(input,textarea)::placeholder { color:var(--muted); opacity:1; }
html :is(input,select,textarea)[readonly],html #gc-profile-dialog input[readonly] { background:var(--gc-soft); color:var(--muted); }
html button:disabled,html input:disabled,html select:disabled,html textarea:disabled,html .button[aria-disabled=true] { opacity:1; color:var(--muted); background:var(--gc-disabled); border-color:var(--gc-control); cursor:not-allowed; }
html input[type=file]::file-selector-button { min-height:44px; border:1px solid var(--gc-control); border-radius:7px; background:var(--gc-soft); color:var(--ink); padding:8px 12px; margin-right:12px; }
html dialog { color:var(--ink); background:var(--paper); border:1px solid var(--gc-control); }
html dialog::backdrop { background:#0e151ac4; }
html .topbar { background:var(--paper); }
html .location-button,html #breadcrumb,html .gc-player-status,html .gc-player-tools label { color:var(--muted); }
html #clock { color:var(--ink); }
html .avatar { background:var(--gc-selected); color:var(--gold); border-color:var(--gc-control); }
html .button.primary { background:var(--night); color:var(--gc-on-dark); border-color:var(--gc-control); }
html .button.primary:hover { background:#334439; color:var(--gc-on-dark); }
html[data-theme=dark] .button.primary { background:var(--gold-light); color:#292a22; border-color:var(--gold-light); }
html[data-theme=dark] .button.primary:hover { background:#f0dbae; }
html .button.secondary,html .icon-button,html .lesson-content .template button,html .template-button,html .filter-button,
html .demo-buttons button { background:var(--paper); color:var(--ink); border-color:var(--gc-control); }
html .button.secondary:hover,html .template-button:hover,html .filter-button:hover,html .demo-buttons button:hover { background:var(--gc-soft); }
html .filter-button[aria-pressed=true] { background:var(--violet-light); color:var(--violet); border-color:var(--violet); }
html .preview-label,html .future-note,html .demo-access { background:var(--gc-soft); color:var(--muted); border-color:var(--line); }
html .lesson-content .card,html .card,html .resource-link,html .lesson-outline,html .lesson,html .video-card,html .table-shell,
html .source-list a,html .gc-player,html .login-panel { background:var(--paper); color:var(--ink); }
html .lesson-link:hover,html .lesson-footer,html .content-card,html .gc-player-tools { background:var(--gc-soft); }
html .lesson-link[aria-current=page] { background:var(--violet-light); color:var(--violet); }
html .lesson-index,html .quiz-option { border-color:var(--gc-control); }
html .lesson-content li { color:var(--muted); }
html .lesson-content .card h3,html .lesson-content .card strong { color:var(--ink); }
html .lesson-content .callout,html .callout,html .practice-box,html .culture-review,html .protected-owner { background:var(--amber-light); color:var(--amber); border-color:var(--gold); }
html .lesson-content .callout p,html .callout p,html .practice-box p,html .protected-owner small { color:var(--amber); }
html .lesson-content pre,html pre { background:var(--gc-code); color:var(--gc-code-ink); border-color:var(--line); }
html code { color:var(--gc-code-ink); }
html .learning-goal { background:var(--blue-light); border-color:var(--blue); }
html .learning-goal p { color:var(--blue); }
html .people-table th { background:var(--gc-soft); color:var(--muted); }
html .ring-inner { background:var(--paper); }
html .ring { background:conic-gradient(var(--gold) var(--value),var(--gc-soft) 0); }
html .progress-bar { background:var(--gc-soft); }
html .resource-link .resource-icon { background:var(--gc-selected); color:var(--gold); }
html .app-footer,html .login-foot,html .local-context time,html .weather-pending,html .weather-reading.unavailable,
html #gc-profile-dialog [data-profile-weather-detail],html .source-caption,html .office-module small,
html .office-evidence li small,html .lesson-footer small { color:var(--muted); }
html .daily-thought { color:var(--gold)!important; border-color:var(--gold); }
html .editor-note { color:var(--muted)!important; }
html .weather-reading,html .culture-number,html .office-module-number,html .protected-owner>svg { color:var(--gold); }
html .weather-reading.cool { color:var(--blue); }
html .weather-reading:hover { background:var(--gc-soft); }
html .office-evidence { background:var(--gc-soft); }
html .local-context,html .downloads-card details { border-color:var(--line); }
html .login-box>.eyebrow,html .welcome-eyebrow,html .phase-number,html .template-label { color:var(--gold); }
html .login-brand .eyebrow { color:var(--gold-light); }
html .sidebar,html .login-brand,html .continue-card,html .office-start { color:var(--gc-on-dark); }
html .continue-card,html .office-start { background:var(--night); }
html .muted { background:var(--gc-soft); color:var(--muted); }
html .sidebar .academy-name { color:var(--gold-light); }
html .continue-card p,html .continue-card small,html .continue-meta { color:var(--gc-on-dark-muted); }
/* The course introduction intentionally retains its dark editorial panel in both themes. */
html .lesson-content .card.dark { background:var(--night); color:var(--gc-on-dark); }
html .lesson-content .card.dark h3,html .lesson-content .card.dark strong { color:var(--gc-on-dark); }
html .lesson-content .card.dark p { color:var(--gc-on-dark-muted); }
html .lesson-content .card.dark .button.secondary { background:var(--night); border-color:var(--gold-light); }
html video,html audio { color:var(--gc-on-dark); }
/* Welcome: editorial ivory/charcoal surfaces, with the portrait untouched. */
html .gc-welcome { --gc-welcome-ink:var(--ink); --gc-welcome-muted:var(--muted); --gc-welcome-gold:var(--gold); --gc-welcome-rule:var(--line); --gc-welcome-ivory:var(--paper); }
html .gc-welcome-review,html .gc-welcome-culture { background:var(--gc-soft); border-color:var(--line); }
html .gc-welcome-review p,html .gc-welcome-pillars p,html .gc-welcome-owner-note { color:var(--muted); }
html .gc-welcome-switch { background:var(--gc-selected); }
html .gc-welcome-switch button { color:var(--ink); }
html .gc-welcome-switch button[aria-pressed=true],html .gc-welcome-switch button:hover { background:var(--paper); color:var(--ink); border-color:var(--gc-control); }
html .gc-welcome-copy h2,html .gc-welcome-letter strong,html .gc-welcome-signature strong,
html .gc-welcome-culture-heading h3,html .gc-welcome-pillars h4 { color:var(--ink); }
html .gc-welcome-eyebrow,html .gc-welcome-pillar-index,html .gc-welcome-signature div>span { color:var(--gold); }
html .gc-welcome-pillars article+article,html .gc-welcome-owner-note { border-color:var(--line); }
html .gc-welcome-next .gc-welcome-eyebrow { color:#e1c38b; }
html .gc-welcome-portrait figcaption { left:0; right:0; bottom:0; padding:16px 22px; background:#17201beb; border-top:1px solid #e1c38b66; }
html .gc-welcome-portrait figcaption>span:last-child { max-width:none; font-size:26px; }
html .office-cover { background:linear-gradient(135deg,#252b24,#4e4b35); color:#f0dfb5; }
html .gc-welcome-next h3 { color:var(--gc-on-dark); }
html .gc-welcome-next p { color:var(--gc-on-dark-muted); }
/* Complete Acadiprev library, classroom, reference guides and management. */
html .acadiprev-classroom,html .acadiprev-group,html .acadiprev-focus { background:var(--paper); border-color:var(--line); }
html .acadiprev-classroom-header,html .acadiprev-video-sidebar,html .acadiprev-video-support,
html .acadiprev-video-help,html .acadiprev-guide,html .acadiprev-group[open]>summary,
html .acadiprev-group>summary:hover { background:var(--gc-soft); border-color:var(--line); }
html .acadiprev-cover,html .acadiprev-practice-scope,html .acadiprev-notice { background:var(--gc-selected); color:var(--gold); }
html .acadiprev-cover .tag,html .acadiprev-classroom-header .tag { background:var(--paper); color:var(--gold); }
html .acadiprev-classroom-header .eyebrow,html .acadiprev-focus small,html .acadiprev-item-icon,
html .acadiprev-guide summary,html .acadiprev-video-help summary,html .acadiprev-video-support a,
html .acadiprev-practice-sources a,html .acadiprev-video-status,html .acadiprev-chevron,
html .acadiprev-notice>svg { color:var(--gold); }
html .acadiprev-item-icon { background:var(--gc-selected); }
html .acadiprev-tabs a { color:var(--muted); }
html .acadiprev-tabs a:hover,html .acadiprev-tabs a[aria-current=page],
html .acadiprev-video-outline li button[aria-current=true] { background:var(--gc-selected); color:var(--gold); border-color:var(--gc-control); }
html .acadiprev-video-outline li button { color:var(--ink); }
html .acadiprev-video-outline li button:hover { background:var(--gc-selected); }
html .acadiprev-classroom-header p,html .acadiprev-video-support p,html .acadiprev-video-outline label,
html .acadiprev-video-outline h3,html .acadiprev-video-outline small,html .acadiprev-metrics span,
html .acadiprev-progress-note,html .acadiprev-guide li,html .acadiprev-guide p,
html .acadiprev-filters label,html .acadiprev-result-count,html .acadiprev-group small,
html .acadiprev-group-tools,html .acadiprev-item-meta,html .acadiprev-access-note,html .acadiprev-item .acadiprev-access-note,
html .acadiprev-date,html .acadiprev-foot,html .acadiprev-practice-body ol li,
html .acadiprev-practice-sources small,html .acadiprev-admin-metrics span,
html .acadiprev-notice p,html .acadiprev-people td span { color:var(--muted); }
html .acadiprev-page { --acadiprev-accent:var(--gold); }
/* Disabled states remain legible after primary/secondary button rules. */
html button.button:disabled,html input:disabled,html select:disabled,html textarea:disabled { color:var(--muted); background:var(--gc-disabled); border-color:var(--gc-control); opacity:1; transform:none; box-shadow:none; }
/* Do not animate a whole-page theme change or alter media colors. */
html .button { transition:transform .18s,box-shadow .18s; }
@media(max-width:700px) {
  html .topbar { gap:8px; padding-inline:16px; }
  html .topbar-actions { gap:8px; }
  html #breadcrumb { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  html #menu-toggle,html #profile-button { width:44px; min-width:44px; height:44px; min-height:44px; }
  html .location-button { min-width:44px; min-height:44px; }
  .gc-theme-access { top:18px; right:18px; }
}
@media(prefers-reduced-motion:reduce) { .gc-theme-toggle { transition:none; } }
@media print {
  :root[data-theme] { color-scheme:light; --canvas:#fff; --paper:#fff; --ink:#000; --muted:#333; --line:#888; --gold:#614714; --gc-soft:#fff; --gc-selected:#fff; --gc-code:#fff; --gc-code-ink:#000; }
  .gc-theme-access,.gc-theme-toggle { display:none!important; }
}
