/* LawMint core styles, shared by lawmint.net and lawmint.com (tokens, font, type, header, footer, buttons, cards,
   icons, home finder, prose). lawmint.com copies this file with scripts/sync-design.mjs; edit it here only. */
/* LawMint design tokens (owner, 21 Nov 2026): Google-docs clarity, Fin's warm neutrals, one font family.
   Orange = the one main action per screen; LawMint green = brand, progress and success; near-black = calm actions. */
@font-face { font-family: "LawMint Sans"; src: url("/fonts/lawmint-sans.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "LawMint Sans"; src: url("/fonts/lawmint-sans-rupee.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+20B9; }
/* Fallback tuned to the same width, so text doesn't jump when the font arrives. */
@font-face { font-family: "LawMint Fallback"; src: local("Segoe UI"), local("Roboto"), local("Helvetica Neue"), local("Arial"); size-adjust: 101%; ascent-override: 96%; descent-override: 25%; line-gap-override: 0%; }
:root {
  --font: "LawMint Sans", "LawMint Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bg: #faf9f6; --card: #ffffff; --sand: #f1eee9; --fg: #161514; --muted: #5d5b56; --line: #e3dfd7;
  --brand: #3d7a12; --brand-fg: #ffffff; --focus: #1d4ed8;
  --action: #d64000; --action-hover: #b83700; /* edX orange: white text 4.57:1. Fill only, never text on the page (4.34:1). */ --action-fg: #ffffff; --action-soft: #fff0e6; --highlight: #ff5600;
  --ink: #161514; --ink-fg: #ffffff;
  --logo: #666699; --logo-hover: #55557f; --logo-fg: #ffffff; /* the logo's purple-grey: white on it is 5.3:1 */
  --red: #a01818; --red-bg: #fde8e8; --amber: #7a4b00; --amber-bg: #fdf1d8; --green: #14602e; --green-bg: #e2f5e8;
  --grey-bg: #efece6;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(40, 30, 10, .05), 0 4px 16px rgba(40, 30, 10, .05);
  color-scheme: light;
}
/* Theme: light by default; dark when the student chooses it (data-theme on <html>). Warm darks, not blue-greys. */
:root[data-theme="dark"] { --bg: #161513; --card: #1e1d1a; --sand: #262420; --fg: #f3f1ec; --muted: #b3afa6; --line: #36332d;
  --brand: #9ed35a; --brand-fg: #0b1512; --focus: #8ab4ff;
  --action: #f26a21; --action-hover: #ff7f3a; --action-fg: #160b04; --action-soft: #3a2416; --highlight: #ff7a3d;
  --ink: #f3f1ec; --ink-fg: #161513;
  --logo: #666699; --logo-hover: #58588a; --logo-fg: #ffffff;
  --red: #ffb3b3; --red-bg: #3d1717; --amber: #ffd58a; --amber-bg: #3a2c0c; --green: #9be3b3; --green-bg: #12321e; --grey-bg: #2a2824;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark; }
.theme { margin: 0; }
.theme button { min-height: 44px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--fg); font: inherit; font-size: .85rem; cursor: pointer; white-space: nowrap; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font-family: inherit; }
a { color: var(--brand); }
img, svg { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--bg); padding: 6px 10px; z-index: 10; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 20; }
.brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; margin-right: auto; }
.who { color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.top form { margin: 0; }
main { max-width: 860px; margin: 0 auto; padding: 16px; }
main.wide { max-width: 1180px; }
/* One family, a few weights and sizes. */
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); line-height: 1.2; font-weight: 600; letter-spacing: -.01em; margin: .3em 0 .5em; }
h2 { font-size: 1.3rem; line-height: 1.3; font-weight: 600; margin: 1.4em 0 .5em; }
h3 { font-size: 1.05rem; font-weight: 600; }
strong, b { font-weight: 600; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
.crumb { margin: 0; font-size: .9rem; }
.note, .notice { background: var(--sand); border-left: 4px solid var(--brand); padding: 10px 14px; border-radius: 6px; }
.notice { border-left-color: var(--amber); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 9px 18px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--card); color: var(--fg); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--muted); }
/* The one main action on a screen. */
.btn.primary { background: var(--action); color: var(--action-fg); border-color: var(--action); }
.btn.primary:hover { background: var(--action-hover); border-color: var(--action-hover); }
/* Calm actions (test player): near-black. */
.btn.ink { background: var(--ink); color: var(--ink-fg); border-color: var(--ink); }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn.subtle { border-style: dashed; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; padding: 8px 4px; min-height: 44px; }
.hero { padding: 24px 0; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.card { flex-direction: column; align-items: flex-start; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; min-width: 0; }
legend { font-weight: 700; padding: 0 6px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
td.red { background: var(--red-bg); color: var(--red); } td.amber { background: var(--amber-bg); color: var(--amber); } td.green { background: var(--green-bg); color: var(--green); }
tfoot th, tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--amber-bg); color: var(--amber); vertical-align: middle; }
.stem { overflow-x: auto; } .stem table { width: auto; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
/* results and review */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 8px 0 16px; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; font-weight: 600; }
.tabs a[aria-current] { color: var(--fg); border-bottom-color: var(--brand); }
.score { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.score .big { font-size: 2.4rem; font-weight: 800; } .score .big span { font-size: 1.2rem; color: var(--muted); font-weight: 600; }
figure { margin: 0; }
.ok { color: var(--green); } .no { color: var(--red); }
@media (max-width: 420px) { .who { display: none; } .top { gap: 6px; } }
/* brand and courses */
.brand { display: inline-flex; align-items: center; }
/* Logo: 128 x 32 page pixels on every screen, as on lawmint.com (owner, 20 Nov 2026). */
.brand { flex: 0 1 auto; min-width: 0; }
.brand img { display: block; width: 128px; max-width: 100%; height: auto; }
.pill { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--grey-bg); color: var(--fg); vertical-align: middle; }
.pill.free, .pill.ok { background: var(--green-bg); color: var(--green); }
.front { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 760px) { .front { grid-template-columns: 1fr 280px; } }
.lead { font-size: 1.05rem; margin-top: 0; }
.prose { max-width: 70ch; } .prose h2:first-child { margin-top: .6em; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
/* inline icons (square, so ticks and crosses keep normal proportions) */
.ico { display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -0.16em; flex: none; }
.ico.ok { color: var(--green); } .ico.no { color: var(--red); }
.search { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 12px 0; }
.search input { font: inherit; padding: 8px 10px; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; }
/* results report (as on Moodle) */
:root { --bar-ok: #24936e; --bar-no: #e09b2d; --bar-skip: #dde1e7; --bar-rev: #c9b6e4; }
:root[data-theme="dark"] { --bar-ok: #3fb48c; --bar-no: #e6a63e; --bar-skip: #3a404d; --bar-rev: #7d6aa6; }
.panel { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 14px 0; background: var(--bg); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--grey-bg); font-weight: 600; font-size: .9rem; }
.bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--bar-skip); }
.bar span { display: block; height: 100%; }
.pill-pct { padding: 1px 8px; border-radius: 6px; }
.pill-pct.red { background: var(--red-bg); color: var(--red); } .pill-pct.amber { background: var(--amber-bg); color: var(--amber); } .pill-pct.green { background: var(--green-bg); color: var(--green); }
.panel > h2:first-child { margin-top: 0; }

/* Site navigation and footer. */
.topnav { display: flex; gap: 14px; flex-wrap: wrap; margin-right: auto; margin-left: 12px; }
.topnav a, .signin { color: var(--fg); text-decoration: none; font-weight: 600; font-size: .95rem; }
.topnav a:hover, .signin:hover { color: var(--brand); text-decoration: underline; }
@media (max-width: 560px) { .topnav { order: 10; width: 100%; margin: 6px 0 0; } }
.site-foot { border-top: 1px solid var(--line); margin-top: 48px; padding: 20px 16px 28px; text-align: center; }
.site-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-bottom: 6px; }
.site-foot a { color: var(--muted); }

/* Legal and prose pages. */
.legal { max-width: 52rem; }
.legal nav[aria-label="Contents"] { border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 12px 18px; margin: 16px 0 24px; }
.legal nav[aria-label="Contents"] ul { margin: 4px 0; }
.legal h2 { margin-top: 2rem; scroll-margin-top: 16px; }

/* Exam finder, directory, home shelves, testimonials. */
.finder form { display: flex; gap: 8px; max-width: 36rem; }
.finder input[type=search] { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); }
.home-finder { margin: 32px 0 8px; }
.dir { list-style: none; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.dir a { display: block; height: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--card); color: var(--fg); text-decoration: none; }
.dir a:hover { border-color: var(--brand); color: var(--brand); }
.dir-group h2, .shelf h2 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .03em; margin-top: 28px; }
.small-head { font-size: 1rem; color: var(--muted); margin: 20px 0 8px; }
.top .brand { margin-right: 0; } .top { flex-wrap: wrap; }
.inline-form { margin: 8px 0 14px; }
.chg { font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.chg.up { background: var(--green-bg); color: var(--green); }
.chg.down { background: var(--red-bg); color: var(--red); }
.chg.flat { background: var(--line); color: var(--muted); }

/* Maths (pre-rendered KaTeX): match our text size; long formulas scroll sideways instead of breaking the layout. */
.katex { font-size: 1.08em; }
.katex-display { overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.stem { overflow-wrap: anywhere; }
.stem .katex { white-space: nowrap; }

/* ---------- Exam-first pages (home, exam hub, plans) ---------- */
.hero-find { text-align: center; padding: clamp(24px, 6vw, 56px) 0 12px; }
.hero-find h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3rem); margin: 0 0 6px; }
.hero-find .lead { color: var(--muted); font-size: 1.1rem; margin: 0 auto 20px; max-width: 34rem; }
.big-search { display: flex; gap: 8px; max-width: 40rem; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px; box-shadow: var(--shadow); }
.big-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--fg); font: inherit; font-size: 1.05rem; padding: 10px 16px; outline: none; }
.big-search .btn { border-radius: 999px; }
.big-search:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.chips { list-style: none; padding: 0; margin: 16px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 46rem; }
.chips a { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--fg); text-decoration: none; font-size: .9rem; font-weight: 500; }
.chips a:hover { border-color: var(--muted); }
.continue { text-align: center; margin: 4px 0 0; }
.badge-free { justify-self: start; display: inline-block; background: var(--action); color: var(--action-fg); font-size: .72rem; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; vertical-align: 2px; }
form.inline { display: inline; margin: 0; }
.btn.wide { width: 100%; }
.checks { list-style: none; padding: 0; margin: 10px 0 16px; display: grid; gap: 6px; flex: 1; }
.checks li { padding-left: 26px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 2px; top: .35em; width: 14px; height: 8px; border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg); }
/* Surfaces in the new palette. */
.panel, .card, .dir a { border-radius: var(--radius); }
.card { background: var(--card); box-shadow: var(--shadow); }

/* Heading icons: white on orange (owner). Icons are graphics: 3:1 contrast needed, white on #D64000 is 4.57:1. */
.with-ico { display: flex; align-items: center; gap: 10px; }
.h-ico { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--action); color: #fff; }
:root[data-theme="dark"] .h-ico { color: var(--action-fg); }
.shelf h2.with-ico { text-transform: none; letter-spacing: 0; font-size: 1.15rem; }

/* Readability for longer text (owner: more like Google's docs). Google Sans has a tall x-height, so give lines more room. */
.prose, .legal, .lead, .stem { line-height: 1.75; }
.prose p, .legal p { margin: 0 0 1em; }
.prose, .legal { max-width: 46rem; }
.prose li, .legal li { margin-bottom: .4em; }

/* Theme button: round, icon only, like Google's docs. */
.theme-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; min-height: 40px !important; padding: 0 !important; border-radius: 50% !important; border: 0 !important; background: transparent !important; color: var(--muted) !important; cursor: pointer; margin-block: -4px; /* 40px tap target without making the header taller than lawmint.com (owner, 22 Nov 2026) */ }
.theme-btn:hover { background: var(--sand) !important; color: var(--fg) !important; }

/* ---------- Test player, review, results, checkout (new look, 21 Nov 2026) ---------- */
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--sand); color: var(--fg); border-color: transparent; }
.btn.ink:hover { opacity: .9; }
.panel { background: var(--card); box-shadow: var(--shadow); padding: 16px 20px; }
/* Heading icons: plain orange, no tile (owner, 21 Nov 2026). Page titles one step smaller. */
.h-ico, :root[data-theme="dark"] .h-ico { width: auto; height: auto; border-radius: 0; background: none; color: var(--action); }
h1 { font-size: clamp(1.45rem, 1.15rem + 1.1vw, 1.85rem); }
.hero-find h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.4rem); }
.badge-free { display: inline-block; width: auto; vertical-align: 2px; white-space: nowrap; margin-left: 4px; }
/* Legal contents lists: the section numbers are part of the text (they match the headings), so no bullets.
   Sub-items without numbers keep their bullets. Never a bullet and a number together. */
.prose nav[aria-label="Contents"] > ul { list-style: none; padding-left: 0; }
.prose nav[aria-label="Contents"] > ul > li > ul { list-style: disc; padding-left: 1.6em; }
/* Short pages: the footer sits at the bottom of the screen; longer pages push it below as usual (owner rule, both sites). */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
body > .site-foot { flex-shrink: 0; }

/* Home shelves, shared with lawmint.com (owner: both front pages identical). Heading row: icon + heading,
   a count pill, then a rule filling the row. The last "All …" link in a shelf is a sand gateway card. */
.shelf-head { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; }
.shelf-head h2.with-ico { margin: 0; font-size: 1.15rem; font-weight: 600; line-height: 1.3; text-transform: none; letter-spacing: 0; }
.shelf-count { flex: none; padding: 2px 12px; border: 1px solid var(--action); border-radius: 99px; background: var(--action-soft); color: var(--fg); font-size: .78rem; font-weight: 700; white-space: nowrap; } /* more noticeable (owner, 21 Nov 2026) */
.shelf-rule { flex: 1 1 24px; min-width: 24px; height: 1px; background: var(--line); }
.dir a.gateway { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--sand); color: var(--brand); font-weight: 500; }
.gw-chev { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--brand); transition: background .12s, color .12s; }
.dir a.gateway:hover .gw-chev { background: var(--brand); border-color: var(--brand); color: var(--brand-fg); }

/* Testimonials ("What students say"), lawmint.com's design adopted for both sites (owner, 21 Nov 2026):
   masonry columns on the page background; cards tinted blue, green, amber in turn, with a coloured left edge
   and a tinted result pill. */
.testimonials > ul { list-style: none; padding: 0; margin: 0; columns: 1; column-gap: 16px; }
@media (min-width: 640px) { .testimonials > ul { columns: 2; } }
@media (min-width: 1024px) { .testimonials > ul { columns: 3; } }
.testimonials > ul > li { --t-bg: #f4f8ff; --t-border: #d5e2f5; --t-accent: #86a8dc; --t-badge: #e8eefb;
  break-inside: avoid; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin: 0 0 16px; padding: 20px;
  border: 1px solid var(--t-border); border-left: 3px solid var(--t-accent); border-radius: 8px; background: var(--t-bg); box-shadow: none; }
.testimonials > ul > li:nth-child(3n+2) { --t-bg: #f2f9f5; --t-border: #d4e7dc; --t-accent: #83b29b; --t-badge: #e3f1e8; }
.testimonials > ul > li:nth-child(3n) { --t-bg: #fff9ef; --t-border: #eddfc6; --t-accent: #c4a36f; --t-badge: #f6ecd8; }
:root[data-theme="dark"] .testimonials > ul > li { --t-bg: color-mix(in srgb, var(--t-accent) 14%, var(--card)); --t-border: color-mix(in srgb, var(--t-accent) 38%, var(--line)); --t-badge: color-mix(in srgb, var(--t-accent) 30%, var(--card)); }
.testimonials .result { display: inline-block; margin: 0; padding: 4px 12px; border-radius: 99px; font-weight: 700; line-height: 1.4; color: var(--fg); background: var(--t-badge); }
.testimonials blockquote { margin: 0; font-size: 16px; line-height: 1.6; color: var(--fg); }
@media (forced-colors: active) { .testimonials > ul > li { background: Canvas; border-color: CanvasText; } }

/* Footer content as wide as main.wide's content; the full footer's address line (both home pages, owner rule). */
.site-foot-inner { max-width: 1148px; margin: 0 auto; }
.site-foot .foot-note { margin: 6px 0 0; }
/* Header (owner, 22 Nov 2026): Sign in / Sign out are compact outlined buttons, and on phones the theme switch and
   the button sit at the right edge of the first row, with the menu on the row below. */
.top .signin, .top form[action="/auth/logout"] button { display: inline-flex; align-items: center; min-height: 36px; padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--fg); font: inherit; font-weight: 600; font-size: .9rem; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; }
.top .signin:hover, .top form[action="/auth/logout"] button:hover { border-color: var(--logo); color: var(--logo); text-decoration: none; }
@media (max-width: 560px) { .top .brand { margin-right: auto; } }
