/* Homepage and paper workspace skin. Loaded after the optional account controls. */
html[data-home-theme="editorial"][data-home-motion="enhanced"] {
  --glass-line: #ffffff27;
  --glass-surface: linear-gradient(126deg, #333638ed 0%, #252729f2 42%, #1c1e20f7 100%);
  --glass-solid: #242729;
  --glass-shadow: inset 0 1px #ffffff13, 0 18px 38px -21px #000a;
  --glass-blur: blur(20px) saturate(.87);
}
html[data-home-motion="enhanced"] body {
  background: radial-gradient(ellipse 60% 360px at 17% 0%, #1c1e20, transparent 79%), #101112;
}
html[data-home-motion="enhanced"] #homeDotField { opacity: .2; }
html[data-home-theme="editorial"][data-home-motion="enhanced"] body > header {
  box-sizing: border-box;
  width: min(1216px, calc(100% - 80px));
  min-height: 76px;
  margin: 0 auto;
  padding: 10px 0 !important;
  border: 0;
  border-bottom: 1px solid #ffffff19;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
html[data-home-motion="enhanced"] header #accountNav .account-button,
html[data-home-motion="enhanced"] header a#resumeWorkbenchLink {
  background: #242627;
  border-color: #ffffff24;
  color: #ebeef0;
  min-height: 44px;
}
html[data-home-motion="enhanced"] header #resumeWorkbenchLink svg {
  color: #dfe4e5;
  background: #323638;
  border-color: #ffffff26;
}
html[data-home-motion="enhanced"] header #resumeWorkbenchLink::after { border-color: #ccd0d2; }
html[data-home-motion="enhanced"] header #feedbackOpen { min-height: 44px; }

/* The image sits behind the glass cards in one continuous composition. */
html[data-home-motion="enhanced"] #landing {
  box-sizing: border-box;
  width: min(1216px, calc(100% - 80px));
  padding: 26px 0 16px;
}
html[data-home-motion="enhanced"] #landing .landing-hero {
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #ffffff23;
  border-radius: 28px;
  background: linear-gradient(90deg, #121415d7 0%, #14161779 39%, transparent 68%),
    linear-gradient(0deg, #101215ba, transparent 58%),
    #1a1c1e url("/assets/thesis-glass-book.webp?v=20261205") center 43% / cover no-repeat;
  box-shadow: inset 0 1px #ffffff09, 0 24px 55px -35px #000b;
}
html[data-home-motion="enhanced"] #landing .landing-copy {
  display: flex;
  flex-flow: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  min-height: clamp(230px, 23vw, 337px);
  padding: clamp(26px, 3vw, 44px) clamp(26px, 4.5vw, 66px);
  box-sizing: border-box;
}
html[data-home-motion="enhanced"] #landing h2 {
  font: 640 clamp(37px, 4.2vw, 65px)/1.18 var(--font-display);
  letter-spacing: -.055em;
  color: #f6f6f4;
}
html[data-home-motion="enhanced"] #landing .landing-copy p {
  margin: 16px 0 0;
  color: #cbd0d2;
  line-height: 1.75;
}
html[data-home-motion="enhanced"] #landing .landing-actions {
  box-sizing: border-box;
  width: auto;
  gap: 12px;
  margin: 0 clamp(16px, 2.2vw, 32px) clamp(16px, 2.2vw, 32px);
}
html[data-home-motion="enhanced"] #landing .landing-actions .task-card {
  --tint: #c7e5e8;
  box-sizing: border-box;
  display: grid;
  grid-template: auto 1fr / minmax(0, 1fr) auto;
  align-items: start;
  min-height: 164px;
  padding: clamp(17px, 1.6vw, 24px);
  border: 1px solid #ffffff30;
  border-radius: 19px;
  background: linear-gradient(128deg, #3e4245a6, #26282aa8 65%, #252729be);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px #ffffff10, 0 7px 19px #0003;
}
html[data-home-motion="enhanced"] #landing .landing-actions .task-card[hidden] { display: none; }
html[data-home-motion="enhanced"] #landing .task-art {
  grid-area: 1 / 1;
  box-sizing: border-box;
  width: 39px;
  height: 39px;
  border: 1px solid #ffffff35;
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff15, #ffffff04);
  box-shadow: inset 0 1px #ffffff15;
}
html[data-home-motion="enhanced"] #landing .task-art svg {
  width: 22px; height: 22px;
  fill: none; stroke: #e6ebed; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
html[data-home-motion="enhanced"] #landing .task-copy { grid-area: 2 / 1 / 3 / -1; padding: 16px 0 0; gap: 3px; }
html[data-home-motion="enhanced"] #landing .task-copy small { color: #c2c6c8; }
html[data-home-motion="enhanced"] #landing .task-arrow {
  grid-area: 1 / 2;
  margin: 0; width: 28px; height: 28px;
  background: transparent; border: 0; color: #cdd4d6;
}
/* The two compatibility templates keep their own navigation and control layout. */
html:not([data-home-motion="enhanced"]) body {
  background: #131516;
}
html:not([data-home-motion="enhanced"]) body::before { display: none; }
html:not([data-home-motion="enhanced"]) body > header {
  background: #191b1d;
  border-color: #363a3b;
}
html:not([data-home-motion="enhanced"]) body :is(.account-strip, .account-button, a#resumeWorkbenchLink, #feedbackOpen) {
  border-color: #505759;
  background: #262a2c;
  color: #e9edef;
}
html:not([data-home-motion="enhanced"]) .account-strip :is(strong, .account-button) { color: #f1f4f4; }
html:not([data-home-motion="enhanced"]) .account-strip :is(p, .account-link) { color: #c5ccce; }
html:not([data-home-motion="enhanced"]) .account-strip .account-dot { background: #bbd4d8; box-shadow: 0 0 0 6px #343d40; }
html:not([data-home-theme]) #landing {
  box-sizing: border-box;
  width: min(1200px, calc(100% - 28px));
  min-height: auto;
  margin: 20px auto;
}
html[data-home-motion="static"] #landing .landing-hero,
html:not([data-home-theme]) #landing {
  border: 1px solid #ffffff2b;
  border-radius: 22px;
  padding: clamp(20px, 3vw, 44px);
  color: #f3f5f5;
  background: linear-gradient(100deg, #151719ed 10%, #17191baf 55%, #17191b57),
    #1b1d20 url("/assets/thesis-glass-book.webp?v=20261205") center / cover no-repeat;
}
html:not([data-home-motion="enhanced"]) #landing h2,
html:not([data-home-motion="enhanced"]) #landing h2 span {
  color: #f2f5f5;
  background: none;
  -webkit-text-fill-color: currentColor;
}
html:not([data-home-motion="enhanced"]) #landing p { color: #c3cbce; }
html:not([data-home-motion="enhanced"]) #landing .landing-actions button {
  border: 1px solid #ffffff38;
  border-radius: 15px;
  color: #f0f4f4;
  background: #2a2e30ef;
  box-shadow: inset 0 1px #ffffff10;
}
html:not([data-home-motion="enhanced"]) #landing .landing-actions button:is(:hover, :focus-visible) {
  background: #394043; border-color: #b9d6da;
}
@supports (mask-composite: exclude) {
  html[data-home-motion="enhanced"] #landing .landing-actions .task-card::after {
    padding: 1px;
    background: conic-gradient(from var(--task-edge-angle), transparent 0 48%, #92d2de77 58%, #bbf1fa 66%, #d1b5ec 73%, #dcc69d88 81%, transparent 90%);
  }
  html[data-home-motion="enhanced"] #landing .landing-actions #practiceHomeEntry::after {
    opacity: .55;
  }
  html[data-home-motion="enhanced"] #landing .landing-actions #practiceHomeEntry:is(:focus-visible, :active)::after {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: no-preference) {
  html[data-home-motion="enhanced"] #landing .landing-actions .task-card:focus-visible::after {
    animation: task-edge-travel 6s linear infinite;
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html[data-home-motion="enhanced"] #landing .landing-actions .task-card:hover::after {
    animation: task-edge-travel 6s linear infinite;
  }
}

/* Shared paper workflows and account panels, including the static home theme. */
html:root body #workflowShell {
  --work-bg: #232628;
  --work-field: #17191a;
  --work-edge: #494e50;
  --work-ink: #f3f5f5;
  --work-muted: #bac1c3;
  --work-link: #bddeea;
  --work-blue: #d7e4e5;
}
html[data-home-motion="enhanced"] #workflowShell .stepper {
  background: #1c1e20; border-color: #ffffff25;
}
html[data-home-motion="enhanced"] #workflowShell .step-item.active {
  background: linear-gradient(125deg, #3b4447, #283134);
  border-color: #6e898f;
  color: #f2f7f8;
}
html[data-home-motion="enhanced"] #workflowShell .step-item.active .step-index {
  color: #dbf4f6; background: #42595c;
}
html[data-home-motion="enhanced"] #templatePanel .template-sheet {
  background: radial-gradient(ellipse at 55% 55%, #42494b, #2c3032 54%, #242729);
}
html[data-home-motion="enhanced"] #inputPanel .paper-dropzone {
  background: linear-gradient(145deg, #2a3032, #202425);
  border-color: #697879;
}
html[data-home-motion="enhanced"] #workflowShell :is(.status, .rules, .preview) { background: #151819; }
html[data-home-motion="enhanced"] #workflowShell .progress-bar { background: #a9d4d6; }
html[data-home-motion="enhanced"] #workflowShell .status:not(.error) { border-left-color: #95c4cb; }
html[data-home-motion="enhanced"] #workflowShell :is(#templateNextButton, #generateButton, #aiButton),
html:root body #accountDialog #accountSubmit, html:root body #feedbackModal #feedbackSubmit {
  min-height: 45px; color: #192023; background: #e0e8e8;
  border: 1px solid #f1f5f5a3; border-radius: 999px;
  box-shadow: inset 0 1px #fff5, 0 2px 10px #0003; font-weight: 650;
}
html[data-home-motion="enhanced"] #workflowShell :is(#templateNextButton, #generateButton, #aiButton):hover:enabled,
html:root body #accountDialog #accountSubmit:hover:enabled, html:root body #feedbackModal #feedbackSubmit:hover:enabled {
  color: #12181a; background: #f4f9f9; border-color: white;
}
html:root body :is(#accountDialog, #accountHistoryDialog), html:root body #feedbackModal .feedback-card {
  background: linear-gradient(135deg, #313436f5, #202224fa 72%);
  border: 1px solid #ffffff32; border-radius: 23px; color: #f1f4f4;
  box-shadow: inset 0 1px #ffffff18, 0 25px 80px #0008;
}
html:root body :is(#accountDialog, #accountHistoryDialog)::backdrop { background: #080a0bb3; }
html:root body #feedbackModal { background: #080a0bb3; }
html:root body :is(#accountDialog, #accountHistoryDialog) .account-eyebrow { color: #adcbd1; }
html:root body #accountDialog .account-tabs { background: #131617; border-color: #ffffff28; }
html:root body #accountDialog .account-tabs button[aria-pressed="true"] { background: #374144; color: #f4f7f7; }
html:root body #accountDialog :is(#accountForgot, #accountBack, #accountResend),
html:root body #accountHistoryList a { color: #c0dfe3; }
html:root body #accountHistoryList li { background: #25292a; border-color: #444a4c; }
html:root body #accountDialog input, html:root body #feedbackModal :is(input, select, textarea) {
  background: #17191a; color: #f3f5f5; border-color: #596165; border-radius: 12px;
}
html:root body :is(#accountDialog, #accountHistoryDialog) :is(.account-subtitle, .account-footnote),
html:root body #feedbackModal .feedback-head p { color: #b9c1c3; }
html:root body :is(#accountDialog, #accountHistoryDialog, #feedbackModal) :is(button, a, input, select, textarea):focus-visible,
html[data-home-motion="enhanced"] #workflowShell :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid #b8e2ed; outline-offset: 3px;
}
@media (prefers-reduced-motion: no-preference) {
  html:root body :is(#accountDialog, #accountHistoryDialog) {
    opacity: 0;
    translate: 0 9px;
    transition: opacity .18s ease, translate .22s cubic-bezier(.2,.78,.2,1),
      display .22s allow-discrete, overlay .22s allow-discrete;
  }
  html:root body :is(#accountDialog, #accountHistoryDialog)[open] {
    opacity: 1;
    translate: 0 0;
  }
  html:root body :is(#accountDialog, #accountHistoryDialog)::backdrop {
    opacity: 0;
    transition: opacity .18s ease, display .2s allow-discrete, overlay .2s allow-discrete;
  }
  html:root body :is(#accountDialog, #accountHistoryDialog)[open]::backdrop { opacity: 1; }
  html:root body #feedbackModal {
    opacity: 1;
    transition: opacity .18s ease, display .18s allow-discrete;
  }
  html:root body #feedbackModal.hidden { opacity: 0; pointer-events: none; }
  @starting-style {
    html:root body :is(#accountDialog, #accountHistoryDialog)[open] { opacity: 0; translate: 0 9px; }
    html:root body :is(#accountDialog, #accountHistoryDialog)[open]::backdrop,
    html:root body #feedbackModal:not(.hidden) { opacity: 0; }
  }
  html[data-home-motion="enhanced"] #workflowShell :is(#templateNextButton, #generateButton, #aiButton),
  html:root body #accountDialog #accountSubmit, html:root body #feedbackModal #feedbackSubmit {
    transition: scale .13s ease, background-color .18s ease, box-shadow .18s ease;
  }
  html[data-home-motion="enhanced"] #workflowShell :is(#templateNextButton, #generateButton, #aiButton):active:enabled,
  html:root body #accountDialog #accountSubmit:active:enabled,
  html:root body #feedbackModal #feedbackSubmit:active:enabled { scale: .975; }
}

@media (max-width: 900px) {
  html[data-home-motion="enhanced"] #landing, html[data-home-theme="editorial"][data-home-motion="enhanced"] body > header {
    width: calc(100% - 40px);
  }
}
@media (max-width: 670px) {
  html[data-home-theme="editorial"][data-home-motion="enhanced"] body > header {
    width: calc(100% - 28px);
    min-height: 56px;
    padding: 6px 0 !important;
    gap: 0 8px;
  }
  html[data-home-motion="enhanced"] #landing { width: calc(100% - 22px); padding: 14px 0 8px; }
  html[data-home-motion="enhanced"] #landing .landing-hero {
    border-radius: 21px;
    background: linear-gradient(90deg, #111415e0 0%, #11141590 56%, #11141516),
      linear-gradient(0deg, #131617 23%, transparent 77%),
      #181b1c url("/assets/thesis-glass-book.webp?v=20261205") 62% top / auto 265px no-repeat;
  }
  html[data-home-motion="enhanced"] #landing .landing-copy {
    min-height: 173px; padding: 26px 18px 18px;
  }
  html[data-home-motion="enhanced"] #landing h2 { font-size: clamp(28px, 7.1vw, 38px); }
  html[data-home-motion="enhanced"] #landing .landing-copy p { font-size: 13px; margin: 10px 0 0; }
  html[data-home-motion="enhanced"] #landing .landing-actions { margin: 0 10px 10px; gap: 8px; }
  html[data-home-motion="enhanced"] #landing .landing-actions .task-card {
    grid-template: auto / auto minmax(0, 1fr) auto;
    gap: 11px; align-items: center; min-height: 78px; padding: 12px; border-radius: 15px;
  }
  html[data-home-motion="enhanced"] #landing .task-art { grid-area: 1 / 1; width: 35px; height: 35px; }
  html[data-home-motion="enhanced"] #landing .task-copy { grid-area: 1 / 2; padding: 0; }
  html[data-home-motion="enhanced"] #landing .task-arrow { grid-area: 1 / 3; width: 19px; }
  html[data-home-motion="enhanced"] #landing .landing-trust { margin-top: 12px; }
  html:root body :is(#workflowShell, #accountDialog, #feedbackModal) :is(input:not([type="checkbox"], [type="radio"]), select, textarea) {
    font-size: 16px;
  }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  html[data-home-theme="editorial"][data-home-motion="enhanced"] {
    --glass-blur: none;
    --glass-surface: var(--glass-solid);
  }
  html[data-home-motion="enhanced"] #landing .landing-actions .task-card { backdrop-filter: none; background: #272b2d; }
}
@media (forced-colors: active) {
  html[data-home-theme="editorial"][data-home-motion="enhanced"] {
    --glass-blur: none; --glass-surface: Canvas; --glass-line: CanvasText; --glass-shadow: none;
  }
  html[data-home-motion="enhanced"] #landing .landing-hero { background: Canvas; }
  html[data-home-motion="enhanced"] #landing .landing-actions .task-card { border: 1px solid ButtonText; }
  html[data-home-motion="enhanced"] #landing .task-art svg { stroke: ButtonText; }
}
