/* Final presentation layer: plain paper, visible controls and functional color. */
:root {
  --bg: #ffffff;
  --paper: #ffffff;
  --ink: #222222;
  --muted: #555555;
  --line: #b8b8b8;
  --accent: #244e70;
  --accent-strong: #173a58;
  --accent-soft: #eef3f8;
  --shadow: none;
}

/* Decorations never compete with text or form controls, including old screens. */
body, body *, body *::before, body *::after {
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  backdrop-filter: none !important;
  border-radius: 0 !important;
  transition: none !important;
}
body { background: white; color: var(--ink); font-size: 18px; line-height: 1.85; }
a { color: #164c86; text-decoration: underline; text-underline-offset: 3px; }
.shell { width: min(1200px, calc(100% - 48px)); padding: 20px 0 32px; }
h1, h2, h3, h4, h5, h6 { letter-spacing: 0; }
.app-header { padding-bottom: 16px; margin-bottom: 22px; border-bottom: 2px solid #777; }
.app-header h1 { color: var(--ink); font-size: 28px; line-height: 1.3; }
.app-header .brand-link { text-decoration: none; }
.brand-caption { color: var(--muted); font-size: 14px; }
.app-header .topnav { gap: 4px; background: transparent; padding: 0; }
.app-header .topnav a { color: #164c86; background: white; text-decoration: underline; border: 1px solid transparent; }
.app-header .topnav a[aria-current="page"] { color: var(--ink); background: #f1f1f1; border-color: #999; text-decoration: none; font-weight: 600; }
.app-header .header-login { color: var(--ink); background: #f3f3f3; border: 1px solid #888; text-decoration: none; }
.account-menu > summary { color: var(--ink); }
.account-popover { border-color: #777; background: white; }
.account-popover a { text-decoration: underline; }
.card { background: white; border-color: var(--line); }
.form-card, .result-card, .trial-card { padding: 24px; }
.section-head h2 { font-size: 26px; line-height: 1.5; }
.section-head p { color: var(--muted); font-size: 18px; }
.form-card > .section-head, .result-card > .section-head { border-bottom-color: #aaa; }
.input-step { border-top-color: #bbb; }
.input-step-heading { color: var(--ink); font-size: 21px; }
.learning-editor { border-color: #777; }
.learning-editor .ProseMirror { font-size: 18px; line-height: 1.95; }
.learning-editor:focus-within:not(.has-error) { outline: 2px solid #1b5592; outline-offset: 1px; }
.math-toolbar { background: #f3f3f3; border-bottom-color: #aaa; }
.math-toolbar button { border: 1px solid transparent; }
.math-toolbar button:hover { background: white; border-color: #888; }
.primary, .auth-link, .landing-actions .primary, .page-heading .page-primary-action {
  background: var(--accent); color: white; border: 1px solid var(--accent-strong);
  font-size: 18px; min-height: 52px; text-decoration: none;
}
.primary:hover:not(:disabled), .auth-link:hover { background: var(--accent-strong); opacity: 1; }
.secondary, .ocr-button, .history-search-controls button, .quote-all,
.question-examples button, .selected-photo-actions button,
.draft-recovery-actions a, .draft-recovery-actions button {
  border: 1px solid #888; background: #f6f6f6; color: var(--ink);
  font-size: 16px; min-height: 44px;
}
.secondary:hover:not(:disabled), .ocr-button:hover:not(:disabled) { background: #eaeaea; border-color: #666; }
.secondary.danger { color: #8b2222; border-color: #a36d6d; background: #fff7f7; }
.study-next-actions .link-button, .draft-recovery-actions .link-button { text-decoration: none; }
:where(a, button, summary, input, select, textarea):focus-visible {
  outline: 2px solid #1b5592 !important; outline-offset: 2px;
}
.study-mode-options span { border-color: #888; }
.study-tabs { background: white; border-bottom: 1px solid #888; gap: 4px; }
.study-tabs button { background: #f3f3f3; border: 1px solid #aaa; color: var(--ink); }
.study-tabs button[aria-selected="true"] { background: white; border-color: #444; border-bottom: 3px solid #444; color: var(--ink); font-weight: 600; }
.field:has(> input[type="file"]) { background: #fafafa; border-style: solid; border-color: #bbb; }
input[type="file"]::file-selector-button { background: #f3f3f3; border-color: #888; color: var(--ink); }
input[type="text"], input[type="email"], input[type="search"], select, textarea { border-color: #888; }
.history-item { border-color: #aaa; background: white; }
.history-search { background: #f7f7f7; border-color: #bbb; }
.history-session-grid, .draft-card-grid { gap: 16px; }
.history-item-links .link-button { color: #164c86; text-decoration: underline; }
.review-filters a { border: 1px solid #999; background: #f5f5f5; color: var(--ink); }
.review-filters a[aria-current="page"] { background: #e6e6e6; color: var(--ink); border-color: #555; font-weight: 600; }
.learning-review, .turn-problem-snapshot, .problem-history, .comparison-grid > * { border-color: #bbb; }
.feedback-questions { border-color: #aaa; background: white; }
.quote-selection-toolbar { border: 1px solid #777; }
.submission-progress-card { border: 1px solid #888; background: white; }
.ocr-review { border-color: #777; }
.score-ring { width: auto; height: auto; display: inline-flex; gap: 6px; padding: 8px 0; background: white; }
.score-ring strong { font-size: 28px; }
.site-footer { border-top: 1px solid #aaa; }
.site-footer > p { color: var(--muted); }

/* The start page explains the task without a promotional hero or extra cards. */
.landing-intro { padding: 0 0 24px; gap: 32px; align-items: start; }
.landing-main { border: 0; padding: 0; }
.landing-main h2 { font-size: 30px; margin: 0 0 16px; line-height: 1.5; }
.landing-description { color: var(--ink); font-size: 18px; line-height: 1.85; }
.landing-actions { margin: 20px 0 12px; }
.landing-example { border: 1px solid #bbb; padding: 16px 20px; background: #fafafa; }
.workflow-heading { font-size: 21px; margin: 0 0 16px; }
.trial-steps li { padding-bottom: 16px; }
.trial-steps li:last-child { padding-bottom: 0; }
.landing-reference { border-top: 1px solid #aaa; border-bottom: 1px solid #aaa; margin-bottom: 24px; }
.landing-reference > summary { padding: 14px 0; min-height: 48px; cursor: pointer; font-size: 18px; font-weight: 600; }
.landing-samples { padding: 12px 0 24px; }
.landing-samples .section-head h2, .trial-notes > h2 { font-size: 24px; }
.landing-sample-card { border-top-color: #aaa; }
.landing-sample-card dl div { background: transparent; border-color: #ddd; }
.trial-notes { padding: 0; border-top: 0; }
.trial-notes > h2 { margin-top: 0; }

@media (max-width: 760px) {
  .landing-intro { gap: 20px; }
  .landing-example { padding: 16px; border-top: 1px solid #bbb; }
  .landing-main h2 { font-size: 28px; }
  .landing-example .trial-steps { display: block; }
  .trial-steps li { padding-bottom: 16px; }
}
@media (max-width: 700px) {
  .shell { width: calc(100% - 28px); padding-top: 14px; }
  .app-header { gap: 10px 12px; }
  .app-header h1 { font-size: 26px; }
  .app-header .topnav a { min-width: 0; padding: 8px 12px; }
  .app-header .header-login { font-size: 14px; padding: 8px 10px; }
  .form-card, .result-card, .trial-card { padding: 18px; }
  .section-head h2 { font-size: 25px; }
  .study-tabs { top: 0; }
}
@media (max-width: 360px) {
  .shell { width: calc(100% - 20px); }
  .app-header .topnav a { padding: 8px 10px; }
  .form-card, .result-card, .trial-card { padding: 14px; }
  .landing-main h2 { font-size: 26px; }
}
