/* =====================================================================
   eAdhyapak design system v4 — "ink & notebook"
   Ink-blue for action, highlighter yellow for what matters,
   red pen for corrections. Quiet, precise, built for long study hours.
   ===================================================================== */
:root {
  /* palette */
  --ink: #1f3a8a;           /* royal ink — primary */
  --ink-600: #1a3178;
  --ink-700: #152864;
  --ink-50: #eef2fb;
  --ink-100: #dfe6f7;
  --hl: #ffe566;            /* highlighter */
  --hl-soft: #fff6c7;
  --redpen: #c8372d;        /* teacher's red pen */
  --redpen-soft: #fbeceb;
  --green: #1d7a4f;
  --green-soft: #e8f4ee;
  --amber: #a35c00;
  --amber-soft: #fdf1df;

  /* neutrals (cool paper, graphite text) */
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #f2f4f8;
  --surface-3: #e9edf3;
  --rule: #e3e7ef;          /* hairlines / notebook ruling */
  --rule-strong: #cdd4e1;
  --text: #1c2130;
  --text-2: #3d4558;
  --muted: #6b7386;
  --faint: #9aa1b1;

  /* legacy aliases used by page markup */
  --brand: var(--ink);
  --brand-soft: var(--ink-50);
  --brand-ink: #ffffff;
  --accent: var(--redpen);
  --accent-soft: var(--redpen-soft);
  --border: var(--rule);
  --border-strong: var(--rule-strong);
  --ink-2: var(--text-2);
  --success: var(--green);
  --success-soft: var(--green-soft);
  --danger: var(--redpen);
  --danger-soft: var(--redpen-soft);
  --warn: var(--amber);
  --warn-soft: var(--amber-soft);

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(20, 30, 60, .05);
  --shadow: 0 1px 2px rgba(20, 30, 60, .04), 0 4px 16px rgba(20, 30, 60, .06);
  --shadow-lg: 0 2px 6px rgba(20, 30, 60, .06), 0 18px 48px rgba(20, 30, 60, .14);
  --focus: 0 0 0 3px rgba(31, 58, 138, .22);

  --font: "Instrument Sans", "Mukta", "Mukta Mahee", "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Schibsted Grotesk", "Instrument Sans", "Mukta", "Mukta Mahee", system-ui, sans-serif;
  --font-pen: "Caveat", "Segoe Print", cursive;

  --sidebar-w: 248px;
  --topbar-h: 60px;
  color-scheme: light only;
}


/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; font-feature-settings: "ss01" 1;
}
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text); line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.018em; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
h3 { font-size: 1.08rem; letter-spacing: -.01em; }
h4 { font-size: .98rem; }
p { margin: 0 0 1em; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
small, .small { font-size: .84rem; }
.muted { color: var(--muted); }
.ink2 { color: var(--text-2); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 1.5rem 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; background: var(--surface-2); padding: .12em .4em; border-radius: 5px; }
::selection { background: var(--hl); color: #1c2130; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.hl { background: linear-gradient(transparent 52%, var(--hl) 52%, var(--hl) 92%, transparent 92%); padding: 0 .12em; color: inherit; }
.pen { font-family: var(--font-pen); color: var(--redpen); font-weight: 600; }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 760px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } .container { padding: 0 16px; } }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: 600 .9rem/1 var(--font); letter-spacing: -.005em; cursor: pointer; white-space: nowrap; user-select: none;
  text-decoration: none !important; color: var(--text); background: transparent;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn i { font-size: .9em; }
.btn:disabled, .btn.is-loading { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: inset 0 -1px 0 rgba(0,0,0,.18); }
.btn-primary:hover { background: var(--ink-600); }
.btn-accent { background: var(--redpen); color: #fff; }
.btn-outline { background: var(--surface); border-color: var(--rule-strong); color: var(--text); box-shadow: var(--shadow-sm); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--redpen); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-sm { height: 32px; padding: 0 11px; font-size: .82rem; border-radius: 7px; gap: 6px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: .98rem; border-radius: 10px; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn-block { width: 100%; }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; font-size: .84rem; margin-bottom: 6px; color: var(--text-2); }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--rule-strong);
  background: var(--surface); color: var(--text); font: 400 .93rem var(--font); outline: none;
  transition: border-color .15s, box-shadow .15s; box-shadow: var(--shadow-sm);
}
.textarea { height: auto; min-height: 104px; padding: 10px 12px; line-height: 1.55; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7386' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); box-shadow: var(--focus); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.field { margin-bottom: 16px; }
.field-hint { font-size: .78rem; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; height: 40px; }
.input-prefix { display: flex; align-items: center; padding: 0 12px; background: var(--surface-2); border: 1px solid var(--rule-strong); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); font-weight: 600; color: var(--muted); }
.input-prefix + .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; cursor: pointer; color: var(--text); }
.check input[type=checkbox]:not(.switch input) { width: 16px; height: 16px; accent-color: var(--ink); }
.switch { position: relative; display: inline-block; width: 36px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--rule-strong); border-radius: 20px; transition: .18s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .18s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::before { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: var(--focus); }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.card-lg { padding: 26px; border-radius: var(--radius-lg); }
.card-hover { transition: border-color .15s, box-shadow .15s; }
.card-hover:hover { border-color: var(--rule-strong); box-shadow: var(--shadow); }
.card-title { font-family: var(--font-head); font-weight: 700; font-size: 1rem; letter-spacing: -.01em; margin: 0 0 4px; color: var(--text); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-value { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 500; }
.icon-tile { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font-size: .95rem; flex: none; background: var(--ink-50); color: var(--ink); }
.feature-icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font-size: .95rem; margin-bottom: 12px; background: var(--ink-50) !important; color: var(--ink) !important; }

/* stat strip: one panel split by hairlines */
.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.stat-strip > div { padding: 18px 20px; border-left: 1px solid var(--rule); }
.stat-strip > div:first-child { border-left: 0; }
.stat-strip .sub { font-size: .8rem; color: var(--muted); margin-top: 6px; }
@media (max-width: 860px) { .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat-strip > div:nth-child(3) { border-left: 0; } .stat-strip > div:nth-child(n+3) { border-top: 1px solid var(--rule); } }

/* list rows inside cards */
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--rule); color: var(--text); text-decoration: none !important; }
.list-row:first-child { border-top: 0; }
.list-row:hover .lr-title { color: var(--ink); }
.lr-title { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-meta { font-size: .8rem; color: var(--muted); white-space: nowrap; }

/* ---------- badges/chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; font-size: .74rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap; border: 1px solid transparent; }
.badge-brand { background: var(--ink-50); color: var(--ink); }
.badge-accent { background: var(--hl-soft); color: #6b5400; }
.badge-success { background: var(--green-soft); color: var(--green); }
.badge-danger { background: var(--redpen-soft); color: var(--redpen); }
.badge-warn { background: var(--amber-soft); color: var(--amber); }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); color: var(--text-2); font: 500 .84rem var(--font); cursor: pointer; transition: .15s; white-space: nowrap; text-decoration: none !important; }
.chip i { color: var(--muted); font-size: .85em; }
.chip:hover { border-color: var(--rule-strong); color: var(--text); }
.chip.active { background: var(--ink-50); color: var(--ink); border-color: var(--ink-100); }
.chip.active i { color: var(--ink); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips-scroll { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }

/* ---------- alerts ---------- */
.alert { padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid; font-size: .9rem; display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.alert > i { margin-top: 3px; }
.alert-info { background: var(--ink-50); color: var(--text); border-color: var(--ink-100); }
.alert-info > i { color: var(--ink); }
.alert-success { background: var(--green-soft); color: var(--text); border-color: color-mix(in srgb, var(--green) 25%, transparent); }
.alert-success > i { color: var(--green); }
.alert-danger { background: var(--redpen-soft); color: var(--text); border-color: color-mix(in srgb, var(--redpen) 25%, transparent); }
.alert-danger > i { color: var(--redpen); }
.alert-warn { background: var(--amber-soft); color: var(--text); border-color: color-mix(in srgb, var(--amber) 25%, transparent); }
.alert-warn > i { color: var(--amber); }
.alert a { color: var(--ink); text-decoration: underline; font-weight: 600; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.table th { font-size: .78rem; color: var(--muted); background: var(--surface-2); font-weight: 600; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount-pos { color: var(--green); font-weight: 600; }
.amount-neg { color: var(--text); font-weight: 600; }

/* ---------- logo / wordmark ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none !important; flex-shrink: 0; }
.logo img { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }
.logo .wm { font-family: var(--font-head); font-weight: 800; font-size: 1.22rem; letter-spacing: -.035em; color: var(--text); line-height: 1; }
.logo .wm b { color: var(--ink); font-weight: 800; }

/* ---------- public header/footer ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--rule); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 20px; }
.site-nav { display: flex; gap: 2px; align-items: center; margin-right: auto; margin-left: 16px; }
.site-nav a { padding: 7px 11px; border-radius: 7px; color: var(--text-2); font-weight: 500; font-size: .9rem; }
.site-nav a:hover, .site-nav a.active { color: var(--text); background: var(--surface-2); text-decoration: none; }
.header-actions { display: flex; gap: 6px; align-items: center; }
.nav-toggle { display: none; }
@media (max-width: 900px) {
  .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; margin: 0; background: var(--surface); flex-direction: column; align-items: stretch; padding: 10px 16px 16px; border-bottom: 1px solid var(--rule); box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .header-actions .hide-sm { display: none; }
}
@media (max-width: 480px) {
  .logo .wm { font-size: 1.1rem; }
}
.site-footer { border-top: 1px solid var(--rule); background: var(--surface); color: var(--text-2); padding: 48px 0 28px; }
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: var(--ink); }
.site-footer h4 { font-size: .86rem; color: var(--text); margin-bottom: 12px; }
.site-footer .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .9rem; }
.site-footer .copy { border-top: 1px solid var(--rule); margin-top: 36px; padding-top: 18px; font-size: .82rem; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
@media (max-width: 760px) { .site-footer .footer-grid { grid-template-columns: 1fr 1fr; } .site-footer .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* ---------- landing ---------- */
.lp-hero { padding: 72px 0 80px; border-bottom: 1px solid var(--rule); background:
  linear-gradient(var(--bg), var(--bg)) padding-box; position: relative; overflow: hidden; }
.lp-hero .container { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.lp-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.55rem); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; max-width: 15ch; margin-bottom: 20px; }
.lp-lead { font-size: 1.1rem; line-height: 1.6; color: var(--text-2); max-width: 52ch; margin-bottom: 28px; }
.lp-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.lp-fine { margin-top: 18px; font-size: .88rem; color: var(--muted); }
.lp-exams { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .86rem; color: var(--text-2); font-weight: 600; }
.lp-exams span { white-space: nowrap; }
@media (max-width: 920px) { .lp-hero .container { grid-template-columns: minmax(0, 1fr); gap: 40px; } .lp-hero { padding: 44px 0 52px; } }

/* notebook answer sheet (hero) */
.sheet { position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; }
.sheet-q { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-bottom: 1px solid var(--rule); background: var(--surface-2); }
.sheet-q .who { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-size: .78rem; font-weight: 700; color: var(--text-2); flex: none; }
.sheet-q p { margin: 0; font-size: .95rem; font-weight: 500; }
.ruled {
  --line: 30px;
  background-color: var(--surface);
  background-image:
    linear-gradient(to right, transparent 46px, color-mix(in srgb, var(--redpen) 45%, transparent) 46px, color-mix(in srgb, var(--redpen) 45%, transparent) 47px, transparent 47px),
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--line) - 1px), color-mix(in srgb, var(--ink) 13%, transparent) calc(var(--line) - 1px), color-mix(in srgb, var(--ink) 13%, transparent) var(--line));
  line-height: var(--line);
}
.sheet-a { padding: 8px 22px 22px 64px; font-size: .97rem; color: var(--text); position: relative; }
.sheet-a .who-ai { position: absolute; left: 10px; top: 12px; width: 26px; height: 26px; }
.sheet-a .formula { font-family: "Times New Roman", Georgia, serif; font-size: 1.5rem; font-style: italic; }
.sheet-a p { margin: 0; }
.sheet-note { display: block; width: max-content; max-width: 100%; margin: 4px 0 0 auto; transform: rotate(-3deg); font-family: var(--font-pen); color: var(--redpen); font-size: 1.45rem; line-height: 30px; padding-right: 6px; }
.sheet-foot { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--rule); font-size: .82rem; color: var(--muted); background: var(--surface); }
.sheet-foot b { color: var(--text); font-weight: 600; }
@media (max-width: 520px) { .sheet-a { padding-left: 58px; } }

.lp-section { padding: 88px 0; border-bottom: 1px solid var(--rule); }
.lp-section.alt { background: var(--surface); }
.lp-head { max-width: 640px; margin-bottom: 44px; }
.lp-head h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -.03em; line-height: 1.1; font-weight: 800; }
.lp-head p { color: var(--text-2); font-size: 1.04rem; margin: 0; }

/* tools list (not cards) */
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; }
.tool { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding: 22px 0; border-top: 1px solid var(--rule); color: inherit; text-decoration: none !important; }
.tool:hover h3 { color: var(--ink); }
.tool i { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--ink-50); color: var(--ink); font-size: 1rem; }
.tool h3 { margin: 2px 0 4px; font-size: 1.05rem; }
.tool p { margin: 0; color: var(--text-2); font-size: .94rem; }
@media (max-width: 760px) { .tools { grid-template-columns: minmax(0, 1fr); } }

/* mentor directory */
.mentor-dir { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border: 1px solid var(--rule); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.mentor-dir > div { padding: 20px; border-left: 1px solid var(--rule); }
.mentor-dir > div:first-child { border-left: 0; }
.mentor-dir h4 { font-size: .86rem; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.mentor-dir a { display: flex; gap: 10px; align-items: center; padding: 8px 0; color: var(--text); text-decoration: none !important; }
.mentor-dir a:hover .mn { color: var(--ink); }
.mentor-dir .mn { font-weight: 600; font-size: .92rem; display: block; line-height: 1.25; }
.mentor-dir .me { font-size: .8rem; color: var(--muted); display: block; line-height: 1.3; }
@media (max-width: 1040px) { .mentor-dir { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mentor-dir > div:nth-child(4) { border-left: 0; } .mentor-dir > div:nth-child(n+4) { border-top: 1px solid var(--rule); } }
@media (max-width: 640px) { .mentor-dir { grid-template-columns: minmax(0, 1fr); } .mentor-dir > div { border-left: 0; border-top: 1px solid var(--rule); } .mentor-dir > div:first-child { border-top: 0; } }

/* monogram avatar */
.mono { --c: var(--ink); width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font: 700 .8rem/1 var(--font-head); letter-spacing: -.02em;
  color: var(--c); background: color-mix(in srgb, var(--c) 11%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); }
.mono.sm { width: 28px; height: 28px; font-size: .7rem; }
.mono.lg { width: 56px; height: 56px; font-size: 1.15rem; }

/* languages wall */
.lang-wall { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: baseline; font-family: var(--font-head); font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.lang-wall span { font-size: clamp(1.4rem, 3vw, 2.2rem); line-height: 1.25; }
.lang-wall span:nth-child(3n+2) { color: var(--ink); }
.lang-wall span:nth-child(4n) { color: var(--muted); }

/* receipt */
.receipt { background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; box-shadow: var(--shadow); padding: 26px 26px 20px; font-variant-numeric: tabular-nums; position: relative; }
.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; background: radial-gradient(circle at 6px 0, transparent 6px, var(--surface) 6.5px) repeat-x; background-size: 12px 8px; filter: drop-shadow(0 1px 0 var(--rule)); }
.receipt h3 { font-size: 1rem; margin-bottom: 4px; }
.receipt .r-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--rule-strong); font-size: .94rem; }
.receipt .r-row:first-of-type { border-top: 0; }
.receipt .r-row b { font-weight: 700; }
.receipt .r-total { display: flex; justify-content: space-between; padding-top: 12px; margin-top: 6px; border-top: 2px solid var(--text); font-weight: 700; }
.pricing-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 64px; align-items: start; }
.pricing-split ul { padding-left: 18px; color: var(--text-2); }
.pricing-split li { margin: 8px 0; }
@media (max-width: 860px) { .pricing-split { grid-template-columns: minmax(0, 1fr); gap: 36px; } }

/* faq */
.faq-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 56px; }
@media (max-width: 860px) { .faq-split { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.faq details { border-top: 1px solid var(--rule); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-top: 5px; flex: none; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 9px; }
.faq details p { margin: 10px 0 0; color: var(--text-2); max-width: 64ch; }

.cta-band { background: var(--ink-700); color: #fff; border-radius: var(--radius-lg); padding: 48px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 6px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -.025em; }
.cta-band p { margin: 0; color: rgba(255,255,255,.78); }

/* generic public section helpers (pricing/about/contact pages) */
.section { padding: 64px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-head { max-width: 640px; margin: 0 0 36px; }
.section-head.center, .text-center .section-head { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h1 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); letter-spacing: -.03em; font-weight: 800; }
.section-head p { color: var(--text-2); font-size: 1.04rem; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--muted); }
.price-card { text-align: left; }
.price-card .price { font-family: var(--font-head); font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.mentor-card { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.mentor-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1rem; flex: none; }

/* ---------- auth ---------- */
.auth-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .card { padding: 32px; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.55rem; letter-spacing: -.025em; }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--rule); display: flex; flex-direction: column; padding: 14px 12px; z-index: 60; }
.sidebar .logo { padding: 4px 8px 18px; }
.side-nav { display: flex; flex-direction: column; gap: 1px; flex: 1; overflow-y: auto; }
.side-nav a { display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 7px; color: var(--text-2); font-weight: 500; font-size: .9rem; text-decoration: none; position: relative; }
.side-nav a i { width: 18px; text-align: center; color: var(--faint); font-size: .92rem; }
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a:hover i { color: var(--muted); }
.side-nav a.active { background: var(--ink-50); color: var(--ink); font-weight: 600; }
.side-nav a.active i { color: var(--ink); }
.side-label { font-size: .74rem; color: var(--faint); font-weight: 600; padding: 16px 10px 6px; }
.side-foot { border-top: 1px solid var(--rule); padding-top: 10px; margin-top: 10px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px 10px; }
.side-user .nm { font-weight: 600; font-size: .88rem; line-height: 1.2; }
.side-user .em { font-size: .76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.topbar-title { font-family: var(--font-head); font-weight: 700; font-size: 1rem; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.wallet-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--rule); font-weight: 600; font-size: .88rem; color: var(--text); text-decoration: none !important; font-variant-numeric: tabular-nums; box-shadow: var(--shadow-sm); }
.wallet-pill i { color: var(--ink); font-size: .85rem; }
.wallet-pill.low { border-color: color-mix(in srgb, var(--redpen) 45%, transparent); }
.wallet-pill.low i { color: var(--redpen); }
.wallet-pill:hover { border-color: var(--rule-strong); }
.page { padding: 28px 28px 64px; width: 100%; max-width: 1200px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 1.5rem; margin: 0; letter-spacing: -.025em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.section-title { font-size: 1rem; margin: 32px 0 12px; }
.menu-btn { display: none; }
.scrim { display: none; }
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(10,14,25,.45); z-index: 55; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 12px; }
  .page { padding: 18px 16px 72px; }
  .hide-mobile { display: none !important; }
}

/* dropdown */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 5px; display: none; z-index: 80; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--text-2); font: 500 .88rem var(--font); background: none; border: 0; cursor: pointer; text-align: left; text-decoration: none; }
.dropdown-menu a i { width: 14px; color: var(--ink); }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); color: var(--text); }

/* ---------- toast / modal ---------- */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 420px; }
.toast { pointer-events: auto; background: #1c2130; color: #fff; padding: 10px 14px; border-radius: 9px; font-weight: 500; font-size: .88rem; box-shadow: var(--shadow-lg); animation: toastIn .18s ease; display: flex; gap: 10px; align-items: center; }
.toast.error i { color: #ff8a80; }
.toast.success i { color: #6ee7a8; }
@keyframes toastIn { from { opacity: 0; transform: translateY(6px); } }
.modal { position: fixed; inset: 0; z-index: 150; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(10,14,25,.5); backdrop-filter: blur(3px); }
.modal.open { display: flex; }
.modal-box { background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto; padding: 24px; box-shadow: var(--shadow-lg); border: 1px solid var(--rule); animation: toastIn .16s ease; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-head h3 { margin: 0; }

/* ---------- prose (AI output) ---------- */
.prose { font-size: .97rem; line-height: 1.72; color: var(--text); overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 1.4em 0 .5em; letter-spacing: -.015em; }
.prose h1 { font-size: 1.3rem; } .prose h2 { font-size: 1.16rem; } .prose h3 { font-size: 1.04rem; } .prose h4 { font-size: .97rem; }
.prose p { margin: 0 0 .85em; }
.prose ul, .prose ol { margin: 0 0 .9em; padding-left: 1.35em; }
.prose li { margin: .28em 0; }
.prose li::marker { color: var(--faint); }
.prose li > p { margin: 0 0 .3em; }
.prose strong { font-weight: 650; color: var(--text); }
.prose mark { background: linear-gradient(transparent 50%, var(--hl) 50%); color: inherit; }
.prose blockquote { margin: 1em 0; padding: 8px 14px; border-left: 3px solid var(--ink); background: var(--ink-50); border-radius: 0 8px 8px 0; color: var(--text-2); }
.prose table { display: block; width: max-content; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1em 0; font-size: .9rem; }
.prose th, .prose td { border: 1px solid var(--rule-strong); padding: 7px 11px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 600; }
.prose pre { background: #12172a; color: #e6edf7; padding: 14px; border-radius: 10px; overflow-x: auto; font-size: .85rem; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose hr { margin: 1.3em 0; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose .katex-display { overflow-x: auto; overflow-y: hidden; padding: 6px 0; }

/* ---------- chat ---------- */
.chat-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); height: calc(100vh - var(--topbar-h)); height: calc(100dvh - var(--topbar-h)); }
.conv-panel { border-right: 1px solid var(--rule); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.conv-panel-head { padding: 12px; border-bottom: 1px solid var(--rule); }
.conv-list { flex: 1; overflow-y: auto; padding: 6px; }
.conv-item { display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 9px; border-radius: 7px; color: var(--text-2); cursor: pointer; font-size: .87rem; text-decoration: none !important; }
.conv-item i { color: var(--faint) !important; font-size: .8rem; width: 14px; text-align: center; }
.conv-item:hover { background: var(--surface-2); color: var(--text); }
.conv-item.active { background: var(--ink-50); color: var(--ink); font-weight: 600; }
.conv-item.active i { color: var(--ink) !important; }
.conv-item .ttl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item .del { opacity: 0; border: 0; background: none; color: var(--faint); cursor: pointer; padding: 2px 4px; }
.conv-item:hover .del { opacity: 1; }
.conv-item .del:hover { color: var(--redpen); }
.chat-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg); }
.chat-toolbar { display: flex; gap: 8px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--rule); background: var(--surface); flex-wrap: wrap; }
.chat-toolbar .select { height: 34px; width: auto; font-size: .84rem; padding-left: 10px; border-radius: 7px; box-shadow: none; }
.chat-toolbar.modes { padding-top: 8px; padding-bottom: 8px; background: var(--surface); }
.chat-scroll { flex: 1; overflow-y: auto; padding: 28px 18px 12px; }
.chat-inner { max-width: 820px; margin: 0 auto; }
.msg { display: flex; gap: 14px; margin-bottom: 26px; }
.msg-user { justify-content: flex-end; }
.msg-user .bubble { background: var(--surface); border: 1px solid var(--rule); color: var(--text); border-radius: 12px 12px 4px 12px; padding: 10px 14px; max-width: 78%; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: var(--shadow-sm); }
.msg-user .bubble img { max-width: 220px; border-radius: 8px; margin-top: 8px; }
.msg-ai .body { flex: 1; min-width: 0; }
.msg-ai .bubble { background: transparent; padding: 3px 0 0; }
.msg-ai .msg-avatar { width: 30px; height: 30px; }
.msg-meta { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: .78rem; color: var(--muted); }
.msg-meta .btn { height: 28px; padding: 0 8px; font-size: .78rem; color: var(--muted); }
.msg-meta .btn:hover { color: var(--text); }
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 8px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: bounce 1.2s infinite; font-style: normal; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
.status-line { font-size: .84rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.sources { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: .82rem; }
.sources b { font-weight: 600; color: var(--text-2); }
.sources a { display: inline-flex; max-width: 100%; margin: 6px 6px 0 0; padding: 4px 9px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--rule); color: var(--text-2); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sources a:hover { color: var(--ink); border-color: var(--ink-100); }
.composer-wrap { padding: 8px 18px 16px; background: linear-gradient(to top, var(--bg) 75%, transparent); }
.composer { max-width: 820px; margin: 0 auto; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: var(--ink); box-shadow: var(--focus), var(--shadow); }
.composer textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; color: var(--text); font: 400 .97rem/1.5 var(--font); padding: 8px 10px; max-height: 200px; min-height: 42px; }
.composer textarea:focus-visible { box-shadow: none; }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 2px; }
.composer-tools { display: flex; gap: 2px; align-items: center; }
.composer-tools .btn { color: var(--muted); }
.attach-preview { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 8px 2px; }
.attach-preview:empty { display: none; }
.attach-preview .thumb { position: relative; }
.attach-preview img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; border: 1px solid var(--rule); }
.attach-preview button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--text); color: var(--bg); font-size: .65rem; cursor: pointer; }
.mic-on { background: var(--redpen-soft) !important; color: var(--redpen) !important; }
.welcome { padding: 36px 4px 10px; }
.welcome .mono { margin-bottom: 16px; }
.welcome h2 { font-size: 1.5rem; letter-spacing: -.025em; margin-bottom: 6px; }
.welcome p { color: var(--text-2); max-width: 56ch; }
.starter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-top: 22px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); overflow: hidden; }
.starter { padding: 14px 16px; border: 0; border-top: 1px solid var(--rule); background: transparent; cursor: pointer; font: 500 .9rem/1.45 var(--font); color: var(--text-2); text-align: left; display: flex; gap: 10px; align-items: flex-start; }
.starter:nth-child(-n+2) { border-top: 0; }
.starter:nth-child(even) { border-left: 1px solid var(--rule); }
.starter i { color: var(--faint) !important; margin-top: 4px; }
.starter:hover { background: var(--surface-2); color: var(--text); }
.composer-note { text-align: center; font-size: .74rem; color: var(--faint); margin-top: 8px; }
@media (max-width: 960px) {
  .chat-shell { grid-template-columns: minmax(0, 1fr); }
  .conv-panel { position: fixed; z-index: 58; left: 0; top: 0; bottom: 0; width: 288px; transform: translateX(-102%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .conv-panel.open { transform: none; }
  .starter-grid { grid-template-columns: minmax(0, 1fr); }
  .starter:nth-child(2) { border-top: 1px solid var(--rule); }
  .starter:nth-child(even) { border-left: 0; }
  .msg-user .bubble { max-width: 90%; }
  .msg-ai .msg-avatar { display: none; }
  .chat-scroll { padding: 18px 14px 8px; }
  .composer-wrap { padding: 6px 10px 10px; }
}

/* ---------- quiz ---------- */
.quiz-progress { height: 4px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.quiz-progress > div { height: 100%; background: var(--ink); transition: width .3s; }
.option { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--rule-strong); background: var(--surface); color: var(--text); font: 500 .95rem/1.5 var(--font); cursor: pointer; margin-bottom: 8px; transition: border-color .12s, background .12s; }
.option:hover:not(:disabled) { border-color: var(--ink); }
.option .key { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--rule-strong); display: grid; place-items: center; font-weight: 700; flex: none; font-size: .8rem; color: var(--text-2); }
.option .otext { flex: 1; min-width: 0; }
.option p { margin: 0; }
.option.correct { border-color: var(--green); background: var(--green-soft); }
.option.correct .key { background: var(--green); border-color: var(--green); color: #fff; }
.option.wrong { border-color: var(--redpen); background: var(--redpen-soft); }
.option.wrong .key { background: var(--redpen); border-color: var(--redpen); color: #fff; }
.option:disabled { cursor: default; }
.explain { padding: 14px 16px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--rule); }
.score-ring { width: 140px; height: 140px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; background: conic-gradient(var(--ink) calc(var(--p) * 1%), var(--surface-3) 0); }
.score-ring > div { width: 116px; height: 116px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-family: var(--font-head); font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; }

/* ---------- news ---------- */
.news-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--rule); }
#newsList .news-item:first-child { border-top: 0; }
.news-item h4 { font-family: var(--font); font-size: .95rem; font-weight: 600; margin: 0 0 3px; line-height: 1.42; letter-spacing: 0; }
.news-item .src { font-size: .78rem; color: var(--muted); }
#newsList { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 2px 16px; }

/* ---------- dropzone ---------- */
.dropzone { border: 1.5px dashed var(--rule-strong); border-radius: 12px; padding: 30px; text-align: center; background: var(--surface-2); cursor: pointer; transition: .15s; }
.dropzone i { color: var(--ink) !important; }
.dropzone:hover, .dropzone.drag { border-color: var(--ink); background: var(--ink-50); }
.file-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.file-list .f { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; background: var(--surface); border: 1px solid var(--rule); font-size: .84rem; }
.file-list img { width: 36px; height: 36px; object-fit: cover; border-radius: 5px; }

/* ---------- wallet ---------- */
.wallet-hero { background: var(--ink-700); color: #fff; border-radius: var(--radius-lg); padding: 24px; position: relative; overflow: hidden; }
.wallet-hero::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 27px, rgba(255,255,255,.06) 27px, rgba(255,255,255,.06) 28px); pointer-events: none; }
.wallet-hero > * { position: relative; z-index: 1; }
.wallet-hero .bal { font-family: var(--font-head); font-size: 2.5rem; font-weight: 800; letter-spacing: -.035em; line-height: 1; margin: 8px 0; }
.amount-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.amount-opt { padding: 12px 8px; border-radius: 9px; border: 1px solid var(--rule-strong); background: var(--surface); text-align: center; cursor: pointer; font: 700 1rem var(--font-head); color: var(--text); letter-spacing: -.01em; }
.amount-opt small { display: block; font: 600 .7rem var(--font); color: var(--green); margin-top: 2px; letter-spacing: 0; }
.amount-opt:hover { border-color: var(--ink); }
.amount-opt.active { border-color: var(--ink); background: var(--ink-50); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pay-method { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--rule-strong); border-radius: 10px; cursor: pointer; margin-bottom: 8px; background: var(--surface); }
.pay-method i { color: var(--muted) !important; }
.pay-method.active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pay-method.active i { color: var(--ink) !important; }
.qr-box { background: #fff; padding: 10px; border-radius: 10px; display: inline-block; border: 1px solid var(--rule); }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 36px 16px; color: var(--muted); font-size: .9rem; }
.empty i { font-size: 1.5rem; margin-bottom: 10px; opacity: .5; display: block; }
.spinner { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.bar-chart .b { flex: 1; background: var(--ink); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; opacity: .9; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 12px; color: var(--muted); font-weight: 600; font-size: .88rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--ink); border-color: var(--ink); }
.announce { background: var(--ink-700); color: #fff; text-align: center; padding: 8px 16px; font-size: .85rem; font-weight: 500; }
.announce a { color: #fff; text-decoration: underline; }
.kbd { font-family: ui-monospace, monospace; font-size: .76rem; padding: 1px 6px; border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: 5px; }

@media print {
  .sidebar, .topbar, .composer-wrap, .conv-panel, .chat-toolbar, .msg-meta, .no-print, .site-header, .site-footer { display: none !important; }
  .app { display: block; } .chat-shell { display: block; height: auto; } .chat-scroll { overflow: visible; }
  body { background: #fff; }
}

@media (max-width: 640px) {
  .chat-toolbar { padding: 8px 10px; gap: 6px; }
  .chat-toolbar .select { flex: 1 1 40%; min-width: 0; font-size: .8rem; }
  #printBtn { display: none; }
  .chat-toolbar.modes { padding: 6px 10px; }
}

/* =====================================================================
   Hand-drawn layer: pen notes, sticky notes, paper, sketch charts
   ===================================================================== */
:root { --pencil: #4b5366; --sticky: #fff3a8; --sticky-pink: #ffe1e8; --sticky-blue: #dcebff; --sticky-green: #ddf3e2; }
.pencil { font-family: var(--font-pen); color: var(--pencil); font-weight: 600; }
.pen-ink { font-family: var(--font-pen); color: var(--ink); font-weight: 600; }
.hand { font-family: var(--font-pen); font-weight: 600; font-size: 1.35em; line-height: 1.1; }
.graph-paper { background-color: var(--bg); background-image: linear-gradient(color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px); background-size: 24px 24px; }
.dotted-paper { background-color: var(--surface); background-image: radial-gradient(color-mix(in srgb, var(--ink) 16%, transparent) 1px, transparent 1.2px); background-size: 18px 18px; }

/* sticky notes */
.sticky { position: relative; background: var(--sticky); color: #2b2a22; padding: 22px 18px 18px; border-radius: 2px 2px 6px 2px; box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 10px 18px -8px rgba(60,50,0,.28); transform: rotate(var(--r, -1.5deg)); transition: transform .25s ease; }
.sticky:hover { transform: rotate(0deg) translateY(-3px); }
.sticky::before { content: ""; position: absolute; top: -10px; left: 50%; width: 76px; height: 22px; transform: translateX(-50%) rotate(-3deg); background: rgba(255,255,255,.55); border: 1px solid rgba(0,0,0,.05); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.sticky.pink { background: var(--sticky-pink); } .sticky.blue { background: var(--sticky-blue); } .sticky.green { background: var(--sticky-green); }
.sticky h4 { font-family: var(--font-pen); font-size: 1.45rem; font-weight: 600; margin: 0 0 6px; color: #23221c; letter-spacing: 0; line-height: 1.1; }
.sticky p { margin: 0; font-size: .92rem; color: #3b3a30; line-height: 1.5; }
.sticky .hand { color: var(--ink); }
.sticky-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px 22px; padding-top: 10px; }
.sticky-grid > .sticky:nth-child(3n+2) { --r: 1.4deg; } .sticky-grid > .sticky:nth-child(3n) { --r: -.6deg; }

/* paper sheet with margin */
.paper { position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; box-shadow: 0 1px 2px rgba(20,30,60,.05), 0 14px 30px -12px rgba(20,30,60,.18); }
.paper.ruled { padding: 6px 22px 18px 62px; }
.paper .holes { position: absolute; left: 16px; top: 18px; bottom: 18px; display: flex; flex-direction: column; justify-content: space-around; }
.paper .holes i { width: 12px; height: 12px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 1px 2px rgba(0,0,0,.18); display: block; }
.paper-title { font-family: var(--font-pen); color: var(--ink); font-size: 1.6rem; font-weight: 600; line-height: 30px; margin: 0; }
.hw { font-family: var(--font-pen); font-size: 1.32rem; color: #24357a; line-height: 30px; font-weight: 600; }
.hw p { margin: 0; }

/* red pen marks */
.mark-tick, .mark-cross { font-family: var(--font-pen); color: var(--redpen); font-weight: 700; font-size: 1.7rem; line-height: 1; }
.score-circle { position: absolute; right: 18px; top: 14px; width: 92px; height: 92px; display: grid; place-items: center; font-family: var(--font-pen); color: var(--redpen); font-size: 1.9rem; font-weight: 700; transform: rotate(-8deg); }
.score-circle svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.margin-note { position: absolute; font-family: var(--font-pen); color: var(--redpen); font-size: 1.15rem; line-height: 1.05; font-weight: 600; transform: rotate(-4deg); }

/* newspaper clipping */
.clip { position: relative; background: #f4f1e8; color: #222; padding: 18px 20px 22px; font-family: Georgia, "Times New Roman", serif; box-shadow: 0 10px 22px -10px rgba(0,0,0,.35); transform: rotate(-2deg); clip-path: polygon(0 2%, 4% 0, 9% 2%, 15% 0, 22% 1.5%, 30% 0, 38% 2%, 46% 0, 55% 1.6%, 63% 0, 72% 2%, 80% .4%, 88% 2%, 95% 0, 100% 1.5%, 100% 98%, 96% 100%, 90% 98.5%, 83% 100%, 75% 98%, 66% 100%, 58% 98.5%, 50% 100%, 41% 98.2%, 33% 100%, 25% 98.5%, 17% 100%, 9% 98%, 3% 100%, 0 98.5%); }
.clip .mast { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #666; border-bottom: 1px solid #bbb; padding-bottom: 6px; margin-bottom: 10px; }
.clip h4 { font-family: Georgia, serif; font-size: 1.28rem; line-height: 1.2; margin: 0 0 8px; color: #111; letter-spacing: 0; }
.clip p { font-size: .86rem; line-height: 1.5; color: #333; margin: 0; columns: 2; column-gap: 16px; }

/* sketch frame (rough border is drawn by JS into .sk-svg) */
.sketch { position: relative; }
.sk-svg { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); pointer-events: none; overflow: visible; z-index: 0; }
.sketch > :not(.sk-svg) { position: relative; z-index: 1; }
.sketch-card { position: relative; background: var(--surface); padding: 22px; border-radius: 4px; }

/* rough charts */
.rough-chart { width: 100%; height: auto; display: block; overflow: visible; }
.rough-chart text { font-family: var(--font-pen); font-weight: 600; }
.rough-arrow { display: block; overflow: visible; }

/* interactive tabs (exam switcher etc.) */
.tabset-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tab-btn { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--rule-strong); background: var(--surface); font: 600 .86rem var(--font); color: var(--text-2); cursor: pointer; transition: .15s; }
.tab-btn:hover { border-color: var(--ink); color: var(--ink); }
.tab-btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }
[data-tab-panel] { display: none; }
[data-tab-panel].active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } }

/* flow / steps with arrows */
.flow { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 0; align-items: stretch; }
.flow-step { position: relative; padding: 18px 26px 18px 0; }
.flow-step .num { font-family: var(--font-pen); font-size: 2.6rem; color: var(--ink); line-height: 1; font-weight: 600; }
.flow-step h3 { margin: 6px 0 6px; }
.flow-step p { color: var(--text-2); font-size: .93rem; margin: 0; }
.flow-step .rough-arrow { position: absolute; right: 2px; top: 22px; width: 54px; height: 30px; }
.flow-step:last-child .rough-arrow { display: none; }
@media (max-width: 860px) { .flow { grid-template-columns: minmax(0, 1fr); } .flow-step { padding-right: 0; } .flow-step .rough-arrow { display: none; } }

/* timeline (a day with eAdhyapak) */
.day-line { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; }
.day-line::before { content: ""; position: absolute; left: 0; right: 0; top: 18px; border-top: 2px dashed var(--rule-strong); }
.day-slot { position: relative; padding-top: 44px; }
.day-slot .time { position: absolute; top: 0; left: 0; background: var(--bg); padding-right: 10px; font-family: var(--font-pen); font-size: 1.45rem; color: var(--ink); font-weight: 600; }
@media (max-width: 860px) { .day-line { grid-template-columns: minmax(0, 1fr); } .day-line::before { display: none; } }

/* calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 34px; align-items: center; }
@media (max-width: 860px) { .calc { grid-template-columns: minmax(0, 1fr); } }
.calc label { display: flex; justify-content: space-between; font-size: .92rem; color: var(--text); margin-bottom: 8px; }
.calc label b { color: var(--ink); font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: var(--surface-3); outline: none; margin: 4px 0 22px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); cursor: pointer; }
.calc-out { font-family: var(--font-head); font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; color: var(--text); line-height: 1; }

/* mini quiz demo */
.mini-quiz .option { background: var(--surface); }
.mini-quiz .q { font-weight: 600; font-size: 1.02rem; margin-bottom: 12px; }
.mini-quiz .fb { margin-top: 6px; min-height: 30px; }

/* anatomy (annotated answer) */
.anatomy { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 34px; align-items: start; }
.anatomy-notes { display: flex; flex-direction: column; gap: 22px; padding-top: 10px; }
.anatomy-notes .an { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
.anatomy-notes .an .k { font-family: var(--font-pen); font-size: 1.6rem; color: var(--redpen); line-height: 1; font-weight: 700; }
.anatomy-notes .an b { display: block; margin-bottom: 2px; }
.anatomy-notes .an p { margin: 0; color: var(--text-2); font-size: .92rem; }
.pin { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--redpen); color: #fff; font: 700 .72rem var(--font); margin-right: 6px; vertical-align: 1px; }
@media (max-width: 860px) { .anatomy { grid-template-columns: minmax(0, 1fr); } }

/* language switcher demo */
.lang-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.lang-out { min-height: 120px; }

/* split section helper */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.split.rev > :first-child { order: 2; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: 32px; } .split.rev > :first-child { order: 0; } }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; color: var(--text-2); }
.check-list li::before { content: "✓"; font-family: var(--font-pen); color: var(--green); font-size: 1.35rem; line-height: 1; font-weight: 700; }
.big-quote { font-family: var(--font-pen); font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.2; color: var(--ink); font-weight: 600; }
.persona { display: flex; gap: 14px; align-items: flex-start; }
.persona .face { flex: none; }
.stat-hand { font-family: var(--font-pen); font-size: 2.6rem; color: var(--ink); line-height: 1; font-weight: 700; }

/* mentors explorer */
.mx { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 28px; align-items: start; }
.mx-list { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; position: sticky; top: 80px; }
.mx-filter { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px; border-bottom: 1px solid var(--rule); }
.mx-filter .tab-btn { height: 30px; padding: 0 11px; font-size: .78rem; }
.mx-item { display: flex; gap: 12px; align-items: center; width: 100%; padding: 12px 16px; border: 0; border-top: 1px solid var(--rule); background: none; text-align: left; cursor: pointer; font: inherit; color: var(--text); }
.mx-item:first-of-type { border-top: 0; }
.mx-item:hover { background: var(--surface-2); }
.mx-item.active { background: var(--ink-50); box-shadow: inset 3px 0 0 var(--ink); }
.mx-item .n { font-weight: 700; display: block; line-height: 1.2; }
.mx-item .x { font-size: .8rem; color: var(--muted); display: block; }
.mx-spot { min-width: 0; }
.mx-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.mx-head h2 { margin: 0 0 6px; font-size: 1.9rem; letter-spacing: -.03em; }
.mx-head .tag { color: var(--muted); }
.mx-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.mx-grid .card h3 { font-size: .98rem; display: flex; gap: 8px; align-items: center; }
.mx-grid .card h3 i { color: var(--ink); font-size: .9rem; }
.mx-grid ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: .92rem; }
.mx-grid li { margin: 4px 0; }
.ask-list { display: grid; gap: 8px; }
.ask-list a { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 9px; color: var(--text); background: var(--surface); text-decoration: none !important; font-size: .92rem; }
.ask-list a:hover { border-color: var(--ink); color: var(--ink); }
.ask-list a i { color: var(--faint); margin-top: 4px; }
@media (max-width: 960px) { .mx { grid-template-columns: minmax(0, 1fr); } .mx-list { position: static; } .mx-grid { grid-template-columns: minmax(0, 1fr); } }

/* doodle icon in a sketched circle */
.doodle { position: relative; width: 56px; height: 56px; display: grid; place-items: center; color: var(--ink); font-size: 1.3rem; flex: none; }
.doodle svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* auth split */
.auth-split { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 56px; align-items: center; max-width: 1100px; margin: 0 auto; padding: 40px 20px; min-height: calc(100vh - 64px); }
@media (max-width: 960px) { .auth-split { grid-template-columns: minmax(0, 1fr); gap: 28px; } .auth-side { order: 2; } }
.demo-box { margin-top: 18px; border: 1.5px dashed var(--rule-strong); border-radius: 12px; padding: 14px; background: var(--surface-2); }
.demo-box h4 { font-size: .9rem; margin-bottom: 10px; }
.demo-acc { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--rule); border-radius: 9px; margin-top: 8px; }
.demo-acc code { font-size: .8rem; background: none; padding: 0; }

/* misc */
.section-kicker { font-family: var(--font-pen); color: var(--redpen); font-size: 1.4rem; font-weight: 600; display: inline-block; transform: rotate(-2deg); margin-bottom: 6px; }
.center-head { text-align: center; margin-left: auto; margin-right: auto; }
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
.typewriter-caret::after { content: "|"; color: var(--ink); animation: blink 1s steps(1) infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0; } }
.compare-table td:first-child { font-weight: 600; }
.compare-table .yes { color: var(--green); font-weight: 700; }
.compare-table .no { color: var(--redpen); font-weight: 700; }
.icon-row { display: flex; gap: 12px; align-items: flex-start; }
.icon-row > i { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--ink-50); color: var(--ink); flex: none; }
.icon-row h4 { margin: 2px 0 4px; }
.icon-row p { margin: 0; color: var(--text-2); font-size: .92rem; }

/* mentors page: hero grid + mobile explorer strip */
.mx-hero-grid { display: grid; grid-template-columns: repeat(5, 64px); gap: 16px 18px; justify-content: center; }
.mx-item:first-child { border-top: 0; }
@media (max-width: 960px) {
  .mx-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .mx-filter .tab-btn { flex: 0 0 auto; }
  .mx-items { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
  .mx-item { flex: 0 0 auto; width: auto; border-top: 0; border-right: 1px solid var(--rule); scroll-snap-align: start; padding: 12px 14px; }
  .mx-item.active { box-shadow: inset 0 -3px 0 var(--ink); }
}
@media (max-width: 480px) {
  .mx-hero-grid { grid-template-columns: repeat(5, 54px); gap: 12px 8px; }
  .mx-hero-grid .mono.lg { width: 50px; height: 50px; font-size: 1.05rem; }
}

/* pricing page */
.price-card { display: flex; flex-direction: column; }
.tier-pick { border-color: transparent; }
.math-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid rgba(31,58,138,.12); line-height: 44px; }
.math-row.total { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: 4px; }
.hw-num { font-family: var(--font-pen); font-size: 1.9rem; color: var(--ink); font-weight: 700; white-space: nowrap; }
.math-row.total .hw-num { color: var(--redpen); font-size: 2.3rem; }
.coin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 20px; }
.coin-card { position: relative; background: var(--surface); border: 1.5px dashed var(--rule-strong); border-radius: 16px; padding: 22px 20px 18px; text-align: center; transition: transform .15s, border-color .15s; }
.coin-card:hover { transform: translateY(-3px) rotate(-.5deg); border-color: var(--ink); }
.coin-amt { font-family: var(--font-head); font-weight: 800; font-size: 2rem; letter-spacing: -.03em; color: var(--text); }
.coin-stamp { position: absolute; top: -14px; right: -8px; transform: rotate(8deg); background: var(--hl, #ffe566); color: #3d3200; font-family: var(--font-pen); font-weight: 700; font-size: 1.15rem; padding: 2px 12px; border-radius: 4px; box-shadow: 0 4px 10px -4px rgba(0,0,0,.25); }
.text-right { text-align: right; }

/* contact page */
.channel { display: flex; gap: 16px; align-items: center; color: inherit; text-decoration: none; padding: 16px 20px; }
a.channel:hover { border-color: var(--ink); }
.channel .doodle { width: 48px; height: 48px; }
.topic-card { display: flex; gap: 14px; align-items: flex-start; color: inherit; text-decoration: none; }
.topic-card > i { font-size: 1.15rem; color: var(--ink); width: 40px; height: 40px; border-radius: 10px; background: var(--ink-50); display: grid; place-items: center; flex: none; }
.topic-card h3 { font-size: 1rem; margin: 0 0 4px; }
.topic-card.active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.contact-split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.school-card { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.school-monos { display: grid; grid-template-columns: repeat(3, 56px); gap: 18px; justify-content: center; }
.school-monos .mono:nth-child(odd) { transform: rotate(-6deg); } .school-monos .mono:nth-child(even) { transform: translateY(10px) rotate(5deg); }
@media (max-width: 860px) { .contact-split, .school-card { grid-template-columns: minmax(0, 1fr); } .school-monos { justify-content: start; } }

/* dashboard */
.dash-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; text-align: center; }
.cal-h { font-size: .7rem; color: var(--faint); font-weight: 600; }
.cal-d { position: relative; aspect-ratio: 1; display: grid; place-items: center; font-size: .78rem; color: var(--muted); border-radius: 8px; background: var(--surface-2); }
.cal-d.on { background: #e5f3ea; color: #145c3a; font-weight: 700; }
.cal-d.on::after { content: "✓"; position: absolute; right: 2px; top: -6px; font-family: var(--font-pen); color: var(--green); font-size: 1.15rem; font-weight: 700; }
.cal-d.today { box-shadow: inset 0 0 0 1.5px var(--ink); }
.plan-item { display: flex; align-items: center; gap: 10px; cursor: pointer; margin: 0; }
.plan-item input { width: 18px; height: 18px; accent-color: var(--green); flex: none; }
.plan-item span { flex: 1; }
.plan-item a { text-decoration: none; font-family: var(--font-body); }
.plan-item.done span { text-decoration: line-through; text-decoration-color: var(--redpen); text-decoration-thickness: 2px; color: var(--muted); }
.mode-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mode-tile { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; background: var(--surface); transition: border-color .15s, transform .15s; }
.mode-tile i { color: var(--ink); width: 18px; text-align: center; }
.mode-tile:hover { border-color: var(--ink); transform: translateY(-2px); }
@media (max-width: 960px) { .dash-row { grid-template-columns: minmax(0, 1fr) !important; } }
.chip.chip-wrap { white-space: normal; height: auto; padding: 8px 12px; line-height: 1.35; text-align: left; }
.guide { border-top: 1px dashed var(--rule-strong); padding-top: 28px; }
.guide-title { font-size: 1.35rem; margin-bottom: 18px; }
[hidden] { display: none !important; }
.grid > *, .auth-side { min-width: 0; }
.auth-side .paper { width: 100%; }
.hw, .paper-title { overflow-wrap: anywhere; }
.auth-split.auth-wide { grid-template-columns: minmax(0, 520px) minmax(0, 1fr); }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 960px) { .auth-split.auth-wide, .grid-2-1 { grid-template-columns: minmax(0, 1fr); } }
