/* Tokens copied from my.oscs.in (PortalApp.tsx / portalUi.tsx) — approved mockup 2026-10-28.
   orange #F7941D/#E8820C, blue #74B7CE/#2F86A6. */
:root {
  --orange: #F7941D; --orange-d: #E8820C; --orange-50: #FFF3E6; --orange-text: #9A4F00;
  --blue: #74B7CE; --blue-d: #2F86A6; --blue-50: #E6F4F9;
  --slate-50: #f8fafc; --slate-100: #f1f5f9; --slate-200: #e2e8f0; --slate-300: #cbd5e1; --slate-500: #64748b; --slate-600: #475569; --slate-700: #334155; --slate-900: #0f172a;
  --red: #dc2626; --red-50: #fef2f2;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Nirmala UI", sans-serif; color: var(--slate-900);
  background: linear-gradient(to bottom, var(--orange-50), var(--slate-50) 420px); min-height: 100vh; line-height: 1.5; }
a { color: var(--blue-d); }
h2 { font-size: 20px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 8px; }
.mock { background: #fef3c7; color: #92400e; text-align: center; font-size: 12px; padding: 4px 16px; }

/* header */
header { background: #fff; border-bottom: 1px solid var(--slate-200); position: sticky; top: 0; z-index: 5; }
.bar { max-width: 880px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.logo-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.logo { flex: none; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--orange), var(--blue)); color: #fff; display: grid; place-items: center; font-weight: 800; }
.brand { font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--slate-500); }
header nav { display: flex; gap: 4px; margin-left: 12px; }
header nav a { padding: 6px 12px; border-radius: 10px; color: var(--slate-600); text-decoration: none; font-size: 14px; }
header nav a.on { background: var(--orange-50); color: var(--orange-d); font-weight: 600; }
.lang { margin-left: auto; display: flex; border: 1px solid var(--slate-200); border-radius: 999px; overflow: hidden; font-size: 12px; flex: none; }
.lang button { border: 0; background: #fff; padding: 4px 10px; font: inherit; cursor: pointer; color: var(--slate-600); }
.lang button.on { background: var(--blue-d); color: #fff; }
.link-btn { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--orange-d); flex: none; }
@media (max-width: 600px) { header nav { display: none; } .brand { font-size: 15px; } }

main { max-width: 880px; margin: 0 auto; padding: 20px 16px 32px; }

/* hero banner */
.hero { border-radius: 24px; padding: 20px; color: #fff; background: linear-gradient(to right, var(--orange), var(--orange-d)); box-shadow: 0 10px 15px -3px rgba(247,148,29,.25); margin-bottom: 20px; }
.hero p { margin: 0; } .hero .hi { font-size: 14px; opacity: .9; } .hero .name { font-size: 24px; font-weight: 700; margin: 2px 0 4px; overflow-wrap: anywhere; }
.hero .sub { font-size: 13px; opacity: .95; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips span { background: rgba(255,255,255,.2); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.chips.dark span { background: var(--orange-50); color: var(--orange-text); font-size: 14px; padding: 4px 12px; }

/* tiles — same as my.oscs.in home */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (min-width: 640px) { .grid { gap: 12px; } }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; text-align: center; font: inherit; cursor: pointer;
  background: #fff; border: 1px solid var(--slate-200); border-radius: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.05); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 4px 6px -1px rgba(0,0,0,.1); }
.ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lbl { font-size: 11px; font-weight: 600; line-height: 1.2; color: var(--slate-700); }
@media (min-width: 640px) { .lbl { font-size: 14px; } }
.badge { position: absolute; right: 6px; top: 6px; min-width: 20px; border-radius: 999px; background: #f43f5e; color: #fff; font-size: 11px; font-weight: 700; padding: 0 4px; }
.blue   { color: var(--blue-d); background: var(--blue-50); }
.green  { color: #16a34a; background: #f0fdf4; }
.rose   { color: #e11d48; background: #fff1f2; }
.orange { color: var(--orange-d); background: var(--orange-50); }
.indigo { color: #4f46e5; background: #eef2ff; }
.amber  { color: #d97706; background: #fffbeb; }
.teal   { color: #0d9488; background: #f0fdfa; }
.slate  { color: var(--slate-600); background: var(--slate-100); }
.purple { color: #9333ea; background: #faf5ff; }

/* cards & layout */
.card { background: #fff; border: 1px solid var(--slate-200); border-radius: 16px; padding: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.05); margin-bottom: 12px; }
.card > h3:first-child { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--slate-500); }
.row { display: grid; gap: 12px; margin-top: 20px; }
.row .card { margin-bottom: 0; }
@media (min-width: 640px) { .row { grid-template-columns: 1fr 1fr; } }
.systems { display: grid; gap: 12px; }
@media (min-width: 640px) { .systems { grid-template-columns: repeat(3, 1fr); } }
.systems .card p { margin: 0; font-size: 14px; color: var(--slate-600); }
.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 20px 0; }
.list-item { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.list-item p { margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sys { margin: 24px 4px 10px; font-size: 18px; color: var(--orange-d); }
.i-intro { font-size: 14px; color: var(--slate-700); }
.i-item { border-left: 3px solid var(--blue); padding: 2px 0 2px 10px; margin: 0 0 10px; }
.i-item p { margin: 0; font-size: 14px; }
.i-label { font-size: 12px; font-weight: 700; color: var(--blue-d); }
.pdf-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.toc a { background: #fff; border: 1px solid var(--slate-200); border-radius: 999px; padding: 4px 10px; font-size: 13px; text-decoration: none; color: var(--slate-700); }
[id^="s-"] { scroll-margin-top: 72px; }

/* buttons & forms */
.btn { display: inline-block; border: 0; cursor: pointer; border-radius: 12px; padding: 10px 16px; font: inherit; font-size: 14px; font-weight: 600; color: #fff; text-decoration: none;
  background: linear-gradient(to right, var(--orange), var(--orange-d)); box-shadow: 0 4px 6px -1px rgba(247,148,29,.3); }
.btn:disabled { opacity: .5; cursor: wait; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.ghost { background: #fff; color: var(--slate-700); border: 1px solid var(--slate-300); box-shadow: none; }
.btn.danger { background: var(--red); box-shadow: none; }
.form-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid:not(.one) { grid-template-columns: 2fr 1fr auto; align-items: end; } }
label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--slate-700); }
label.inline { display: flex; align-items: center; gap: 8px; font-weight: 500; }
label.consent { align-items: flex-start; }
label.consent input { margin-top: 3px; }
input[type=text], input:not([type]), input[type=date] { width: 100%; border: 1px solid var(--blue); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 16px; background: #fff; color: inherit; }
input:focus { outline: 2px solid rgba(247,148,29,.5); outline-offset: 1px; }
input.otp { text-align: center; letter-spacing: .5em; font-family: ui-monospace, monospace; font-size: 22px; }
fieldset { border: 1px solid var(--slate-200); border-radius: 12px; padding: 8px 12px 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
legend { font-size: 13px; font-weight: 600; color: var(--slate-700); padding: 0 4px; }
small { display: block; font-weight: 400; color: var(--slate-500); font-size: 12px; }
fieldset small { flex-basis: 100%; }
.price-box { background: var(--blue-50); color: var(--blue-d); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.price-box:empty { display: none; }
.hidden { display: none !important; }
.error { color: var(--red); font-size: 14px; margin: 8px 0 0; }
.error:empty { display: none; }
.note { background: var(--orange-50); color: var(--orange-text); border-left: 4px solid var(--orange); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
hr { border: 0; border-top: 1px solid var(--slate-200); margin: 16px 0; }

/* report */
.num-head { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.num-head h3 { margin: 0; font-size: 17px; text-transform: none; letter-spacing: 0; color: var(--slate-900); }
.num-head p { margin: 0; }
.big { flex: none; width: 60px; height: 60px; border-radius: 16px; background: var(--orange-50); color: var(--orange-d); font-size: 28px; font-weight: 800; display: grid; place-items: center; }
.num-card > p { margin: 6px 0; font-size: 14px; }
.steps { color: var(--slate-700); }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }
.pill { display: inline-block; background: #faf5ff; color: #9333ea; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.meaning { background: var(--slate-50); border-radius: 10px; padding: 8px 10px; }
.warn { margin: 6px 0 0; padding-left: 18px; font-size: 12px; color: var(--slate-500); }
.words { display: grid; gap: 8px; margin: 8px 0; }
.letters { display: flex; flex-wrap: wrap; gap: 4px; }
.letters span { display: grid; place-items: center; min-width: 30px; padding: 2px 4px; border: 1px solid var(--slate-200); border-radius: 8px; font-size: 12px; color: var(--slate-600); }
.letters b { color: var(--slate-900); font-size: 14px; }
.word p { margin: 2px 0 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--slate-200); }
th { font-size: 12px; color: var(--slate-500); font-weight: 600; }
.card table { display: block; overflow-x: auto; }
@media (min-width: 520px) { .card table { display: table; } }

/* Lo Shu */
.loshu { display: grid; grid-template-columns: repeat(3, 56px); gap: 6px; flex: none; }
.loshu div { height: 56px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 16px; text-align: center; line-height: 1.1; background: var(--orange-50); color: var(--orange-d); border: 1px solid #fcd9b0; }
.loshu div.miss { background: var(--slate-50); color: var(--slate-300); border: 1px dashed var(--slate-200); font-weight: 500; font-size: 14px; }
.ls-wrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ls-note { font-size: 13px; color: var(--slate-600); line-height: 1.6; min-width: 0; }
.pd { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.pd .num { flex: none; width: 64px; height: 64px; border-radius: 18px; background: var(--blue-50); color: var(--blue-d); font-size: 30px; font-weight: 800; display: grid; place-items: center; }
.pd p { margin: 0; font-size: 13px; color: var(--slate-600); }

/* text helpers */
.prose p { margin: 0 0 10px; font-size: 15px; }
.prose h3 { margin-top: 14px; }
.muted { color: var(--slate-500); }
.small { font-size: 13px; }
.strong { font-weight: 700; }
.center { text-align: center; }

footer { max-width: 880px; margin: 0 auto; padding: 0 16px 32px; }
.foot { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 13px; }
.foot a { color: var(--slate-500); text-decoration: none; }
.disc { margin-top: 12px; font-size: 11px; color: var(--slate-500); text-align: center; }

/* admin dashboard (Phase 7) */
h4 { font-size: 14px; margin: 14px 0 6px; }
select { width: 100%; border: 1px solid var(--blue); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 15px; background: #fff; color: inherit; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--slate-100); }
.check:last-child { border-bottom: 0; }
.check > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.check .mark { flex: none; width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.check.ok .mark { background: #dcfce7; color: #15803d; }
.check.bad .mark { background: var(--red-50); color: var(--red); }
.pill { flex: none; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.pill.ok { background: #dcfce7; color: #15803d; }
.pill.bad { background: var(--red-50); color: var(--red); }
.ok-text { color: #15803d; }
.bad-text { color: var(--red); }
.mono, .cmd { font-family: ui-monospace, Consolas, monospace; }
.cmd { background: var(--slate-900); color: #f8fafc; border-radius: 10px; padding: 8px 12px; font-size: 13px; overflow-x: auto; margin: 6px 0 0; }
ul.plain { list-style: none; padding: 0; margin: 6px 0; }
ul.plain li { padding: 2px 0; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 8px; }
@media (min-width: 560px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats div { background: var(--blue-50); border-radius: 12px; padding: 10px; text-align: center; }
.stats b { display: block; font-size: 22px; color: var(--blue-d); }
.stats span { font-size: 12px; color: var(--slate-600); }
.mock.staging { background: #7c3aed; color: #fff; font-weight: 600; }

/* ---------- Legal Studio ---------- */
.search { display: flex; gap: 8px; margin: 14px 0 0; }
.search input { flex: 1; border: 0; border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--slate-900); }
.search button { flex: none; border: 0; border-radius: 12px; padding: 0 16px; font: inherit; font-weight: 700; background: #fff; color: var(--orange-d); cursor: pointer; }
.disc-box { background: #fff; border: 1px solid #fcd9b0; border-left: 4px solid var(--orange); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--slate-700); margin: 0 0 16px; }
.vs { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; white-space: nowrap; vertical-align: middle; }
.vs.SOURCE_MATCHED { background: var(--blue-50); color: var(--blue-d); }
.vs.HUMAN_REVIEWED { background: #dcfce7; color: #15803d; }
.vs.AI_DRAFT, .vs.UNVERIFIED, .vs.SAMPLE_REVIEW_REQUIRED, .vs.COMMENCEMENT_NOT_VERIFIED { background: #fffbeb; color: #b45309; }
.vs.NEEDS_CORRECTION, .vs.REPEALED, .vs.ROLLED_BACK { background: var(--red-50); color: var(--red); }
.vs.IN_FORCE, .vs.PUBLISHED { background: #f0fdf4; color: #15803d; }
.law { white-space: pre-wrap; font-size: 15px; line-height: 1.7; margin: 0; }
.law-num { font-size: 13px; font-weight: 700; color: var(--orange-d); }
.prov { background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 12px; padding: 10px 12px; font-size: 12px; color: var(--slate-600); margin-top: 12px; overflow-wrap: anywhere; }
.prov dt { font-weight: 700; color: var(--slate-700); }
.prov dd { margin: 0 0 6px; }
.sec-list { list-style: none; margin: 0; padding: 0; }
.sec-list li a { display: flex; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--slate-100); text-decoration: none; color: var(--slate-900); }
.sec-list li a b { flex: none; min-width: 44px; color: var(--orange-d); }
.filter { width: 100%; border: 1px solid var(--blue); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 16px; margin-bottom: 10px; }
.pager { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; }
mark { background: #fef08a; padding: 0 2px; border-radius: 3px; }
.crumbs { font-size: 13px; margin-bottom: 8px; color: var(--slate-500); }
.crumbs a { text-decoration: none; }
.flash { min-height: 220px; display: flex; flex-direction: column; justify-content: center; text-align: center; font-size: 18px; cursor: pointer; }
.flash .back { color: var(--blue-d); margin-top: 12px; font-size: 16px; }
.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.grades button { border: 1px solid var(--slate-200); border-radius: 12px; background: #fff; padding: 10px 4px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.opts { display: grid; gap: 8px; margin-top: 10px; }
.opts button { text-align: left; border: 1px solid var(--slate-200); border-radius: 12px; background: #fff; padding: 10px 12px; font: inherit; font-size: 15px; cursor: pointer; }
.opts button.right { background: #dcfce7; border-color: #16a34a; }
.opts button.wrong { background: var(--red-50); border-color: var(--red); }
.bar-bg { height: 8px; background: var(--slate-100); border-radius: 99px; overflow: hidden; }
.bar-bg span { display: block; height: 100%; background: linear-gradient(to right, var(--orange), var(--blue)); }
textarea { width: 100%; border: 1px solid var(--blue); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 15px; min-height: 90px; background: #fff; }
.draft-preview { white-space: pre-wrap; font-family: "Noto Serif", Georgia, serif; font-size: 14px; line-height: 1.7; border: 1px dashed var(--slate-300); border-radius: 12px; padding: 16px; background: #fff; position: relative; }
.ph { background: #fef3c7; color: #92400e; border-radius: 4px; padding: 0 3px; }
.map-row td:first-child, .map-row td:nth-child(2) { white-space: nowrap; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 14px; }
.kv dt { color: var(--slate-500); }
.kv dd { margin: 0; }
.case-sec h4 { color: var(--blue-d); margin: 12px 0 4px; }
.case-sec p { margin: 0; font-size: 15px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs a, .tabs button { border: 1px solid var(--slate-200); background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; text-decoration: none; color: var(--slate-700); cursor: pointer; }
.tabs .on { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 700; }
@media print {
  header, footer, .no-print, .note, .disc-box { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: none; }
  .draft-preview { border: 0; padding: 0; }
  .card { border: 0; box-shadow: none; padding: 0; }
}
.card-link { display: block; text-decoration: none; color: inherit; }
progress { width: 100%; height: 8px; accent-color: var(--orange); }
details summary { cursor: pointer; color: var(--blue-d); font-size: 13px; margin: 6px 0; }
