/* Shared visual system, taken from Continue Learning. Load after page layouts. */
:root {
  color-scheme: light;
  --lt-blue: #2465eb;
  --lt-ink: #182846;
  --lt-muted: #64738c;
  --lt-line: #e2e8f1;
  --lt-bg: #f7f9fc;
  --lt-soft: #edf3ff;
  --lt-hero: linear-gradient(115deg, #edf4ff 0%, #f3f7ff 60%, #e5efff 100%);
}
body.app-page {
  --bg: var(--lt-bg);
  --ink: var(--lt-ink);
  --muted: var(--lt-muted);
  --line: var(--lt-line);
  --brand: var(--lt-blue);
  --purple: var(--lt-soft);
  --memory-blue: var(--lt-blue);
  --memory-line: var(--lt-line);
  --memory-muted: var(--lt-muted);
  --p-blue: var(--lt-blue);
  --p-ink: var(--lt-ink);
  --p-muted: var(--lt-muted);
  --p-line: var(--lt-line);
  margin: 0;
  background: var(--lt-bg);
  color: var(--lt-ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.65;
}
.app-page * { box-sizing: border-box; }
.app-page a { color: var(--lt-blue); text-decoration: none; }
.app-page a:hover { text-decoration: underline; }
.app-page :is(button, input, select, textarea) { font: inherit; }
body.app-page :focus-visible { outline: 3px solid #628efa; outline-offset: 4px; }
.app-page :is(h1, h2, h3) { color: var(--lt-ink); line-height: 1.35; letter-spacing: -.5px; }
.app-page h1 { font-size: 34px; font-weight: 750; }
.app-page .eyebrow { color: var(--lt-blue); font-size: 10px; letter-spacing: 1.7px; font-weight: 700; }
.app-page :is(.lt-container, .shell, .memory-container, .p-container) {
  width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 36px;
}
.app-page .shell { padding-top: 28px; padding-bottom: 28px; }
.lt-header { background: #fff; border-bottom: 1px solid var(--lt-line); }
.lt-header nav { min-height: 76px; display: flex; align-items: center; gap: 42px; }
.app-page .lt-brand {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  font-size: 22px; font-weight: 800; letter-spacing: -.7px; color: var(--lt-ink);
  text-decoration: none;
}
.lt-brand span {
  width: 29px; height: 32px; line-height: 32px; text-align: center;
  background: var(--lt-blue); color: #fff; border-radius: 9px; font-size: 21px;
}
.lt-nav { display: flex; align-items: center; gap: 26px; flex: 1; min-width: 0; }
.app-page .lt-nav a {
  font-size: 13px; color: var(--lt-muted); padding: 26px 0;
  border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none;
}
.app-page .lt-nav a:hover { color: var(--lt-blue); }
.app-page .lt-nav a[aria-current] { color: var(--lt-blue); border-color: var(--lt-blue); font-weight: 650; }
.lt-local { font-size: 10px; letter-spacing: 1.8px; color: #8d9ab0; }
.app-page :is(.page-footer, .memory-footer, .p-footer) {
  border: 0; padding-top: 30px; padding-bottom: 28px; margin-top: 0;
  font-size: 11px; color: #8995a8; text-align: center;
}
.app-page :is(.card, .memory-panel, .memory-empty, .history-lesson) {
  border-color: var(--lt-line); border-radius: 14px; background: #fff;
  box-shadow: 0 3px 10px #18284603;
}
.app-page :is(.badge.p1, .memory-badge.issue) { color: #b45c4c; background: #fff0ed; }
.app-page .badge.p2 { color: #a7680c; background: #fff3d8; }
.app-page .badge.p3 { color: #147d51; background: #e5f5ec; }
.app-page :is(.badge, .memory-badge) { border-radius: 5px; }

/* Lesson Insight: keep its evidence layout, with the same blue surfaces and ranks. */
.insight-page .hero { background: var(--lt-hero); border-color: #dde8fb; border-radius: 20px; padding: 30px; }
.insight-page .hero-symbol { background: #dfeaff; color: var(--lt-blue); }
.insight-page .hero-landscape { display: none; }
.insight-page .focus-chips a:nth-child(n) { background: var(--lt-soft); color: #4d72af; border-radius: 5px; }
.insight-page .focus-number,
.insight-page .focus-card:nth-child(n) .focus-number {
  width: 37px; height: 37px; border-radius: 11px;
  background: var(--lt-soft); color: var(--lt-blue); font-size: 21px;
}
.insight-page .section-icon, .insight-page .section-icon.pink { color: var(--lt-blue); }
.insight-page .section-icon.green { color: #168c4c; }
.insight-page .why-note>span { color: var(--lt-blue); }
.insight-page .lesson-sidebar #practice { background: var(--lt-hero); border-color: #dde8fb; border-radius: 14px; }
.insight-page :is(.expression, .why-note) { background: #f7f9fd; }
.insight-page .expression.recommended { background: #edf7f1; }
.insight-page .evidence-reference { border-color: #d7e3f7; }
.insight-page :is(.quiet-button, .date-link) { background: #fff; border-color: var(--lt-line); color: var(--lt-blue); border-radius: 9px; }
.insight-page .supporting-quote { background: #f3f7ff; border-color: #b9d1f9; }
.insight-page .drawer-header button { border-color: var(--lt-line); background: #fff; color: var(--lt-blue); border-radius: 9px; }
.insight-page .drawer-header button:hover { background: var(--lt-soft); }

/* History, revision browsing, and Learning Memory share controls and headings. */
.history-page .history-heading { padding: 12px 0 4px; }
.history-page .history-heading h1 { font-size: 34px; font-weight: 750; }
.history-page .is-active select,
.history-page .date-filter.is-active>summary { background: var(--lt-soft); border-color: #b9d1f9; color: var(--lt-blue); }
.history-page .history-lesson .insight-link { background: var(--lt-blue); color: #fff; border-radius: 9px; padding: 10px 16px; }
.history-page .history-lesson .insight-link:hover { background: #1755d3; }
.app-page :is(.history-filters, .memory-filters) :is(input, select, button) { border-radius: 9px; }
.memory-page-heading { padding-top: 40px; }
.memory-page .memory-page-heading h1 { font-size: 34px; }
.memory-page .memory-filters {
  padding: 12px; background: #fff; border: 1px solid var(--lt-line); border-radius: 12px;
}
.memory-page .memory-filters button { background: var(--lt-blue); color: #fff; border-color: var(--lt-blue); }
.memory-page .memory-row { background: #fff; padding: 20px; border: 1px solid var(--lt-line); border-radius: 14px; margin-bottom: 12px; }
.memory-page .memory-row:hover { background: #f3f7ff; border-color: #b9d1f9; }
.memory-page .memory-badge.skill { background: var(--lt-soft); color: #4d72af; }
.memory-page .memory-totals>div { border-radius: 12px; }

/* Import uses the same shell while keeping its review controls and status regions. */
.import-page main.lt-container { margin-top: 0; padding-top: 40px; padding-bottom: 40px; }
.import-page .import-heading { margin-bottom: 28px; }
.import-page .import-heading h1 { margin: 9px 0 12px; }
.import-page .import-heading>p:last-child { color: var(--lt-muted); }
.import-page section { border: 1px solid var(--lt-line); border-radius: 14px; padding: 28px; margin: 24px 0; background: #fff; }
.import-page #drop { border: 1px dashed #b9cdeb; border-radius: 20px; background: var(--lt-hero); padding: 36px; }
.import-page #drop.drag { border-color: var(--lt-blue); background: #e5efff; }
.import-page button { background: var(--lt-blue); color: #fff; border: 1px solid var(--lt-blue); border-radius: 9px; padding: 12px 22px; font-weight: 600; }
.import-page button:hover { background: #1755d3; }
.import-page #operation { border-color: var(--lt-line); border-radius: 9px; padding: 10px 14px; }
.import-page :is(dt, .footnote) { color: var(--lt-muted); }
.import-page pre { background: #f7f9fd; border-radius: 9px; }
.import-page details { border-color: var(--lt-line); }
.import-page input[type=file]::file-selector-button {
  font: inherit; padding: 9px 14px; margin-right: 12px; border-radius: 9px;
  border: 1px solid #b9d1f9; background: #fff; color: var(--lt-blue); cursor: pointer;
}
.import-page .skip-link { position: absolute; left: 16px; top: -80px; padding: 10px 16px; background: #fff; z-index: 10; }
.import-page .skip-link:focus { top: 10px; }
@media (max-width: 1000px) {
  .app-page :is(.lt-container, .shell, .memory-container, .p-container) { padding-inline: 24px; }
  .lt-header nav { gap: 24px; }
  .lt-nav { gap: 18px; }
  .lt-local { display: none; }
  .app-page h1, .history-page .history-heading h1, .memory-page .memory-page-heading h1 { font-size: 29px; }
}
@media (max-width: 700px) {
  .app-page :is(.lt-container, .shell, .memory-container, .p-container) { padding-inline: 18px; }
  .lt-header nav { flex-wrap: wrap; gap: 0; padding-top: 14px; }
  .app-page .lt-brand { font-size: 20px; }
  .lt-nav { width: 100%; flex: auto; justify-content: space-between; gap: 10px; overflow-x: auto; }
  .app-page .lt-nav a { padding: 16px 0; font-size: 11px; }
  .app-page h1, .history-page .history-heading h1, .memory-page .memory-page-heading h1 { font-size: 27px; }
  .app-page .shell { padding-top: 20px; }
  .insight-page .hero { padding: 24px 22px; }
  .memory-page .memory-filters { padding: 12px; }
  .memory-page .memory-row { padding: 18px; }
  .import-page main.lt-container { padding-top: 24px; }
  .import-page #drop, .import-page section { padding: 22px 18px; }
  .import-page input[type=file] { font-size: 12px; }
}
