/* ==========================================================================
   Daleel, application UI
   ========================================================================== */

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tone-green { color: var(--green-ink); } .tone-red { color: var(--red-ink); } .tone-orange { color: var(--orange-ink); } .tone-blue { color: var(--blue-ink); }
.ok-text { color: var(--green-ink); display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.ok-text .ic { width: 16px; height: 16px; }
.err-text { color: var(--red-ink); font-weight: 500; }
kbd { font: 600 12px var(--mono); padding: 2px 6px; border-radius: 6px; background: var(--soft-2); border: 1px solid var(--line); }
.m0 { margin: 0; }
.w-auto { width: auto; }
.w-80 { width: 90px; }
.field-sm { height: 36px; font-size: 14px; padding: 0 12px; border-radius: 10px; }
select.field-sm { padding-right: 34px; background-position: right 12px center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid2 > *, .grid3 > *, .upcs > *, .studies > *, .stats > * { min-width: 0; } /* wide charts scroll inside their box instead of widening the page */
.gap { gap: 18px; }
.fld { display: grid; align-content: start; }
.fld.inline { display: flex; align-items: center; gap: 10px; }
.fld.check { gap: 8px; cursor: pointer; }
.fld.check input { width: 17px; height: 17px; accent-color: var(--blue); }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--faint); cursor: pointer; display: grid; place-items: center; transition: background .2s, color .2s; }
.icon-btn:hover { background: rgba(0, 0, 0, .06); color: var(--ink); }
.icon-btn .ic { width: 16px; height: 16px; }

/* ---------- Top bar ---------- */
.tb {
  position: sticky; top: 0; z-index: 40; height: 54px;
  display: flex; align-items: center; gap: 18px; padding: 0 20px;
  background: color-mix(in srgb, var(--bg-app) 80%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
/* The symbol alone (the 24 px pixel master at exactly 24 px, on whole pixels inside a 36 px button): the project name
   and the crumbs carry the words. */
.tb-brand { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; margin-left: -6px; border-radius: 10px; color: var(--mark); text-decoration: none !important; transition: background-color var(--dur-1) var(--ease); }
.tb-brand:hover { background: var(--soft); }
.tb-brand svg { display: block; width: 24px; height: 24px; }

/* ---------- App canvas ---------- */
/* One keyboard focus style for every control (component rules such as .field and .cell keep their own ring). */
body.app :where(a, button, summary, select, [tabindex]:not([tabindex="-1"]), input[type=checkbox], input[type=radio], input[type=range], input[type=color]):focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
body.app { background: var(--bg-app); accent-color: var(--accent); }
body.app * { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
body.app ::-webkit-scrollbar { width: 10px; height: 10px; }
body.app ::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border: 3px solid transparent; border-radius: 99px; background-clip: padding-box; }
body.app ::-webkit-scrollbar-track { background: transparent; }
.tb-crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; color: var(--muted); }
.tb-crumbs a { color: var(--muted); }
.tb-crumbs .ic { width: 14px; height: 14px; color: var(--faint); }
.tb-crumbs span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); font-weight: 500; }
.crumb-t { max-width: 46vw; }
.crumb-proj { display: none; }
@media (max-width: 980px) { .crumb-step { display: none; } .crumb-proj { display: inline; } }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.tb-link { font-size: 13px; color: var(--muted); padding: 6px 10px; border-radius: 8px; }
.tb-link:hover { background: var(--fill-1); text-decoration: none; color: var(--ink); }
.tb-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); transition: background-color var(--dur-1) var(--ease); }
.tb-icon:hover { background: var(--fill-1); }
/* Laptops with short screens (560 to 760 px tall): the work starts higher, the footer stays visible. */
@media (max-height: 760px) and (min-width: 681px) {
  .stage { padding-top: 26px; }
  .st-head { margin-bottom: 18px; }
  .st-title { font-size: 28px; }
  .st-lead { margin-top: 6px; font-size: 15.5px; }
  .st-foot { margin-top: 20px; padding: 10px 0 12px; }
}
.view { min-height: calc(100vh - 54px); }

/* ---------- Home ---------- */
.home, .settings { max-width: 1040px; margin: 0 auto; padding: 64px 24px 120px; }
.home { padding-top: 48px; }
/* Returning author: projects first, under one calm left-aligned heading. */
.home-head { margin: 0 0 28px; }
.home-title { margin: 0; font: 700 30px/1.15 var(--font-display); letter-spacing: -.022em; color: var(--ink); text-wrap: balance; }
.home-head .mobile-note { text-align: left; margin-top: 10px; }
/* First visit: the welcome, centred, with the Paraf signature once per session. */
.home-hero { text-align: center; max-width: 680px; margin: 16px auto 48px; }
.home-hero .eyebrow { font-size: 13px; color: var(--accent-ink); margin: 0 0 10px; }
.home-hero-title { margin: 0; font: 700 clamp(32px, 3.6vw, 44px)/1.1 var(--font-display); letter-spacing: -.026em; color: var(--ink); text-wrap: balance; }
.home-lead { max-width: 56ch; margin: 14px auto 0; font-size: 17px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.home-demo { margin-top: 18px; font-size: 15px; }
.home-sign { display: block; width: 48px; height: 48px; margin: 0 auto 18px; color: var(--mark); overflow: visible; }
.home-sign mask path { fill: none; stroke: #fff; stroke-linejoin: round; }
.home-sign .s1 { stroke-width: 13; } .home-sign .s2 { stroke-width: 15; } .home-sign .s3 { stroke-width: 12; }
@media (prefers-reduced-motion: no-preference) {
  .home-sign mask path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: dr-write 450ms var(--ease-in-out) forwards; }
  .home-sign .s2 { animation-duration: 340ms; animation-delay: 380ms; }
  .home-sign .s3 { animation-duration: 140ms; animation-delay: 720ms; animation-timing-function: var(--ease-flick); }
  .home-sign.is-seen mask path { animation: none; stroke-dashoffset: 0; }
  .home-hero > :not(.home-sign) { animation: rise var(--dur-4) var(--ease-out) both; }
  .home-hero > .eyebrow { animation-delay: 120ms; } .home-hero > .home-hero-title { animation-delay: 180ms; }
  .home-hero > .home-lead { animation-delay: 260ms; } .home-hero > .home-demo { animation-delay: 320ms; }
}
@keyframes dr-write { to { stroke-dashoffset: 0; } }
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.types.types-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .types { grid-template-columns: repeat(2, 1fr); } }
.types-soon { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.types .type { min-height: 0; padding: 20px 20px 22px; gap: 4px; }
.types .type-n { font-size: 17px; }
.home-head + .home-sec-first > .h3 { margin: 0 0 12px; font: 600 12px/1.2 var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.type {
  position: relative; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-l);
  padding: 24px 24px 22px; display: grid; gap: 6px; align-content: start; cursor: pointer; min-height: 168px;
  box-shadow: var(--shadow-s); transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s;
}
button.type:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(var(--brand-rgb), .3); }
button.type:active { transform: translateY(-1px) scale(.99); }
.type-ic { width: 36px; height: 36px; border-radius: var(--r-s); display: grid; place-items: center; background: var(--accent-wash); color: var(--accent-ink); margin-bottom: 10px; }
.type-n { font-size: 18px; font-weight: 600; letter-spacing: -.018em; }
.type-d { font-size: 14px; color: var(--muted); }
.type-tag { position: absolute; top: 18px; right: 18px; font-size: 11.5px; font-weight: 600; color: var(--blue-ink); background: var(--blue-wash); padding: 4px 9px; border-radius: 99px; }
.type-go { position: absolute; right: 20px; bottom: 18px; color: var(--accent-ink); opacity: 0; transform: translateX(-6px); transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
button.type:hover .type-go { opacity: 1; transform: none; }
.type.soon { cursor: default; background: transparent; border-style: dashed; box-shadow: none; min-height: 0; padding: 18px 20px; grid-template-columns: auto 1fr auto; align-items: center; }
.type.soon .type-ic { margin: 0; background: var(--soft); color: var(--faint); width: 36px; height: 36px; }
.type.soon .type-n { font-size: 15px; color: var(--muted); }
.type-soon { font-size: 11.5px; font-weight: 600; color: var(--faint); background: var(--soft); padding: 4px 9px; border-radius: 99px; }
.types.focus button.type { animation: rise .7s var(--ease-out) both; }
.home-sec { margin-top: 64px; }
.home-sec .h3 { margin-bottom: 18px; }
.projs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.proj { position: relative; display: flex; flex-direction: column; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow-s); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.proj:hover, .proj:focus-within { transform: translateY(-3px); box-shadow: var(--shadow); }
.proj-main { display: grid; gap: 10px; padding: 20px 22px 12px; color: var(--ink); text-decoration: none !important; border-radius: var(--r-l) var(--r-l) 0 0; flex: 1; }
.proj-main:focus-visible { outline: 3px solid rgba(var(--brand-rgb), .45); outline-offset: -3px; }
.proj-acts { display: flex; justify-content: flex-end; gap: 4px; padding: 0 14px 12px; }
.proj-acts .icon-btn { width: 36px; height: 36px; color: var(--muted); }
.proj.is-finished .proj-bar i { background: var(--success); }
.icon-btn-red:hover { background: var(--red-wash); color: var(--red-ink); }
.proj-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.proj-top .tiny { margin-left: auto; }
.dl-chip { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 4px 10px; border-radius: 99px; background: var(--soft-2); color: var(--muted); font-size: 12px; font-weight: 600; }
.dl-chip .ic { width: 13px; height: 13px; }
.dl-chip.soon { background: var(--orange-wash); color: var(--orange-ink); }
.rail-proj .dl-chip { margin-top: 10px; }
.home-sec-first { margin-top: 8px; margin-bottom: 56px; }
.home-sec-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.home-sec-h .h3 { margin: 0; }
.home-sec .home-mode { margin: 0 0 22px; justify-content: flex-start; }
.mode-desc { flex-basis: 100%; margin: 0; }
.mobile-note { display: none; text-align: center; }
.mobile-note .ic { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.goal-list { display: grid; gap: 8px; margin-top: 12px; }
.goal { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; font: inherit; font-size: 14px; cursor: pointer; transition: border-color .2s, background .2s; }
.goal:hover, .goal:focus-visible { border-color: var(--accent); background: var(--accent-wash); }
.goal .ic { width: 16px; height: 16px; color: var(--faint); flex: none; }
.help-btn { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 6px; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); color: var(--blue-ink); font: 700 12px/1 var(--font); cursor: pointer; vertical-align: middle; flex: none; position: relative; }
.help-btn::after { content: ""; position: absolute; inset: -8px; } /* 38px touch area around the small circle */
.help-btn:hover { background: var(--blue-wash); border-color: rgba(var(--brand-rgb), .4); }
.label-row { display: flex; align-items: center; gap: 2px; margin: 0 0 7px; }
.label-row .label { margin: 0; }
.help-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.help-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: 500 12px/1.2 var(--font); cursor: pointer; }
.help-chip span { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--blue-wash); color: var(--blue-ink); font-weight: 700; font-size: 11px; }
.help-chip:hover { border-color: rgba(var(--brand-rgb), .4); }
.gloss { display: grid; gap: 4px; margin-top: 6px; }
.gloss details { border-bottom: 1px solid var(--line); padding: 8px 2px; }
.gloss summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
.gloss p { margin: 8px 0 4px; }
/* The finish line: arrival, then one clear way to take the paper. Green here is a real success. */
.finish-card { padding: 28px; border-color: var(--success-line); background: var(--surface); }
.finish-h { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.finish-ic { width: 44px; height: 44px; border-radius: 50%; background: var(--success); color: var(--on-accent); display: grid; place-items: center; flex: none; }
.finish-ic .ic { width: 22px; height: 22px; stroke-width: 2.4; }
.finish-t { flex: 1 1 280px; min-width: 0; }
.finish-t h3 { margin: 0; font: 600 20px/1.25 var(--font-display); letter-spacing: -.016em; color: var(--ink); }
.finish-t p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.finish-dl { display: flex; gap: 10px; flex-wrap: wrap; }
.finish-more { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.finish-l { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.finish-more .btn-ghost { padding: 0 10px; }
.finish-next { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.finish-next p { margin: 0; flex: 1 1 320px; }
.proj-t { margin: 0; font-size: 15.5px; font-weight: 600; letter-spacing: -.012em; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.proj-bar { height: 5px; border-radius: 9px; background: var(--soft-2); overflow: hidden; }
.proj-bar i { display: block; height: 100%; background: var(--accent-stroke); border-radius: inherit; }
.proj-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.empty { text-align: center; padding: 40px 24px; border-radius: var(--radius-l); border: 0; background: var(--surface-2); color: var(--muted); display: grid; justify-items: center; gap: 8px; }
.empty-ic { width: 44px; height: 44px; border-radius: var(--r); background: var(--surface); display: grid; place-items: center; color: var(--accent-ink); box-shadow: var(--elev-1); }

/* ---------- Settings ---------- */
.settings { max-width: 920px; }
.set-head { margin-bottom: 30px; }
.set-head .lead { margin-top: 12px; }
.link-back { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; margin-bottom: 14px; }
.link-back .ic { width: 16px; height: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 26px 28px; margin-bottom: 18px; box-shadow: var(--shadow-s); }
.card.slim { padding: 14px 18px; }
.set-card-h { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.set-card-h p { margin: 4px 0 0; }
.set-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; color: var(--ink-2); flex: none; }

/* ---------- Tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 12px; background: var(--soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl-small { font-size: 12.5px; }
.tbl-small th, .tbl-small td { padding: 8px 10px; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.tbl-note { font-size: 12px; color: var(--muted); margin: 8px 2px 0; }
.mono-cell { font-family: var(--mono); font-size: 11.5px; word-break: break-word; }
.rob-cell { text-align: center; }
.rob { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 14px; line-height: 1; }
.rob-low { background: var(--green); } .rob-some { background: #ffcc00; color: #5c4400; } .rob-high { background: var(--red); } .rob-unclear { background: #c7c7cc; }

/* ---------- Project shell ---------- */
.shell { display: grid; grid-template-columns: 272px 1fr; min-height: calc(100vh - 54px); }
.rail { position: sticky; top: 54px; height: calc(100vh - 54px); overflow-y: auto; padding: 22px 16px 24px; border-right: 1px solid var(--line); background: var(--bg-rail); display: flex; flex-direction: column; scrollbar-color: transparent transparent; }
.rail:hover { scrollbar-color: var(--scroll-thumb) transparent; }
.rail-back { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--muted); padding: 4px 6px; border-radius: 8px; align-self: flex-start; }
.rail-back .ic { width: 15px; height: 15px; }
.rail-back:hover { background: var(--fill-1); text-decoration: none; color: var(--ink); }
.rail-proj { padding: 14px 8px 8px; }
.rail-title { margin: 10px 0 0; font-size: 15px; line-height: 1.35; font-weight: 600; letter-spacing: -.012em; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.rail-steps { display: grid; gap: 0; margin-top: 6px; }
.rail-phase { margin: 16px 10px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
/* The step rail, "benang merah": dots on a 1.5 px thread, in the accent up to the current step and neutral after it.
   Done is a filled 8 px dot, the current step a 10 px dot with a halo, the next ones a 10 px ring. No glyph and no green
   here, apart from the last dot of a finished project. The numbers and checks stay in the markup for screen readers. */
.rs { position: relative; display: flex; align-items: center; gap: 12px; min-height: 36px; padding: 6px 10px; border-radius: 10px; font-size: 14px; color: var(--ink-2); text-decoration: none !important; transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
a.rs:hover { background: var(--fill-1); }
.rs::before { content: ""; position: absolute; left: 20.25px; top: 0; bottom: 0; width: 1.5px; background: var(--line-2); }
.rail-phase + .rs::before, .rail-steps > .rs:first-child::before { top: 50%; }
.rs:has(+ .rail-phase)::before, .rail-steps > .rs:last-child::before { bottom: 50%; }
.rail-phase + .rs:has(+ .rail-phase)::before, .rail-phase + .rs:last-child::before { display: none; }
.rs.is-done::before { background: var(--accent-stroke); }
.rs-cur:not(.is-done)::before { background: linear-gradient(var(--accent-stroke) 50%, var(--line-2) 50%); }
.rs-dot { position: relative; z-index: 1; width: 22px; height: 22px; display: grid; place-items: center; flex: none; font-size: 0; color: transparent; }
.rs-dot > .ic { display: none; }
.rs-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--bg-rail); box-shadow: inset 0 0 0 1.5px var(--line-control); transition: transform var(--dur-3) var(--ease-in-out), background-color var(--dur-3) var(--ease-in-out); }
.rs.is-done .rs-dot::after { width: 8px; height: 8px; background: var(--accent-stroke); box-shadow: none; }
.rs-next .rs-dot::after { box-shadow: inset 0 0 0 1.5px var(--accent-stroke); }
.rs-cur { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--elev-1); }
.rs-cur .rs-dot::after, .rs-cur.is-done .rs-dot::after { width: 10px; height: 10px; background: var(--accent-stroke); box-shadow: 0 0 0 3px var(--brand-wash); }
.rs-here { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--accent-ink); white-space: nowrap; }
/* The finished project: the last dot turns green, the only green in the rail. */
.rail-steps > .rs:last-child.is-done .rs-dot::after { background: var(--success); }
/* The step that needs the author again (its result was taken back): its reason is in the title. */
.rs-attn:not(.rs-cur) .rs-dot::after { box-shadow: inset 0 0 0 1.5px var(--orange); }
.rs-attn:not(.rs-cur) { color: var(--orange-ink); }
.rs-lock { color: var(--faint); cursor: not-allowed; }
.rs-lock .rs-dot::after { opacity: .7; }
/* Locked steps are buttons, so a tap can say what is missing; they look exactly like the other rail items. */
button.rs { width: 100%; margin: 0; border: 0; background: transparent; letter-spacing: inherit; text-align: left; appearance: none; }
button.rs:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.rs .spin { width: 14px; height: 14px; stroke: var(--accent-stroke); }
.rs-dot:has(.spin)::after { display: none; }

.stage { min-width: 0; padding: 40px 48px 40px; }
/* One stable left edge on every step: the stage is always 1040 px wide; narrow steps limit their content to 860 px
   from that same edge instead of centring a narrower stage (which moved titles about 90 px between steps). */
.stage-in { max-width: 1040px; margin: 0 auto; }
.stage-in:not(.wide) .step > * { max-width: 860px; }
.step-enter > * { animation: rise .55s var(--ease-out) both; }
.step-enter > *:nth-child(2) { animation-delay: .05s; } .step-enter > *:nth-child(3) { animation-delay: .1s; } .step-enter > *:nth-child(4) { animation-delay: .15s; } .step-enter > *:nth-child(n+5) { animation-delay: .2s; }

/* ---------- Step chrome ---------- */
.st-head { margin-bottom: 28px; }
.st-title { margin: 0; font-family: var(--font-display); font-size: clamp(28px, 2.8vw, 36px); line-height: 1.1; font-weight: 700; letter-spacing: -.022em; text-wrap: balance; }
.st-lead { margin: 12px 0 0; font-size: 18px; line-height: 1.45; color: var(--muted); max-width: 720px; letter-spacing: -.012em; }
.st-foot { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 30px; padding: 16px 0 20px; background: linear-gradient(to bottom, transparent, var(--bg-app) 35%); }
.st-foot .btn-primary { min-width: 150px; }
/* Why "Lanjut" is not available yet, beside it (ui.js foot / setNext). */
.foot-why { font-size: 13px; line-height: 1.35; color: var(--muted); text-align: right; max-width: 320px; }
.foot-why:empty { display: none; }
.sub-h { margin: 24px 0 12px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mini-h { margin: 18px 0 10px; font-size: 14px; font-weight: 600; }
.card-h { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.card-h .ic { color: var(--muted); }
.card-h-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-h-row .card-h { margin: 0; }
.demo-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r); background: var(--orange-wash); color: var(--warning-text); font-size: 14px; line-height: 1.5; margin-bottom: 18px; }
.demo-banner .ic { color: var(--orange-ink); margin-top: 1px; }
.err-card { border-color: rgba(255, 59, 48, .3); }
.view-msg { max-width: 560px; margin: 56px auto; padding: 0 16px; }
.need-ai { display: flex; gap: 18px; align-items: flex-start; padding: 28px; }
.need-ai p { margin: 6px 0 0; }
.need-ic { width: 48px; height: 48px; border-radius: 15px; flex: none; display: grid; place-items: center; color: var(--on-accent); background: var(--accent-stroke); }

/* ---------- Progress panel ---------- */
.proc { display: grid; grid-template-columns: 96px 1fr; gap: 24px; padding: 30px 30px 28px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); animation: rise .6s var(--ease-out) both; }
.proc-ring { position: relative; width: 92px; height: 92px; }
.proc-ring svg { width: 92px; height: 92px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--soft-2); stroke-width: 6; }
.ring-fg { fill: none; stroke: var(--accent-stroke); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset var(--dur-5) var(--ease-in-out); }
/* Garis tulis: a calm stroke under the step name while the work runs (brand motion; never a fake progress). */
.proc:not(.is-err) .proc-title::after { content: ""; display: block; width: 56px; height: 2px; margin-top: 8px; border-radius: 1px; background: var(--accent-stroke); transform-origin: left; animation: dr-line 1400ms var(--ease-in-out) infinite; }
.proc-strip:not(.is-err) .proc-title::after { width: 40px; margin-top: 5px; }
@keyframes dr-line { 0% { transform: scaleX(0); opacity: 1; } 85% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .proc .proc-title::after { animation: none; } }
.proc.is-err .ring-fg { stroke: var(--red); }
.proc-pct { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.proc-title { margin: 6px 0 4px; font-size: 20px; letter-spacing: -.02em; }
.proc-sub { margin: 0 0 18px; color: var(--muted); font-size: 14px; min-height: 20px; }
.proc-phases { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.proc-time { margin: 16px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.proc-time:empty { display: none; }
.proc-main { min-width: 0; }
.proc-detail summary { cursor: pointer; }
.proc-detail p { margin: 6px 0 0; overflow-wrap: anywhere; }
.late-show { opacity: 0; pointer-events: none; animation: late-show .3s ease 5s forwards; }
@keyframes late-show { to { opacity: 1; pointer-events: auto; } }
.proc-phases li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: var(--faint); transition: color .3s; }
.proc-phases li.now { color: var(--ink); font-weight: 600; }
.proc-phases li.done { color: var(--ink-2); }
.proc-phases li.err { color: var(--red-ink); }
.ph-dot { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid rgba(0, 0, 0, .15); display: grid; place-items: center; flex: none; transition: background-color var(--dur-3) var(--ease), border-color var(--dur-3) var(--ease), color var(--dur-3) var(--ease), transform var(--dur-3) var(--spring); }
.proc-phases li.now .ph-dot { border-color: var(--blue); box-shadow: 0 0 0 0 rgba(var(--brand-rgb), .45); animation: pulse 1.6s infinite; background: var(--blue); }
.proc-phases li.done .ph-dot { background: var(--accent-stroke); border-color: var(--accent-stroke); color: var(--on-accent); animation: pop var(--dur-3) var(--spring); }
.ph-dot .ic { width: 12px; height: 12px; stroke-width: 3; }
/* No progress for 15 s (the AI is thinking): the percentage steps aside and the ring turns, so nothing looks frozen and
   nothing pretends to advance. The reduced-motion rule in base.css stops the turning. */
.proc-pct { transition: opacity .3s ease; }
.proc.is-wait .proc-pct { opacity: 0; }
.proc.is-wait .proc-ring svg { animation: ring-wait 1.6s linear infinite; }
@keyframes ring-wait { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
@media (prefers-reduced-motion: reduce) { .proc.is-wait .proc-pct { opacity: 1; } }
/* A rerun with the current version still on screen (ui.js progressStrip / busyView): one compact strip under the
   title, then the current version, read-only until the new one is ready. */
.proc.proc-strip { grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 22px; border-radius: var(--r); box-shadow: var(--shadow-s); }
.proc-strip .proc-ring, .proc-strip .proc-ring svg { width: 44px; height: 44px; }
.proc-strip .proc-pct { font-size: 11px; letter-spacing: 0; }
.proc-strip .proc-title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
.proc-strip .proc-sub { margin: 0; min-height: 0; font-size: 13px; }
.proc-strip .proc-sub:empty { display: none; }
.proc-note { margin: 2px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--faint); }
.proc-strip .proc-time { margin: 2px 0 0; font-size: 12.5px; }
.proc-acts { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.is-busy .field:read-only, .is-busy .field:disabled { background: var(--soft); }
.is-busy .field:read-only:focus { border-color: var(--line-2); box-shadow: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(var(--brand-rgb), .45); } 70% { box-shadow: 0 0 0 8px rgba(var(--brand-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--brand-rgb), 0); } }

/* ---------- Dropzone & files ---------- */
.drop { display: grid; justify-items: center; gap: 6px; padding: 38px 20px; border-radius: 18px; border: 2px dashed rgba(0, 0, 0, .14); background: var(--soft); text-align: center; cursor: pointer; transition: border-color .25s, background .25s, transform .3s var(--ease); }
.drop:hover { border-color: rgba(var(--brand-rgb), .45); background: var(--brand-wash-solid); }
.drop.over { border-color: var(--blue); background: var(--blue-wash); transform: scale(1.01); }
.drop:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .18); background: var(--brand-wash-solid); }
.drop-ic { width: 46px; height: 46px; border-radius: 14px; background: #fff; display: grid; place-items: center; color: var(--blue); box-shadow: var(--shadow-s); margin-bottom: 6px; transition: transform .4s var(--spring); }
.drop.over .drop-ic { transform: translateY(-4px) scale(1.06); }
.drop-t { font-weight: 600; font-size: 15.5px; }
.drop-s { font-size: 13px; color: var(--muted); }
.drop-s u { color: var(--blue-ink); text-decoration: none; }
.drop-compact { padding: 18px 14px; gap: 2px; border-radius: 14px; }
.drop-compact .drop-ic { width: 34px; height: 34px; border-radius: 10px; margin-bottom: 4px; }
.drop-compact .drop-ic .ic { width: 17px; height: 17px; }
.drop-compact .drop-t { font-size: 14px; }
.drop-compact .drop-s { font-size: 11.5px; }
.files { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.files li { display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 12px; border-radius: 12px; background: var(--soft); animation: rise .35s var(--ease-out) both; }
.files.sm li { padding: 7px 8px 7px 10px; font-size: 13px; }
.file-ic { color: var(--muted); display: grid; }
.file-ic .ic { width: 17px; height: 17px; }
.file-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }

/* ---------- Rules summary ---------- */
.rules-sum .rs-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.rules-notes { margin-top: 22px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.rules-notes h4 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.rules-notes ul { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 4px; }

/* ---------- Topic / chips ---------- */
.topic { display: grid; gap: 18px; }
.chipbox { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 84px; padding: 16px 18px; border-radius: 22px; border: 1.5px solid var(--line-2); background: var(--surface); cursor: text; box-shadow: var(--shadow); transition: border-color .25s, box-shadow .3s; }
.chipbox:focus-within { border-color: var(--blue); box-shadow: 0 0 0 5px rgba(var(--brand-rgb), .13), var(--shadow); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 8px 0 16px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 17px; font-weight: 500; letter-spacing: -.012em; animation: pop .45s var(--spring) both; }
.chip button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .2s; }
.chip button:hover { background: rgba(255, 255, 255, .3); }
.chip .ic { width: 13px; height: 13px; stroke-width: 2.4; }
.chip-in { flex: 1; min-width: 200px; border: 0; outline: 0; background: transparent; font: inherit; font-size: 22px; letter-spacing: -.02em; padding: 4px 4px; color: var(--ink); }
.chip-in::placeholder { color: #b0b0b6; }
.kw-echo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.kw-echo .chip { height: 32px; font-size: 14px; padding: 0 14px; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ex { border: 1px solid var(--line-2); background: var(--surface); border-radius: 99px; padding: 7px 14px; font-size: 13px; color: var(--ink-2); cursor: pointer; transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.ex:hover { border-color: var(--blue); color: var(--blue-ink); transform: translateY(-1px); }
.note-d summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; color: var(--blue-ink); font-weight: 500; list-style: none; }
.note-d summary::-webkit-details-marker { display: none; }
.note-d summary .ic { width: 16px; height: 16px; }
.note-d textarea { margin-top: 10px; min-height: 70px; }
.note-d .fb-chips { margin-top: 10px; }
textarea.field.fb-ta { min-height: 70px; }
.topic-go { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- Title cards ---------- */
.tcards { display: grid; gap: 16px; }
.tcard { position: relative; display: grid; grid-template-columns: 44px 1fr auto; gap: 18px; align-items: start; padding: 24px 24px 22px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s); transition: transform .5s var(--ease), box-shadow .5s var(--ease), opacity .45s, border-color .3s; animation: rise .6s var(--ease-out) both; }
.tcards > .tcard:nth-child(2) { animation-delay: .08s; } .tcards > .tcard:nth-child(3) { animation-delay: .16s; }
.tcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tcard.top { border-color: rgba(var(--brand-rgb), .25); }
.tcard.picked { border-color: var(--blue); box-shadow: 0 0 0 5px rgba(var(--brand-rgb), .14), var(--shadow); transform: scale(1.01); }
.tcard.faded { opacity: .4; transform: scale(.985); }
.tc-rank { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-display); font-size: 18px; font-weight: 700; background: var(--soft); color: var(--ink-2); }
.tcard.top .tc-rank { background: var(--accent); color: var(--on-accent); }
.tc-title { margin: 2px 0 6px; font-size: 20px; line-height: 1.32; letter-spacing: -.02em; font-weight: 650; font-weight: 600; }
.tc-alt { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.tc-pitch { margin: 0 0 14px; font-size: 15px; color: var(--ink-2); }
.tc-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.tc-wc { margin: -2px 0 8px; }
.met { padding: 10px 12px; border-radius: 12px; background: var(--soft); display: grid; gap: 2px; }
.met span { font-size: 11.5px; color: var(--muted); }
.met b { font-size: 16px; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.tc-warn { display: flex; gap: 8px; align-items: center; margin: 12px 0 0; font-size: 13px; color: var(--orange-ink); }
.tc-warn .ic { width: 16px; height: 16px; }
.tc-more { margin-top: 12px; }
.tc-more summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--blue-ink); }
.tc-detail { margin-top: 12px; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.tc-detail p { margin: 0; }
.tc-act { align-self: center; display: grid; gap: 8px; }
.tc-own { margin: 0 0 8px; }
/* The research title, edited in place (Pilih judul, the protocol's question card); the abstract editor keeps its own look. */
textarea.field.ed-title { min-height: 0; resize: none; overflow: hidden; padding: 10px 14px; font-size: 18px; font-weight: 600; line-height: 1.4; letter-spacing: -.015em; }
.tc-body > textarea.ed-title { margin: 0 0 2px; }
.cur-title { flex-wrap: wrap; margin-bottom: 16px; }
.cur-title > span { flex: 1 1 280px; }
.cur-title-b { flex: 1 1 280px; min-width: 0; display: grid; gap: 6px; }
.cur-title-b textarea.ed-title { font-size: 16px; background: var(--surface); }
.title-sugg { flex-wrap: wrap; }
.title-sugg > span:not(.spacer) { flex: 1 1 240px; }
.tcard.picked .tc-act .btn { animation: pop .45s var(--spring); }
.more-c { margin-top: 18px; }
.more-c summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--muted); padding: 8px 0; }
.tcards.small .tcard { padding: 18px; }
.tcards.small .tc-title { font-size: 16px; }
.pico { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.pico-i { padding: 12px 14px; border-radius: 12px; background: var(--soft); display: grid; align-content: start; gap: 3px; font-size: 13.5px; }
.pico-i b { font-family: var(--font-display); font-size: 18px; color: var(--blue); }
.pico-lg .pico-i { padding: 16px; font-size: 14.5px; background: var(--brand-wash-solid); border: 1px solid rgba(var(--brand-rgb), .1); }

/* ---------- Protocol ---------- */
.proto-title { margin: 0 0 16px; line-height: 1.3; }
.question { margin: 0 0 18px; padding: 16px 20px; border-left: 3px solid var(--blue); background: var(--blue-wash); border-radius: 0 14px 14px 0; font-size: 16px; color: var(--ink-2); }
.crit { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14.5px; }
.crit li { position: relative; padding-left: 26px; }
.crit li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; }
.crit.ok li::before { background: var(--green-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='%23248a3d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.crit.no li::before { background: var(--red-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7l10 10M17 7L7 17' fill='none' stroke='%23d70015' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/11px no-repeat; }
.ocs { display: grid; gap: 10px; }
.oc { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--soft); }
.oc p { margin: 2px 0 0; }
.kv { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; }
.kv div { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.kv dt { font-size: 12.5px; color: var(--muted); }
.kv dd { margin: 0; font-size: 14.5px; }
.concept { padding: 16px 0; border-top: 1px solid var(--line); }
.concept-n { font-weight: 600; margin-bottom: 10px; }
.concept textarea { min-height: 64px; font-size: 12.5px; }
.tips { margin: 8px 0 12px; padding-left: 18px; font-size: 14px; display: grid; gap: 6px; }
.timeline { display: grid; gap: 8px; }
.tl-i { display: flex; justify-content: space-between; padding: 10px 14px; border-radius: 12px; background: var(--soft); font-size: 14px; }
.ext { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.ext .ic { width: 13px; height: 13px; }

/* ---------- Search guide ---------- */
.db-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 14px; scrollbar-width: none; }
.db-tabs::-webkit-scrollbar { display: none; }
.db-tab { display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 16px 0 8px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.db-tab:hover { border-color: rgba(0, 0, 0, .25); }
.db-tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.db-badge { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: #fff; background: var(--c); flex: none; }
.db-badge.lg { width: 40px; height: 40px; border-radius: 12px; font-size: 13px; }
.guide-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.guide-top p { margin: 4px 0 0; }
.gsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.gsteps li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; position: relative; padding-bottom: 18px; }
.gsteps li::before { content: ""; position: absolute; left: 16px; top: 34px; bottom: 4px; width: 2px; background: var(--soft-2); }
.gsteps li:last-child::before { display: none; }
.gs-n { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; position: relative; z-index: 1; }
.gs-b p { margin: 6px 0 0; font-size: 15px; line-height: 1.5; }
.sbox { margin-top: 12px; border-radius: 16px; background: #1d1d1f; color: #f5f5f7; overflow: hidden; box-shadow: var(--shadow); }
.sbox-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 10px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.sbox-l { font-size: 12px; font-weight: 600; color: #a1a1a6; text-transform: uppercase; letter-spacing: .05em; }
.sbox .btn-gray { background: rgba(255, 255, 255, .12); color: #fff; }
.sbox .btn-gray:hover { background: rgba(255, 255, 255, .2); }
.sbox-code { margin: 0; padding: 14px 16px; font: 12.5px/1.65 var(--mono); white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto; }
.sbox-note { margin: 0; padding: 10px 16px 14px; font-size: 13px; color: #c7c7cc; border-top: 1px solid rgba(255, 255, 255, .08); }
.sbox .alt { padding: 0 0 4px; border-top: 1px solid rgba(255, 255, 255, .08); }
.sbox .alt summary { padding: 10px 16px; font-size: 13px; color: var(--accent-on-dark); cursor: pointer; }
.copy-btn.copied { background: var(--green) !important; color: #fff !important; }
.copy-btn.copied .ic { animation: pop .4s var(--spring); }
.guide-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.gf { display: flex; gap: 12px; }
.gf-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--soft); display: grid; place-items: center; color: var(--muted); flex: none; }
.gf p, .gf ul { margin: 4px 0 0; }
.gf ul { padding-left: 16px; display: grid; gap: 4px; }

/* ---------- Upload cards ---------- */
.upcs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.upc { padding: 18px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s); display: grid; gap: 12px; align-content: start; transition: border-color .3s, box-shadow .3s; }
.upc.has { border-color: rgba(52, 199, 89, .45); box-shadow: 0 0 0 4px rgba(52, 199, 89, .08), var(--shadow-s); }
.upc-h { display: flex; gap: 12px; align-items: center; }
.upc-h h3 { margin: 0; font-size: 16px; letter-spacing: -.015em; }
.upc-s { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.upc-busy { display: flex; align-items: center; gap: 10px; padding: 18px; border-radius: 14px; background: var(--soft); font-size: 14px; color: var(--muted); }
.upc-direct { justify-self: start; }
.sumbar { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 14px 18px; border-radius: 14px; background: var(--soft); color: var(--muted); font-size: 14.5px; transition: background .3s, color .3s; }
.sumbar.on { background: var(--green-wash); color: var(--success-ink); }

/* ---------- Stats & lists ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stats-6 { grid-template-columns: repeat(6, 1fr); margin: 14px 0 18px; }
.stat { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 2px; box-shadow: var(--shadow-s); }
.stat strong { font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stats-6 .stat strong { font-size: 20px; }
.stat span { font-size: 12.5px; color: var(--muted); }
.stat-blue { background: var(--accent-wash); border-color: transparent; }
.stat-blue strong { color: var(--accent-ink); }
.stat-blue span { color: var(--ink-2); }
/* Status tiles: green only for a real success (all studies checked, agreement 95% or more), orange for 'check this'. */
.stat-green { background: var(--success-wash); border-color: transparent; }
.stat-green strong { color: var(--success-ink); }
.stat-orange { background: var(--warning-wash); border-color: transparent; }
.stat-orange strong { color: var(--warning-ink); }
/* The paraf chip after the pooled estimate, and the trace it opens (brand: integrasi.md section 7). Screen only. */
.dr-paraf { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: .35em; padding: 0; border: 0; border-radius: 6px; background: var(--brand-wash); color: var(--accent-stroke); cursor: pointer; vertical-align: 3px; transition: background-color var(--dur-1) var(--ease); }
.stat-blue .dr-paraf { background: var(--surface); box-shadow: 0 0 0 1px rgba(var(--brand-rgb), .16); }
.dr-paraf:hover, .dr-paraf[aria-expanded="true"] { background: rgba(var(--brand-rgb), .14); }
.dr-paraf:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.dr-paraf svg { display: block; width: 14px; height: 14px; }
.dr-paraf path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: butt; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.stat-pooled strong { display: inline-flex; align-items: center; }
.trace { margin: 12px 0 4px; padding: 14px 16px; border-radius: var(--r); background: var(--brand-wash-solid); font-size: 14px; line-height: 1.5; color: var(--ink); }
.trace p { margin: 0; }
.trace p + p { margin-top: 6px; }
.trace-k { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent-ink); margin-bottom: 6px !important; }
.trace-k .ic { width: 14px; height: 14px; }
@media (prefers-reduced-motion: no-preference) {
  .trace:not([hidden]) { animation: rise var(--dur-3) var(--ease-out) both; }
  .dr-paraf[aria-expanded="true"] path { stroke-dashoffset: 1; animation: dr-write 180ms var(--ease-flick) forwards; }
}
@media print { .dr-paraf, .trace, [data-noexport] { display: none !important; } }
.ft-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.ft-head p { margin: 4px 0 0; }
.ftl { list-style: none; margin: 0; padding: 0; display: grid; }
.ftl li { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; padding: 13px 4px; border-top: 1px solid var(--line); align-items: center; }
.ftl-n { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.ftl-t { margin: 0; font-size: 14.5px; font-weight: 500; line-height: 1.4; }
.ftl-m { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.ftl-l { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.review summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; list-style: none; font-weight: 600; flex-wrap: wrap; }
.review summary::-webkit-details-marker { display: none; }
.review summary > span:first-child { display: inline-flex; align-items: center; gap: 10px; }
.rv-bar { display: flex; gap: 12px; align-items: center; margin: 18px 0 8px; flex-wrap: wrap; }
.rv-bar .field { max-width: 280px; }
.rv-list { display: grid; max-height: 560px; overflow-y: auto; }
.rv { display: flex; gap: 12px; align-items: center; padding: 10px 2px; border-top: 1px solid var(--line); }
.rv-b { flex: 1; min-width: 0; }
.rv-t { margin: 0; font-size: 14px; line-height: 1.4; }
.rv-m { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
/* The abstract of a screening row, one click away (filled in when it is opened). */
.rv-d summary { cursor: pointer; width: fit-content; font-size: 12px; color: var(--blue-ink); margin-top: 2px; }
.rv-abs { margin: 6px 0 2px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.rv:has(.rv-d[open]) { align-items: flex-start; }
.rv-more { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: rgba(0, 0, 0, .06); gap: 2px; flex-wrap: wrap; }
.seg-b { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; transition: background .25s, box-shadow .25s; white-space: nowrap; }
.seg-b.on { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); color: var(--ink); }

/* ---------- Full-text upload ---------- */
.reading { display: flex; align-items: center; gap: 12px; padding: 30px 20px; border-radius: 18px; background: var(--soft); justify-content: center; color: var(--muted); }
.meter { margin-top: 18px; }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.bar { height: 8px; border-radius: 99px; background: var(--soft-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--success); border-radius: inherit; transition: width .6s var(--ease-out); }
.warn-card { border-color: rgba(255, 149, 0, .35); background: var(--surface); }
.um { display: grid; grid-template-columns: 1fr minmax(200px, 1.2fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.ftcheck { list-style: none; margin: 0; padding: 0; }
.ftcheck li { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; padding: 11px 2px; border-top: 1px solid var(--line); }
.ck { width: 22px; height: 22px; border-radius: 50%; border: 1.5px dashed rgba(0, 0, 0, .2); display: grid; place-items: center; }
.ftcheck li.ok .ck { background: var(--green); border: 0; color: #fff; animation: pop .45s var(--spring); }
.ck .ic { width: 13px; height: 13px; stroke-width: 3; }
.miss { padding-left: 20px; max-height: 260px; overflow-y: auto; font-size: 14px; display: grid; gap: 6px; }
.src-tag { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 99px; background: var(--green-wash); color: var(--green-ink); font-size: 11px; font-weight: 600; }

/* ---------- Screening review (reviewers verify, dispute, approve) ---------- */
.rvstep { display: grid; grid-template-columns: 36px 1fr; gap: 16px; }
/* Screening left nothing for full text: the ways forward, between the numbers and the review steps. */
.rv-none { margin-bottom: 18px; }
.rv-empty { margin: 18px 0; }
.rvstep-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; }
.rvstep-b { min-width: 0; }
.rvstep-b > .small { margin: 4px 0 14px; }
.rvstep .label { display: flex; align-items: center; gap: 6px; }
.rvstep .label .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.pv { margin-top: 16px; padding: 16px 18px; border-radius: 16px; background: var(--soft); animation: rise .4s var(--ease-out) both; }
.pv-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.pv-h.warn { margin-top: 14px; color: var(--orange-ink); }
.pv-h .ic { width: 16px; height: 16px; }
.pv-list, .chg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pv-list li, .chg-list li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; min-width: 0; }
.pv-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-tag { flex: none; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; }
.pv-tag.in { background: var(--green-wash); color: var(--green-ink); }
.pv-tag.out { background: var(--red-wash); color: var(--red-ink); }
.pv-miss { margin: 0; padding-left: 18px; font: 12.5px/1.6 var(--mono); color: var(--muted); }
.chg { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.chg-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; font-size: 14px; }
.chg-list li { color: var(--ink-2); }
.aprs { display: grid; gap: 10px; }
.apr { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); transition: border-color .3s, background .3s; }
.apr .field { flex: 1; max-width: 300px; }
.apr-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--soft); color: var(--muted); font-size: 13px; font-weight: 700; }
.apr-n .ic { width: 15px; height: 15px; stroke-width: 2.8; }
.apr-b { flex: 1; display: grid; gap: 1px; }
.apr.done { border-color: rgba(52, 199, 89, .45); background: #f6fdf8; }
.apr.done .apr-n { background: var(--green); color: #fff; animation: pop .45s var(--spring); }
.center { text-align: center; }
.xitems li.manual .xi-dot { border: 0; background: var(--soft-2); color: var(--muted); }

/* ---------- Daleel modes ---------- */
.home-mode { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin: -14px auto 30px; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mode { position: relative; display: grid; gap: 4px; align-content: start; padding: 18px 18px 16px; border-radius: 18px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .25s, box-shadow .3s, transform .35s var(--ease); }
.mode:hover { transform: translateY(-2px); border-color: rgba(0, 0, 0, .22); }
.mode.on { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .12); }
.mode-bars { display: flex; gap: 4px; margin-bottom: 8px; }
.mode-bars i { width: 18px; height: 6px; border-radius: 3px; background: var(--soft-2); }
.mode-bars i.on { background: var(--accent-stroke); }
.mode-n { font-size: 16px; font-weight: 600; letter-spacing: -.015em; }
.mode-t { font-size: 13px; font-weight: 600; color: var(--blue-ink); }
.mode-d { font-size: 13px; line-height: 1.45; color: var(--muted); }
.mode-check { position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); opacity: 0; transform: scale(.6); transition: opacity var(--dur-2) var(--ease), transform var(--dur-3) var(--spring); }
.mode-check .ic { width: 13px; height: 13px; stroke-width: 2.8; }
.mode.on .mode-check { opacity: 1; transform: none; }
.rail-mode { margin-top: auto; display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 10px 4px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: opacity .2s; }
.rail-mode:hover { opacity: .75; }
.rail-mode > span:nth-child(2) { flex: 1; display: grid; line-height: 1.25; }
.rail-mode small { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.rail-mode b { font-size: 13.5px; font-weight: 600; }
.rail-mode > .ic { width: 15px; height: 15px; color: var(--faint); }
.rail-mode-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; color: var(--on-accent); background: var(--accent-stroke); }
.rail-mode-ic .ic { width: 16px; height: 16px; }

/* ---------- Extraction ---------- */
.xitems { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 6px; max-height: 300px; overflow-y: auto; }
.xitems li { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--faint); }
.xitems li.run { color: var(--ink); }
.xitems li.ok { color: var(--ink-2); }
.xitems li.err { color: var(--red-ink); }
.xitems li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xi-dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(0, 0, 0, .15); display: grid; place-items: center; flex: none; }
.xitems li.ok .xi-dot { background: var(--green); border: 0; color: #fff; animation: pop .4s var(--spring); }
.xitems li.err .xi-dot { background: var(--red); border: 0; color: #fff; }
.xi-dot .ic { width: 11px; height: 11px; stroke-width: 3; }
.xi-dot .spin { width: 14px; height: 14px; stroke: var(--blue); }
.pooled-row { margin: 10px 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--blue-wash); font-size: 14px; }
.pooled b { color: var(--blue-ink); }
.xgrid-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.xgrid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.xgrid th { background: var(--soft); text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 9px 8px; white-space: nowrap; }
.xgrid td { padding: 6px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.xgrid td:first-child { display: grid; min-width: 150px; }
.cell { width: 74px; height: 32px; border-radius: 8px; border: 1px solid transparent; background: var(--soft); padding: 0 8px; font: 500 13.5px var(--mono); text-align: right; transition: border-color .2s, background .2s; }
.cell:hover { border-color: var(--line-2); }
.cell:focus { outline: none; border-color: var(--blue); background: var(--surface); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .14); }
.studies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.study { padding: 14px; border-radius: 14px; background: var(--soft); display: grid; gap: 4px; align-content: start; }
.study-h { display: flex; justify-content: space-between; align-items: center; }
.study p { margin: 0; }
.study .btn { justify-self: start; margin-top: 4px; padding: 0 8px; }
.study .rob { width: 22px; height: 22px; font-size: 13px; }
.claim-card summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 14.5px; list-style: none; }
.claim-card summary::-webkit-details-marker { display: none; }
.claim-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.claim-list li { padding: 10px 12px; border-radius: 12px; background: var(--soft); }
.claim-list p { margin: 4px 0 0; }
.syn-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 280px; overflow-y: auto; display: grid; gap: 4px; }
.syn-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 10px; background: var(--soft); font-size: 13.5px; }
/* Blind re-screening of AI exclusions */
.blind-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 12px; }
.blind-prog { flex: 1; min-width: 120px; height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.blind-prog span { display: block; height: 100%; background: var(--blue); transition: width .3s var(--ease-out); }
.blind-rec { padding: 16px 18px; border-radius: 14px; background: var(--soft); }
.blind-rec .rv-t { font-weight: 600; margin: 0 0 4px; }
.blind-abs { max-height: 260px; overflow-y: auto; margin: 8px 0 0; line-height: 1.6; }
/* Extraction you can verify: what the analysis uses, the quote check, second-extraction differences, sign-off */
.xgrid td.used { white-space: nowrap; }
.xgrid td.used .pill { margin-right: 4px; }
.qcheck { display: inline-flex; vertical-align: -3px; margin-right: 4px; cursor: help; }
.qcheck .ic { width: 16px; height: 16px; }
.cell.cell-diff { background: var(--orange-wash); box-shadow: inset 0 0 0 1.5px rgba(255, 149, 0, .6); }
.check-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; cursor: pointer; }
.check-row input { width: 16px; height: 16px; accent-color: var(--green); }
.study.is-verified { box-shadow: inset 0 0 0 1.5px rgba(52, 199, 89, .45); }
/* Editing AI results in place */
.edit-tools { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.card-h-row .eyebrow.m0 { margin: 0; }
.study .edit-tools { margin-left: 0; }
.study.study-edit { grid-column: 1 / -1; gap: 10px; padding: 18px; background: #fff; border: 1.5px solid rgba(var(--brand-rgb), .25); }
.study-edit .fld { margin-bottom: 0; }
.study-edit .grid2, .study-edit .grid3 { gap: 10px 14px; }
.oc-edit { display: grid; gap: 8px; padding: 14px; margin-bottom: 10px; border-radius: 14px; background: var(--soft); }
.oc-edit .fld { margin-bottom: 0; }
.oc-edit .btn { justify-self: start; }
.check-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 99px; background: var(--soft); font-size: 13px; cursor: pointer; }
.check-pill input { accent-color: var(--blue); }
.excl { list-style: none; margin: 0; padding: 0; }
.excl li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }

/* ---------- Results & figures ---------- */
.fig-box { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: #fff; padding: 12px; margin: 6px 0 12px; }
.fig-box svg { display: block; width: 100%; height: auto; min-width: 640px; }
.prisma-box svg { max-width: 820px; margin: 0 auto; min-width: 560px; }
.fig-box[data-fig="funnel"] svg { min-width: 360px; }
.ma-card .stats { margin-top: 14px; }
.plain { margin: 0 0 16px; padding: 14px 18px; border-radius: 14px; background: var(--brand-wash-solid); border: 1px solid rgba(var(--brand-rgb), .12); }
.plain-l { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--blue-ink); }
.plain ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14.5px; }

/* ---------- Abstract ---------- */
.author { display: grid; grid-template-columns: 30px 1fr 1.3fr 32px; gap: 10px; align-items: center; margin-bottom: 10px; }
.au-n { width: 28px; height: 28px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.paper-card { background: #fff; border-radius: 6px; padding: 52px 60px; box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 20px 50px rgba(0, 0, 0, .08); font-family: "Times New Roman", Times, Georgia, serif; color: #111; margin-top: 18px; position: relative; animation: rise .7s var(--ease-out) both; }
.abs-badges { position: absolute; top: 16px; right: 16px; display: flex; gap: 6px; font-family: var(--font); }
.abs-title { font-family: inherit; text-align: center; font-size: 19px; line-height: 1.35; margin: 14px 0 12px; letter-spacing: 0; }
.abs-auth { text-align: center; margin: 0; font-size: 15px; }
.abs-aff { text-align: center; margin: 4px 0 20px; font-size: 13px; font-style: italic; color: #444; }
.abs-body p { text-align: justify; font-size: 15.5px; line-height: 1.6; margin: 0 0 10px; letter-spacing: 0; }
.abs-kw { font-size: 15px; margin: 14px 0 0; letter-spacing: 0; }
.abs-fig { margin: 24px 0 0; }
.abs-fig figcaption { font-size: 14px; line-height: 1.45; margin-bottom: 8px; }
.abs-fig svg { display: block; width: 100%; height: auto; }
.reveal-line { animation: rise .7s var(--ease-out) both; animation-delay: var(--d); }
.final-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s); }

/* Abstract editor: the authors' own version before anything is saved */
.editor-card { padding: 26px 28px 20px; }
.ed-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ed-top p { margin: 4px 0 0; }
.ed-top .eyebrow { margin: 0 0 4px; }
.ed-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.editor-card .fld { margin-bottom: 14px; }
.editor-card textarea.field { min-height: 0; resize: none; overflow: hidden; padding: 12px 14px; font: 15.5px/1.65 Georgia, "Times New Roman", serif; letter-spacing: 0; }
.editor-card textarea.ed-title { font-weight: 700; font-size: 18px; line-height: 1.4; }
.ed-sec-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.ed-more { margin: 4px 0 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.ed-more summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; color: var(--blue-ink); }
.ed-more summary::-webkit-details-marker { display: none; }
.ed-more summary .ic { width: 16px; height: 16px; }
.editor-card .ed-more textarea.field { font: 14px/1.5 var(--font); }
.figpick { display: grid; gap: 10px; margin-top: 4px; }
.figopt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--soft); cursor: pointer; }
.figopt input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.figopt > span { flex: 1; display: grid; gap: 8px; font-size: 14px; }
.ed-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; padding-top: 16px; border-top: 1px solid var(--line); }

/* Language polish as a proposal: removed words struck through, added words highlighted, nothing applied until accepted */
.prop-card { border: 1.5px solid rgba(var(--brand-rgb), .28); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .05), var(--shadow-s); }
.diff { font: 16px/1.75 Georgia, "Times New Roman", serif; color: #1a1a1a; letter-spacing: 0; }
.diff p { margin: 0 0 .8em; }
.diff .diff-lbl { margin: 16px 0 4px; font: 600 12.5px/1.4 var(--font); color: var(--muted); letter-spacing: 0; }
.diff .diff-lbl:first-child { margin-top: 0; }
.diff .diff-title { font-weight: 700; font-size: 17.5px; line-height: 1.45; }
.diff del, .diff-legend del { color: var(--red-ink); background: var(--red-wash); text-decoration: line-through; text-decoration-thickness: 1.5px; border-radius: 4px; padding: 0 2px; }
.diff ins, .diff-legend ins { color: var(--green-ink); background: var(--green-wash); text-decoration: none; border-radius: 4px; padding: 0 2px; }
.diff-legend { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; }
.facts-warn { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r); background: var(--orange-wash); color: var(--warning-text); font-size: 14px; line-height: 1.5; }
.facts-warn .ic { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--orange-ink); }
/* The same project was saved in another tab: this tab stops saving until it reloads the newer copy */
.conflict-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 90; width: min(720px, calc(100% - 32px)); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; background: #fff; border: 1.5px solid rgba(255, 149, 0, .45); box-shadow: 0 18px 50px rgba(0, 0, 0, .18); font-size: 14px; color: var(--ink-2); }
.conflict-bar > .ic { flex: none; width: 20px; height: 20px; color: var(--orange-ink); }
.conflict-bar > span { flex: 1; min-width: 220px; }
/* Work set aside by an upstream change (new title, new rules): one click brings it back */
.undo-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -6px 0 18px; padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--blue-wash); color: var(--ink-2); font-size: 14px; }
.undo-bar > .ic { flex: none; width: 18px; height: 18px; color: var(--blue-ink); }
/* The sentence takes the free width and wraps inside it, so the two buttons stay together at the end (or below it). */
.undo-t { flex: 1 1 260px; min-width: 0; }
/* A draft whose numbers moved since it was written */
.stale-bar { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; padding: 14px 16px; border-radius: var(--r); background: var(--orange-wash); color: var(--warning-text); }
.stale-bar > .ic { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--orange-ink); }
.stale-b { flex: 1; min-width: 0; }
.stale-b p { margin: 4px 0 0; }
.stale-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.stale-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .6); font-size: 14px; }
.stale-list li > span:first-child { flex: 1; min-width: 200px; }
.stale-list del { color: var(--red-ink); text-decoration: line-through; }
.stale-list ins { color: var(--green-ink); text-decoration: none; font-weight: 600; }
.loss-list { margin: 6px 0 10px; padding-left: 20px; font-size: 14.5px; }
.loss-list li { margin: 2px 0; }
.prop-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
/* A rewritten section reads as new text; the word-by-word comparison is one click away */
.prop-note { margin: -2px 0 12px; }
.prop-diff { margin: 2px 0 6px; }
.prop-diff > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; color: var(--blue-ink); }
.prop-diff[open] > summary { margin-bottom: 10px; }
.prop-legend { margin-bottom: 8px; }
/* The optional direction for a new version (stepKit.confirmRedo) */
.modal .redo-note { margin: 14px 0 0; text-align: left; }
.modal .redo-note textarea { min-height: 84px; resize: vertical; }

/* ---------- Paper ---------- */
.paper-intro { text-align: center; padding: 44px 24px; display: grid; justify-items: center; gap: 12px; }
.paper-intro p { max-width: 560px; margin: 0; }
.pi-pages { display: flex; gap: 10px; margin-bottom: 10px; }
.pi-pages span { width: 58px; height: 80px; border-radius: 6px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; }
.pi-pages span::before { content: ""; position: absolute; inset: 12px 9px auto; height: 26px; background: repeating-linear-gradient(#e5e5ea 0 3px, transparent 3px 7px); }
.pi-pages span::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: 12px; height: 20px; border-radius: 3px; background: var(--accent-wash-2); }
.pi-pages span:nth-child(1) { transform: rotate(-6deg) translateY(4px); } .pi-pages span:nth-child(3) { transform: rotate(6deg) translateY(4px); }
.live { margin-top: 18px; border-radius: 14px; background: var(--soft); overflow: hidden; }
.live-h { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse-red 1.4s infinite; }
@keyframes pulse-red { 50% { opacity: .35; } }
.live-text { max-height: 220px; overflow-y: auto; padding: 14px 16px; font: 14px/1.6 Georgia, "Times New Roman", serif; color: var(--ink-2); white-space: pre-wrap; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%); mask-image: linear-gradient(to bottom, transparent, #000 30%); }
.paper-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; position: sticky; top: 66px; z-index: 6; padding: 10px 14px; border-radius: 16px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); box-shadow: var(--shadow-s); }
.paper-tools .row { flex-wrap: wrap; }
.paper-stage { background: #e9e9ee; border-radius: 20px; padding: 36px 24px; }

/* Draft paper: one editable card per section */
.draft-bar { position: sticky; top: 66px; z-index: 6; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; padding: 12px 14px 12px 18px; border-radius: 16px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); box-shadow: var(--shadow-s); }
.draft-bar > div { display: grid; gap: 2px; }
.sec-card { padding: 22px 26px 20px; }
.sec-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sec-h .h4 { font-size: 18px; }
.sec-h .pill .spin { width: 13px; height: 13px; stroke: currentColor; }
.ed { font: 16px/1.7 Georgia, "Times New Roman", serif; color: #1a1a1a; padding: 8px 12px; margin: 0 -12px; border-radius: 12px; outline: none; letter-spacing: 0; transition: background .2s, box-shadow .2s; }
.ed:hover { background: #fafafc; }
.ed:focus { background: var(--surface); box-shadow: 0 0 0 2px rgba(var(--brand-rgb), .35); }
.ed[contenteditable="false"] { opacity: .55; pointer-events: none; }
/* An empty section (for example a Conclusion the writing stopped before) invites the author to write it */
.ed:empty { min-height: 3.4em; }
.ed:empty::before { content: attr(data-empty); color: var(--faint); }
.ed p { margin: 0 0 .8em; }
.ed h4 { font: 600 15px/1.4 var(--font); margin: 1.2em 0 .4em; letter-spacing: -.01em; }
.ed ul { margin: 0 0 .8em; padding-left: 1.3em; }
.ed-cite { display: inline-block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: -3px; margin: 0 2px; padding: 0 7px; border-radius: 6px; background: var(--blue-wash); color: var(--blue-ink); font: 600 11.5px/1.7 var(--font); cursor: default; user-select: all; }
.ed-ph { display: flex; align-items: center; gap: 10px; margin: 14px 0; padding: 14px 16px; border-radius: 12px; border: 1.5px dashed rgba(var(--brand-rgb), .35); background: var(--brand-wash-solid); color: var(--blue-ink); font: 600 13.5px var(--font); user-select: none; }
.ed-ph .ic { width: 18px; height: 18px; }

/* ---------- Toasts & modals ---------- */
#toast-root { position: fixed; top: 66px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; justify-items: center; pointer-events: none; width: min(560px, 92vw); }
.toast a { color: var(--accent-on-dark); font-weight: 600; pointer-events: auto; margin-left: 4px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 99px; background: var(--surface-inverse); color: var(--text-inv-1); font-size: 14px; line-height: 1.4; font-weight: 500; box-shadow: var(--elev-3); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); opacity: 0; transform: translateY(-8px); transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-3) var(--ease-out); max-width: min(560px, 92vw); }
.toast.in { opacity: 1; transform: none; }
.toast-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .16); flex: none; }
.toast-ok .toast-ic { background: var(--green); }
.toast-err .toast-ic { background: var(--red); }
.toast-ic .ic { width: 14px; height: 14px; stroke-width: 2.6; }
/* Errors (and sticky toasts) stay until read and have a close button. They never block the page under them: only the
   close button (which pauses the toast while pointed at) and links take the pointer. */
.toast-keep { border-radius: 18px; padding-right: 8px; }
.toast-x { pointer-events: auto; flex: none; width: 28px; height: 28px; margin-left: 2px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: var(--text-inv-1); cursor: pointer; transition: background-color var(--dur-1) var(--ease); }
.toast-x:hover { background: rgba(255, 255, 255, .24); }
.toast-x:focus-visible { outline: 2px solid var(--accent-on-dark); outline-offset: 2px; }
.toast-x .ic { width: 14px; height: 14px; stroke-width: 2.4; }

/* Connection banner: calm, always readable, never blocks the work underneath */
.net-banner { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 120; display: flex; align-items: center; gap: 12px; padding: 12px 20px 12px 12px; max-width: min(620px, calc(100vw - 32px)); border-radius: 18px; background: var(--surface-inverse); color: var(--text-inv-1); font-size: 14px; line-height: 1.45; box-shadow: var(--elev-3); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); opacity: 0; transform: translate(-50%, 16px); transition: opacity .4s ease, transform .5s var(--spring); pointer-events: none; }
.net-banner.in { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.net-banner b { font-weight: 600; }
.net-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); flex: none; }
.net-banner.ok .net-ic { background: var(--green); }
.net-ic .ic { width: 16px; height: 16px; stroke-width: 2.2; }
@media (prefers-reduced-motion: reduce) { .net-banner { transition: opacity .2s linear; transform: translate(-50%, 0); } }
.modal-wrap { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(22, 24, 31, .32); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity .3s ease; }
.modal-wrap.in { opacity: 1; }
.modal { width: min(460px, 100%); background: var(--surface); border-radius: var(--radius-xl); padding: 28px 28px 22px; box-shadow: var(--elev-3); transform: translateY(12px) scale(.98); transition: transform var(--dur-3) var(--ease-out); max-height: 88vh; overflow-y: auto; }
.modal-wide { width: min(620px, 100%); }
.modal-wrap.in .modal { transform: none; }
.modal-ic { width: 44px; height: 44px; border-radius: var(--r); display: grid; place-items: center; margin-bottom: 14px; background: var(--accent-wash); color: var(--accent-ink); }
.modal-ic-orange { background: var(--orange-wash); color: var(--orange-ink); }
.modal-ic-red { background: var(--red-wash); color: var(--red-ink); }
.modal-title { margin: 0 0 8px; font: 600 20px/1.25 var(--font-display); letter-spacing: -.016em; color: var(--ink); text-wrap: balance; }
.modal-body { font-size: 15px; color: var(--ink-2); }
.modal-body p { margin: 0 0 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal-actions.stack { flex-direction: column; align-items: stretch; gap: 8px; }
.modal-actions.stack .btn { justify-content: flex-start; height: auto; min-height: 44px; padding: 10px 16px; white-space: normal; text-align: left; line-height: 1.35; }
.modal-actions.stack .btn:last-child { justify-content: center; margin-top: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .tc-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-6 { grid-template-columns: repeat(3, 1fr); }
  .upcs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: sticky; top: 54px; z-index: 20; height: auto; flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg-rail) 92%, transparent); backdrop-filter: blur(16px); scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail-proj, .rail-phase, .rail-back { display: none; }
  .rail-steps { display: flex; gap: 4px; margin: 0; }
  .rs { white-space: nowrap; padding: 6px 10px; font-size: 13px; }
  button.rs { width: auto; flex: none; }
  .rs-dot { width: 18px; height: 22px; }
  .rs::before, .rs-here { display: none; }
  .rail-mode { order: -1; margin: 0; width: auto; padding: 0 6px 0 0; border: 0; flex: none; }
  .rail-mode small, .rail-mode > .ic { display: none; }
  .rail-mode b { font-size: 12.5px; white-space: nowrap; }
  .rail-mode-ic { width: 26px; height: 26px; border-radius: 8px; }
  .stage { padding: 28px 18px 30px; }
  .projs { grid-template-columns: 1fr 1fr; }
  .types-soon { grid-template-columns: 1fr 1fr; }
  .studies { grid-template-columns: 1fr 1fr; }
  .paper-tools, .draft-bar { top: 112px; }
}
@media (max-width: 680px) {
  .mobile-note { display: block; }
  .tb { padding: 0 14px; gap: 10px; }
  .tb-link, .crumb-t, .tb-crumbs .ic { display: none; }
  .home, .settings { padding: 40px 16px 80px; }
  .types, .types-soon, .projs, .grid2, .grid3, .stats, .studies, .upcs, .guide-foot, .rules-notes, .kv { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .tcard { grid-template-columns: 1fr; padding: 20px; }
  .tc-rank { display: none; }
  .tc-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tc-act .btn { width: 100%; }
  .proc { grid-template-columns: 1fr; justify-items: start; padding: 22px; }
  .proc.proc-strip { grid-template-columns: 44px minmax(0, 1fr); justify-items: stretch; align-items: start; padding: 14px 16px; }
  .proc-strip > .proc-acts { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; }
  .author { grid-template-columns: 26px 1fr; }
  .author input:nth-of-type(2) { grid-column: 2; }
  .author .icon-btn, .author > span:last-child { display: none; }
  .paper-card { padding: 32px 22px; }
  .paper-stage { padding: 12px 6px; }
  .um { grid-template-columns: 1fr; }
  .chip-in { font-size: 18px; min-width: 140px; }
  .st-foot .btn-primary { min-width: 0; }
  .st-foot { gap: 8px; }
  .st-foot > [data-act="back"] { font-size: 0; gap: 0; padding: 0 13px; }
  .st-foot > .row { flex-wrap: wrap; justify-content: flex-end; gap: 8px; min-width: 0; }
  .foot-why { order: -1; flex-basis: 100%; max-width: none; }
  .modes { grid-template-columns: 1fr; }
  .rvstep { grid-template-columns: 1fr; gap: 10px; }
  .rvstep-n { width: 28px; height: 28px; font-size: 13px; }
  .apr { flex-wrap: wrap; }
  .apr .field { max-width: none; min-width: 0; }
  .editor-card, .sec-card { padding: 20px 16px; }
  .ed { font-size: 15px; }
}

/* ---------- New research types & tools ---------- */
.home-tools { margin-top: 48px; }
.home-tools-h { display: grid; gap: 6px; margin-bottom: 16px; }
.home-tools-h .small { max-width: 640px; }
.types-2 .type { min-height: 0; }
.pill-sm { font-size: 11.5px; padding: 3px 8px; }
.pill .ic { width: 13px; height: 13px; }
.choice2, .choice3 { display: grid; gap: 14px; }
.choice2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.choice { position: relative; display: grid; gap: 6px; align-content: start; text-align: left; padding: 18px 18px 16px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; color: inherit; transition: border-color .25s, box-shadow .25s, transform .25s var(--ease); }
.choice:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-s); }
.choice.on { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .12); }
.choice b { font-size: 15.5px; letter-spacing: -.012em; }
.choice-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--blue-wash); color: var(--blue); margin-bottom: 4px; }
.choice .pill { justify-self: start; margin-top: 4px; }
.choice.soon, .choice:disabled { cursor: default; opacity: .72; border-style: dashed; }
.note-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--blue-wash); color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.note-box > .ic { flex: none; width: 18px; height: 18px; color: var(--blue-ink); margin-top: 1px; }
.warn-list { padding: 12px 14px; border-radius: 12px; background: var(--orange-wash); color: var(--orange-ink); font-size: 13.5px; display: grid; gap: 4px; margin-bottom: 14px; }
.warn-list p { margin: 0; display: flex; gap: 8px; align-items: flex-start; }
/* A first run that failed: the step's own form again, with what went wrong and what to do now (stepKit.failNote). */
.fail-note { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--red-wash); }
.fail-note p { margin: 0; display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; }
.fail-note p > .ic { flex: none; margin-top: 2px; }
.fail-note .proc-detail { margin-top: 6px; }
.warn-list .ic { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.warn-list .field { color: var(--ink); }
.prow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr) auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.prow .field { height: 38px; font-size: 13.5px; }
.dsrecs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.dsrec { display: grid; gap: 6px; align-content: start; padding: 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); }
.dsrec.on { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .1); }
.dsrec-h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.dsrec p { margin: 0; }
.dprof { border-top: 1px solid var(--line); padding: 12px 0; }
.dprof summary { display: flex; gap: 12px; align-items: center; cursor: pointer; list-style: none; flex-wrap: wrap; }
.dprof summary::-webkit-details-marker { display: none; }
.dprof summary label { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.dprof .tbl-wrap { margin-top: 10px; max-height: 420px; overflow: auto; }
.dprof > p { margin: 10px 0 0; }
.code-pre { max-height: 320px; overflow: auto; margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--soft, #f5f5f7); font: 11.5px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.subq, .themes-l { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.themes-l li { display: grid; gap: 2px; }
.dimrow { display: grid; grid-template-columns: 200px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.dimrow:first-of-type { border-top: 0; }
.themes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 18px; }
.theme-card { position: relative; margin: 0; }
.theme-n { position: absolute; top: 18px; right: 20px; width: 28px; height: 28px; border-radius: 50%; background: var(--blue-wash); color: var(--blue-ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.theme-card .h4 { padding-right: 36px; margin-bottom: 4px; }
.tbl .th-row td { font-weight: 600; }
.tbl td.indent { padding-left: 22px; }
@media (max-width: 680px) {
  .choice2 { grid-template-columns: 1fr; }
  .prow { grid-template-columns: 1fr auto; }
  .prow .field:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .dimrow { grid-template-columns: 1fr; }
}

/* Package card on the home screen, the access-code form and the header chip (account.js). */
.acct-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; margin: 0 0 24px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-s); }
.acct-head { display: flex; gap: 14px; align-items: flex-start; }
.acct-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--fill-1); color: var(--ink-2); flex: none; }
.acct-ic .ic { width: 18px; height: 18px; }
.acct-ic-on { background: var(--accent-wash); color: var(--accent-ink); }
.acct-card .eyebrow { font-size: 12.5px; font-weight: 600; color: var(--accent-ink); margin: 0 0 2px; }
.acct-card h2 { margin: 0 0 2px; }
.acct-card p { margin: 0; }
.acct-kes { display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.acct-bar { height: 6px; border-radius: 99px; background: var(--fill-1); overflow: hidden; }
.acct-bar i { display: block; height: 100%; background: var(--accent-stroke); border-radius: inherit; }
.acct-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.acct-tags .pill:not(.pill-blue):not(.pill-green) { background: var(--fill-1); color: var(--muted); }
.acct-form { margin: 0; }
.acct-row { display: flex; gap: 8px; max-width: 460px; }
.acct-row .field { flex: 1; min-width: 0; font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; text-transform: uppercase; }
.acct-err { color: var(--red-ink); margin: 6px 0 0; }
.tb-acct { font: inherit; font-size: 13px; font-weight: 600; border: 0; border-radius: 99px; padding: 6px 12px; background: var(--accent); color: var(--on-accent); cursor: pointer; margin-right: 2px; }
.tb-acct.on { background: var(--accent-wash); color: var(--accent-ink); }
.tb-acct:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.type-tag.type-tag-off { color: var(--muted); background: var(--fill-1); }

/* Each package on the home card: kesempatan, stages, the mentor and the mentoring WhatsApp group (account.js). */
.acct-pkg { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.acct-pkg-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.acct-pkg h3 { margin: 0 0 2px; }
.acct-mentor { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: var(--accent-wash); }
.acct-mentor > div:nth-child(2) { flex: 1; min-width: 140px; }
.acct-mentor b { display: block; font-size: 15px; letter-spacing: -.01em; }
.acct-mentor .tiny { display: block; }
.acct-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 650; font-size: 15px; flex: none; }
.acct-wait { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--fill-1); }
.acct-wait .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.acct-foot { padding-top: 2px; gap: 8px; }
.acct-pass { display: flex; flex-direction: column; gap: 6px; }
.acct-pass .field { margin-bottom: 6px; }
.acct-pass .btn { align-self: flex-start; margin-top: 4px; }

/* Notes between the mentor and the student, at the top of each step (account.js). */
.mnote { margin: 0 0 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-s); }
.mnote:has(> .mnote-ask:not([hidden])) { border-style: dashed; border-color: var(--line-2); box-shadow: none; background: transparent; padding: 10px 14px; }
.mnote-ask { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 0; font: inherit; font-size: 14px; color: var(--accent-ink); cursor: pointer; text-align: left; }
.mnote-ask[hidden] { display: none; }
.mnote-ask .ic { width: 18px; height: 18px; flex: none; }
.mnote-ask .tiny { margin-left: auto; }
.mnote [data-mnote-body] { display: flex; flex-direction: column; }
.mnote [data-mnote-body][hidden] { display: none; }
.mnote-head { display: flex; gap: 10px; align-items: center; }
.mnote-head b { display: block; font-size: 14.5px; }
.mnote-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-wash); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.mnote-ic .ic { width: 16px; height: 16px; }
.mnote-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow: auto; }
.mnote-item { padding: 10px 12px; border-radius: 12px; background: var(--fill-1); }
.mnote-item.is-mentor { background: var(--accent-wash); }
.mnote-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; font-size: 13.5px; }
.mnote-meta .pill { height: 20px; padding: 0 8px; font-size: 11.5px; }
.mnote-item p { margin: 0; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.mnote-form { display: flex; gap: 8px; align-items: flex-end; }
.mnote-form textarea.field { min-height: 44px; height: 44px; font-size: 14.5px; padding: 10px 14px; flex: 1; resize: vertical; }
.mnote-form .btn { flex: none; height: 44px; }

/* A mentor looking at a student's project (lihat.js): a quiet band above the top bar. */
.view-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; padding: 8px clamp(12px, 3vw, 20px); background: var(--accent-wash); color: var(--accent-ink); font-size: 13.5px; line-height: 1.4; }
.view-bar b { font-weight: 650; }
.view-bar.bad { background: var(--orange-wash); color: var(--orange-ink); }
.view-bar .btn { flex: none; }

/* Video lessons (materi.js). */
.materi { max-width: 1040px; margin: 0 auto; padding: 48px 24px 120px; }
.materi-head { margin-bottom: 24px; }
.materi-head .h2 { margin-bottom: 8px; }
.materi-head p { margin: 0; }
.materi-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.materi-frame { position: relative; aspect-ratio: 16 / 9; background: #0B0C10; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.materi-frame video { display: block; width: 100%; height: 100%; background: #0B0C10; }
.materi-player .h3 { margin: 18px 0 4px; }
.materi-player > p { margin: 0; }
.materi-player > .materi-desc { margin-top: 12px; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.materi-list { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 8px; position: sticky; top: 72px; max-height: calc(100vh - 96px); overflow: auto; }
.materi-mod { font-size: 12px; font-weight: 650; color: var(--muted); margin: 10px 10px 4px; }
.materi-mod:first-child { margin-top: 4px; }
.materi-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 12px; color: var(--ink); text-decoration: none !important; }
.materi-item:hover { background: var(--fill-1); }
.materi-item.on { background: var(--accent-wash); }
.materi-item b { display: block; font-size: 14px; font-weight: 550; line-height: 1.35; }
.materi-item .tiny { display: block; margin-top: 2px; }
.materi-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--fill-1); color: var(--ink-2); flex: none; }
.materi-ic .ic { width: 13px; height: 13px; }
.materi-item.on .materi-ic { background: var(--accent); color: var(--on-accent); }
.materi-err { position: absolute; inset: 0; display: flex; gap: 10px; align-items: center; justify-content: center; padding: 24px; color: #fff; text-align: center; font-size: 15px; }
.materi-err .ic { width: 20px; height: 20px; flex: none; }
@media (max-width: 860px) { .materi-grid { grid-template-columns: 1fr; } .materi-list { position: static; max-height: none; } }
@media (max-width: 680px) { .materi { padding: 32px 16px 80px; } }
