/* Synopsis writer: wizard page and the full-screen view */
.syn { display: grid; gap: 18px; max-width: 980px; }
.syn .sl-card { scroll-margin-top: 140px; }
.beta { font-size: 12px; font-weight: 600; vertical-align: middle; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft, #FDEBDD); color: var(--accent); letter-spacing: .02em; }

/* steps bar */
.syn-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.syn-steps::-webkit-scrollbar { display: none; }
.syn-steps li { flex: 1 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.syn-steps li b { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; border: 1.5px solid var(--line-strong); background: var(--surface); }
.syn-steps li.on { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--accent); }
.syn-steps li.on b { border-color: var(--accent); color: var(--accent); }
.syn-steps li.ok { color: var(--ink-2); }
.syn-steps li.ok b { background: var(--good); border-color: var(--good); color: #fff; font-size: 0; }
.syn-steps li.ok b::before { content: "✓"; font-size: 12px; }

/* choice cards (design, sample size, format) */
.lead-q { margin: 0; font-size: 15px; color: var(--ink-2); }
.dz-list { display: grid; gap: 8px; }
.dopt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.dopt:hover { border-color: var(--line-strong); }
.dopt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.dopt > input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.dopt > span { display: grid; gap: 3px; min-width: 0; }
.dopt small { color: var(--muted); font-size: 13px; line-height: 1.45; }
.dopt input[type=text], .dopt input:not([type]) { margin-top: 6px; max-width: 420px; }
.tag { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); white-space: nowrap; }
.dopt.ss .ssn { flex: none; min-width: 74px; text-align: center; padding: 4px 6px; border-radius: 10px; background: var(--surface-2); }
.dopt.ss .ssn b { display: block; font-size: 24px; font-family: var(--f-display); line-height: 1.1; color: var(--ink); }
.dopt.ss .ssn small { font-size: 11px; }
.syn-issues { padding: 12px 14px; border-radius: 10px; background: var(--warn-soft, #FFF6E5); border-left: 3px solid var(--warn, #C98A00); font-size: 14px; }
.syn-issues ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.syn-issues .hint { display: block; }
.ss-text { padding: 12px 4px 0; font-size: 14px; }
.ss-text h2, .ss-text h3 { font-size: 15px; }
.seg.two label { display: grid; gap: 2px; padding: 10px; }
.seg.two small { font-weight: 400; font-size: 12px; color: var(--muted); }
.prog-steps.ss-prog li { padding: 4px 0; font-size: 14px; }

/* names */
.styles { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.styles legend { margin-bottom: 6px; }
.who { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.who-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 14px; margin: 0; display: grid; gap: 10px; min-width: 0; }
.who-box legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
input.touched, textarea.touched { border-color: var(--bad) !important; box-shadow: 0 0 0 1px var(--bad); }
.logo-row { display: flex; gap: 14px; align-items: center; }
.logo-prev { width: 64px; height: 64px; border-radius: 12px; border: 1px dashed var(--line-strong); background: var(--surface-2) center/contain no-repeat; flex: none; }
.logo-prev.has { border-style: solid; background-color: #fff; }
.logo-row .hint { margin: 4px 0 0; }

/* output */
.syn-out { display: grid; gap: 14px; }
.out-head h2 { margin: 0; font-family: var(--f-display); font-size: 24px; }
.out-title { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; }
.syn-out > .hint { margin: 0; }
.versions { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); }
.ver { display: grid; gap: 10px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ver-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ver-top b { font-family: var(--f-display); font-size: 17px; }
.ver-first { margin: 0; font-family: var(--f-serif, 'Source Serif 4', Georgia, serif); font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.ver-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.ver-meta b { color: var(--ink); }
.ver-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.ver.wait { opacity: .8; }
.skel { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: syn-sh 1.4s linear infinite; }
.skel.short { width: 60%; }
@keyframes syn-sh { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
.checks { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); font-size: 13.5px; }
.checks h3 { margin: 0 0 6px; font-size: 14px; }
.checks ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.checks .num { color: var(--bad); }
.reflist { margin: 10px 0 0; padding-left: 22px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.5; }
.reflist a { white-space: nowrap; font-weight: 500; }

/* ---------- full-screen view ---------- */
body.sv { background: #E9E6E1; min-height: 100vh; }
.sv-bar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.sv-bar .brand-mini { font-weight: 600; font-family: var(--f-display); text-decoration: none; color: var(--ink); margin-right: 4px; }
.sv-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.sv-tabs .tl { align-self: center; padding: 0 6px 0 8px; font-size: 13px; color: var(--muted); }
.sv-tabs button { min-width: 34px; border: 0; background: none; padding: 6px 10px; border-radius: 7px; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--muted); cursor: pointer; }
.sv-tabs button[aria-pressed=true] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.sv-bar select { min-height: 36px; border-radius: 8px; }
.sv-bar .sp { flex: 1; }
.sv-bar .vname { font-size: 13px; color: var(--muted); }
.sv-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.sv-wrap.with-panel { grid-template-columns: minmax(0, 1fr) 380px; }
.sv-doc { padding: 24px 16px 80px; overflow-x: auto; }
.sv-msg { max-width: 640px; margin: 60px auto; padding: 20px; background: var(--surface); border-radius: 12px; text-align: center; }

.sheet { display: block; box-sizing: border-box; width: 210mm; max-width: 100%; min-height: 297mm; margin: 0 auto 18px; padding: 25mm 25mm 25mm 32mm; background: #fff; color: #111; box-shadow: 0 2px 10px rgba(0,0,0,.12); font-family: 'Times New Roman', Times, 'Source Serif 4', serif; font-size: 12pt; line-height: 1.5; }
.sheet.framed { outline: 3px double #333; outline-offset: -14mm; }
.sheet p { margin: 0 0 6pt; text-align: justify; }
.sheet p.ref { text-align: left; line-height: 1.3; padding-left: 2em; text-indent: -2em; }
.sheet h2 { font-size: 14pt; margin: 12pt 0 8pt; font-weight: 700; }
.sheet h3 { font-size: 12pt; margin: 8pt 0 4pt; font-weight: 700; }
.sheet h2.c, .sheet h3.c { text-align: center; }
.sheet .u { text-decoration: underline; }
.sheet .rule { border-bottom: 1.5px solid #2E5597; padding-bottom: 3pt; }
.sheet ol, .sheet ul { margin: 0 0 6pt; padding-left: 2em; }
.sheet li { text-align: justify; margin-bottom: 3pt; }
.sheet table.t { width: 100%; border-collapse: collapse; margin: 6pt 0 10pt; table-layout: fixed; font-size: 11.5pt; line-height: 1.35; }
.sheet table.t td { border: 1px solid #808080; padding: 4pt 6pt; vertical-align: top; overflow-wrap: anywhere; }
.sheet table.t td div { margin-bottom: 3pt; }
.sheet table.t td.head { background: #DCE6F1; font-weight: 700; }
.sheet table.t td.sh-label { background: #F2F2F2; font-weight: 600; }
.sheet table.t td.sh-section { background: #DCE6F1; font-weight: 700; }
.sheet table.t td.mid { text-align: center; }
.sheet table.gantt td { padding: 3pt 2pt; font-size: 9.5pt; }
.sheet table.gantt td:first-child { width: 28%; padding: 3pt 5pt; }
.sheet table.gantt td.m { text-align: center; }
.sheet table.gantt td.on { background: #2E5597; }
.sheet a { color: #1F4E9A; }
.sheet sup { font-size: 70%; line-height: 0; }
.sheet [lang=hi] { font-family: 'Mangal', 'Nirmala UI', 'Noto Sans Devanagari', sans-serif; }

/* editable parts */
.sv.editing .sheet [data-part] { cursor: pointer; border-radius: 3px; transition: background .12s, box-shadow .12s; }
.sv.editing .sheet [data-part]:hover { background: #FFF4E8; box-shadow: 0 0 0 3px #FFF4E8; }
.sheet [data-part].sel { background: #FFE9D3 !important; box-shadow: 0 0 0 3px #FFE9D3 !important; }
.sheet [data-part].changed { box-shadow: inset 3px 0 0 var(--good, #2E7D32); padding-left: 6px; }

.sv-panel { position: sticky; top: 57px; height: calc(100vh - 57px); box-sizing: border-box; overflow-y: auto; background: var(--surface); border-left: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sv-panel > * { flex: none; }
.sv-acct .hd-user span, .sv-acct .am-btn span { display: none; }
.sv-acct .hd-pill { min-height: 36px; }
.sv-panel h2 { margin: 0; font-size: 17px; font-family: var(--f-display); }
.sv-panel .close { position: absolute; right: 10px; top: 10px; }
.sv-panel label.lbl { display: block; margin-bottom: 4px; }
.sv-panel select, .sv-panel textarea { width: 100%; box-sizing: border-box; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 99px; padding: 5px 10px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.chips button:hover { border-color: var(--accent); color: var(--accent); }
.chat { display: grid; gap: 8px; }
.chat .b { padding: 9px 11px; border-radius: 10px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.chat .me { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); justify-self: end; max-width: 90%; }
.chat .ai { background: var(--surface-2); }
.chat .ai .acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.sel-box { font-size: 13px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); max-height: 140px; overflow: auto; color: var(--ink-2); }
.sv-panel .left { font-size: 12.5px; color: var(--muted); }

@media (max-width: 1000px) {
  .sv-wrap.with-panel { grid-template-columns: minmax(0, 1fr); }
  .sv-wrap.with-panel .sv-doc { padding-bottom: 60vh; }
  .sv-panel { position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: 55vh; border-left: 0; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,.15); border-radius: 14px 14px 0 0; z-index: 30; }
}
@media (max-width: 640px) {
  .sv-bar { position: static; padding: 8px 10px; gap: 6px; }
  .sv-bar .brand-mini, .sv-bar .vname, .sv-bar .sp { display: none; }
  .sv-bar .btn-md { min-height: 38px; padding: 0 12px; font-size: 14px; }
  .sv-bar select { flex: 1; }
  .sheet p, .sheet li { text-align: left !important; }
}
@media (max-width: 820px) {
  .sheet { min-height: 0; padding: 18px 16px; }
  .sheet.framed { outline-offset: -6px; }
  .sv-doc { padding: 12px 8px 80px; }
}
@media print {
  .sv-bar, .sv-panel { display: none !important; }
  body.sv { background: #fff; }
  .sheet { box-shadow: none; margin: 0; page-break-after: always; }
}

/* adjusting the sample size */
.ss-adj { margin-top: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); display: grid; gap: 12px; }
.ss-adj h3 { margin: 0; font-size: 16px; font-family: var(--f-display); }
.ss-adj > .hint { margin: -6px 0 0; }
#ssAdj { display: grid; gap: 12px; }
#ssAdj select, #ssAdj input[type=number] { min-height: 40px; }
.ss-range label { display: flex; justify-content: space-between; gap: 8px; }
.ss-range output { font-weight: 600; color: var(--accent); }
.ss-range input[type=range] { width: 100%; accent-color: var(--accent); }
.ss-seg { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); display: grid; }
.ss-seg label { position: relative; }
#ssAdj .sl-more { margin: 0; }
#ssAdj .sl-more .grid2 { margin-top: 10px; }
.ss-alt { display: grid; gap: 10px; margin-top: 10px; }
.ss-alt > .lbl { margin: 6px 0 0; font-weight: 600; }
