/* Formixx */
:root {
  --accent: #4f46e5;
  --pbg: #eef2ff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #fff;
  --bg: #f6f7fb;
  --err: #d93025;
  --ok: #188038;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Telugu", "Noto Sans Devanagari", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; }
body.font-serif { --font: Georgia, "Times New Roman", "Noto Serif", serif; }
body.font-mono { --font: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
body.font-rounded { --font: "Nunito", "Varela Round", ui-rounded, "Segoe UI", system-ui, sans-serif; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1.05rem; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .b { font-weight: 600; }
.center { text-align: center; } .nowrap { white-space: nowrap; } .pre { white-space: pre-wrap; word-break: break-word; }
.inline { display: inline; } .spacer { flex: 1; }
.row { display: flex; align-items: center; gap: .5rem; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; } .gap { gap: .5rem; }
[hidden] { display: none !important; }
.selectable { user-select: all; }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 8px; padding: .55rem 1.05rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; transition: filter .15s, background .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled, .btn[aria-disabled=true] { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, #fff); }
.btn.ghost:hover { background: color-mix(in srgb, var(--accent) 8%, #fff); filter: none; }
.btn.danger { color: var(--err); border-color: #f3c3bf; }
.btn.sm { padding: .35rem .7rem; font-size: .86rem; }
.btn.lg { padding: .8rem 1.5rem; font-size: 1.05rem; }
.btn.full { width: 100%; }
.linkbtn { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; }
.iconbtn { background: none; border: 0; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; color: var(--muted); font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.iconbtn:hover:not(:disabled) { background: #f1f3f4; color: var(--ink); }
.iconbtn:disabled { opacity: .3; cursor: default; }
.iconbtn.on { background: #e6f4ea; color: var(--ok); font-weight: 700; }
.iconbtn.danger:hover { color: var(--err); }
label { display: block; }
input, textarea, select { font: inherit; color: inherit; }
.auth-card label, .narrow .card label { margin: 0 0 .9rem; font-weight: 500; font-size: .92rem; }
.auth-card input, .narrow .card input { display: block; width: 100%; margin-top: .3rem; padding: .6rem .75rem; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; }
.auth-card input:focus, .narrow .card input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); border-color: var(--accent); }
.line { border: 0; border-bottom: 1px solid #d1d5db; background: transparent; padding: .45rem 0; width: 100%; border-radius: 0; transition: border-color .15s; }
.line:focus { outline: none; border-bottom: 2px solid var(--accent); padding-bottom: calc(.45rem - 1px); }
.line.num { width: 110px; }
.line.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; border: 1px solid var(--line); border-radius: 6px; padding: .5rem; resize: vertical; }
textarea.line { resize: none; overflow: hidden; }
.sel, .select { border: 1px solid #d1d5db; border-radius: 6px; padding: .45rem .6rem; background: #fff; max-width: 100%; }
.sel.sm { padding: .25rem .4rem; font-size: .88rem; }
.alert { padding: .7rem .9rem; border-radius: 8px; background: #fef7e0; border: 1px solid #fde68a; margin: 0 0 1rem; font-size: .92rem; }
.alert.err { background: #fce8e6; border-color: #f5c2bd; color: #a50e0e; }
.alert.ok { background: #e6f4ea; border-color: #b7e1c1; color: #0d652d; }
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #eef2ff; color: #3730a3; }
.badge.on { background: #e6f4ea; color: #0d652d; } .badge.off { background: #fce8e6; color: #a50e0e; }
.pill { display: inline-block; min-width: 1.5em; padding: 0 .45em; border-radius: 999px; background: #eef0f3; color: var(--ink); font-size: .78rem; text-align: center; font-weight: 600; }
.ok-text { color: var(--ok); font-weight: 600; }

/* layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin: 0 0 .8rem; box-shadow: var(--shadow); }
.narrow { max-width: 560px; margin: 2rem auto; padding: 0 1rem; }
.wide { max-width: 1100px; margin: 1.5rem auto; padding: 0 1rem; }
.center-card { text-align: center; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: .55rem 1.1rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; gap: .8rem; }
.topbar.plain { background: transparent; border: 0; position: static; }
.topbar nav { display: flex; align-items: center; gap: 1.1rem; }
.topbar nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.topbar nav a.btn { color: #fff; }
.topbar nav a:hover { color: var(--accent); }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand.big { font-size: 1.6rem; margin-bottom: 1.2rem; }

/* auth */
body.auth { background: radial-gradient(1200px 600px at 10% -10%, #e0e7ff, transparent), radial-gradient(900px 500px at 110% 110%, #fde68a55, transparent), var(--bg); min-height: 100vh; }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 400px; padding: 1.8rem; }

/* landing */
body.landing { background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 60%); }
.hero { max-width: 1100px; margin: 2.5rem auto; padding: 0 1.2rem; display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: 1.15rem; color: #4b5563; max-width: 36em; }
.features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.features li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem; box-shadow: var(--shadow); }
.features b { display: block; margin-bottom: .2rem; } .features span { color: var(--muted); font-size: .9rem; }
.foot { text-align: center; padding: 2rem; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; gap: 1.5rem; } }

/* dashboard */
.templates { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.3rem; margin-bottom: 1.6rem; box-shadow: var(--shadow); }
.tpl-row { display: flex; gap: .8rem; overflow-x: auto; padding-bottom: .3rem; }
.tpl { width: 132px; height: 120px; border: 1px solid var(--line); background: #fafbff; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; font: inherit; font-size: .86rem; font-weight: 500; color: var(--ink); transition: border-color .15s, transform .15s; flex: none; text-align: center; padding: .5rem; }
.tpl:hover { border-color: var(--accent); transform: translateY(-2px); }
.tpl-icon { font-size: 1.7rem; line-height: 1; }
.tpl.blank .tpl-icon { font-size: 2.6rem; color: var(--accent); font-weight: 300; }
.search input { border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1rem; width: 240px; max-width: 50vw; background: #fff; }
.form-list { display: flex; flex-direction: column; gap: .2rem; }
.form-item { display: grid; grid-template-columns: 1fr auto; gap: .4rem 1rem; align-items: center; padding: .9rem 1.1rem; }
.fi-main { display: flex; flex-direction: column; text-decoration: none; color: inherit; min-width: 0; position: relative; padding-left: 16px; }
.fi-swatch { position: absolute; left: 0; top: 4px; bottom: 4px; width: 5px; border-radius: 3px; }
.fi-title { font-weight: 600; font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fi-meta { display: flex; align-items: center; gap: .6rem; justify-self: end; }
.fi-meta .count { color: var(--ink); text-decoration: none; }
.fi-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .35rem; padding-left: 16px; }
.empty { text-align: center; color: var(--muted); padding: 2rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.stat { display: flex; flex-direction: column; }
.stat b { font-size: 1.6rem; } .stat span { color: var(--muted); font-size: .85rem; }
.small-stats { margin: .5rem 0 0; } .small-stats .stat b { font-size: 1.25rem; }
.table-wrap { overflow-x: auto; padding: 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th, .tbl td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { background: #fafafa; font-weight: 600; font-size: .82rem; color: #4b5563; position: sticky; top: 0; }
.tbl tr.disabled td { opacity: .5; }
.resp-tbl td { max-width: 280px; }

/* builder */
.builder-page { background: var(--pbg); }
.b-top { gap: .6rem; }
.b-left, .b-right { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.back-link { text-decoration: none; font-size: 1.3rem; color: var(--muted); padding: 0 .3rem; }
.top-title { font-weight: 600; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 36vw; }
.save-status { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.save-status.err { color: var(--err); font-weight: 600; }
.tabs { display: flex; justify-content: center; gap: .3rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 53px; z-index: 19; }
.tabs button, .tabs a { background: none; border: 0; padding: .7rem 1rem .6rem; font: inherit; font-weight: 600; font-size: .92rem; color: var(--muted); cursor: pointer; text-decoration: none; border-bottom: 3px solid transparent; }
.tabs .on { color: var(--accent); border-bottom-color: var(--accent); }
.b-main { display: flex; justify-content: center; gap: 1rem; padding: 1.2rem .8rem 6rem; }
.b-col { width: 100%; max-width: 770px; }
.toolbar { position: sticky; top: 120px; align-self: flex-start; display: flex; flex-direction: column; background: #fff; border-radius: 10px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: .3rem; }
.toolbar button { width: 44px; height: 44px; border: 0; background: none; border-radius: 8px; font-size: 1.25rem; cursor: pointer; color: #4b5563; font-weight: 600; }
.toolbar button:hover { background: #f1f3f4; color: var(--accent); }
@media (max-width: 860px) {
  .toolbar { position: fixed; bottom: 14px; left: 50%; top: auto; transform: translateX(-50%); flex-direction: row; z-index: 30; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
  .top-title { max-width: 30vw; }
  .save-status { display: none; }
}
.bq { position: relative; cursor: pointer; padding-top: 1.4rem; }
.bq.active { cursor: default; border-left: 6px solid #4285f4; border-left-color: color-mix(in srgb, var(--accent) 75%, #4285f4); padding-left: calc(1.4rem - 5px); }
.bq.dragging { opacity: .4; }
.bq.drop-before { box-shadow: 0 -3px 0 var(--accent); } .bq.drop-after { box-shadow: 0 3px 0 var(--accent); }
.drag { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); color: #c0c4cc; font-size: .8rem; letter-spacing: -1px; cursor: grab; padding: 0 .6rem; user-select: none; line-height: 1.2; }
.bq:not(:hover):not(.active) .drag { visibility: hidden; }
.head-card { border-top: 10px solid var(--accent); padding: 0; overflow: hidden; }
.head-card .head-in { padding: 1.3rem 1.5rem 1.4rem; }
.head-card.bq { padding-top: 0; }
.header-img { width: 100%; max-height: 240px; object-fit: cover; display: block; }
.title-in { font-size: 1.9rem; font-weight: 500; border: 0; border-bottom: 1px solid transparent; width: 100%; padding: .2rem 0; background: transparent; }
.title-in.sm { font-size: 1.35rem; }
.title-in:focus, .desc-in:focus, .q-title-in:focus { outline: none; border-bottom: 2px solid var(--accent); }
.bq:not(.active) .title-in:hover { border-bottom-color: var(--line); }
.desc-in { border: 0; border-bottom: 1px solid transparent; width: 100%; resize: none; background: transparent; padding: .35rem 0; color: #4b5563; overflow: hidden; }
.bq.active .desc-in { border-bottom-color: var(--line); }
.q-top { display: flex; gap: .8rem; align-items: flex-start; }
.q-title-in { flex: 1; font-size: 1.02rem; background: #f8f9fa; border: 0; border-bottom: 1px solid #9aa0a6; padding: .8rem .9rem; resize: none; overflow: hidden; border-radius: 4px 4px 0 0; min-width: 0; }
.type-sel { width: 220px; padding: .7rem .6rem; flex: none; }
@media (max-width: 600px) { .q-top { flex-direction: column; } .type-sel { width: 100%; } }
.q-edit { margin-top: .8rem; }
.opt-row { display: flex; align-items: center; gap: .4rem; margin: .1rem 0; }
.opt-row .ico { width: 24px; color: #9aa0a6; flex: none; text-align: center; }
.opt-row .opt-in { flex: 1; border: 0; border-bottom: 1px solid transparent; padding: .45rem 0; background: transparent; min-width: 0; }
.opt-row .opt-in:hover { border-bottom-color: var(--line); }
.opt-row .opt-in:focus { outline: none; border-bottom: 2px solid var(--accent); }
.opt-row .opt-in.fake { color: var(--muted); }
.opt-row.correct .opt-in { color: var(--ok); font-weight: 600; }
.opt-row .goto { max-width: 210px; }
.opt-row.add { padding: .3rem 0; flex-wrap: wrap; }
.opt-row.add .hint { margin-left: auto; }
@media (max-width: 600px) { .opt-row.add .hint { display: none; } .opt-row { flex-wrap: wrap; } .opt-row .goto { max-width: 100%; margin-left: 28px; } }
.grid-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 600px) { .grid-edit { grid-template-columns: 1fr; } }
.inline-fields { display: flex; align-items: center; gap: .6rem; margin: .4rem 0; }
.inline-fields.wrap { flex-wrap: wrap; align-items: flex-end; gap: .8rem 1.4rem; }
.fld { display: flex; flex-direction: column; font-size: .82rem; color: var(--muted); gap: .15rem; min-width: 0; }
.fld > span { font-weight: 500; }
.fld .line, .fld .sel { color: var(--ink); font-size: .95rem; }
.st .fld { max-width: 440px; }
.val { margin-top: .8rem; font-size: .9rem; } .val summary { cursor: pointer; color: var(--accent); font-weight: 500; }
.answer-key { margin-top: 1rem; padding: .8rem 1rem; background: #f0fdf4; border: 1px dashed #86efac; border-radius: 8px; }
.q-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.q-foot .extras { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.q-foot .acts { display: flex; align-items: center; gap: .1rem; margin-left: auto; }
.q-foot .sep { width: 1px; height: 26px; background: var(--line); margin: 0 .6rem; }
.tgl { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-size: .9rem; user-select: none; position: relative; margin: .35rem 0; }
.st .tgl { display: flex; justify-content: space-between; padding: .5rem 0; margin: 0; border-bottom: 1px solid #f1f3f4; }
.tgl input { position: absolute; opacity: 0; pointer-events: none; }
.tgl i { width: 36px; height: 20px; border-radius: 10px; background: #bdc1c6; position: relative; transition: background .15s; flex: none; }
.tgl i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.tgl input:checked + i { background: var(--accent); } .tgl input:checked + i::after { transform: translateX(16px); }
.tgl input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.tgl.disabled { opacity: .5; cursor: default; }
.tgl-btn { width: 40px; height: 22px; border-radius: 11px; background: #bdc1c6; border: 0; position: relative; cursor: pointer; padding: 0; }
.tgl-btn i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.tgl-btn.on { background: var(--ok); } .tgl-btn.on i { transform: translateX(18px); }
.after-bar { display: flex; align-items: center; gap: .6rem; justify-content: flex-start; margin: -.2rem 0 .8rem; padding: .35rem .6rem; }
.quiz-note { background: #e6f4ea; color: #0d652d; padding: .5rem .9rem; border-radius: 8px; margin: -.3rem 0 .8rem; }
.section-card { border-top: 6px solid var(--accent); }
.section-tag { display: inline-block; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 600; padding: .15rem .6rem; border-radius: 6px 6px 6px 0; margin-bottom: .5rem; }
.pv { margin-top: .5rem; color: #5f6368; }
.pv-opt { padding: .2rem 0; } .pv-opt .ico { display: inline-block; width: 22px; color: #9aa0a6; }
.pv-opt.correct { color: var(--ok); font-weight: 600; }
.pv-line { border-bottom: 1px dotted #bdc1c6; color: #9aa0a6; padding: .4rem 0; width: 60%; font-size: .9rem; }
.pv-scale { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; } .pv-dot { width: 26px; height: 26px; border: 1px solid #bdc1c6; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
.pv-rating { font-size: 1.4rem; color: #9aa0a6; letter-spacing: .1em; }
.swatches { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; margin: .4rem 0 .2rem; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.sw.on { box-shadow: 0 0 0 2px var(--ink); }
.swatches input[type=color] { width: 34px; height: 34px; border: 0; padding: 0; background: none; cursor: pointer; }
.st h2 { margin-bottom: .6rem; } .st-row { padding: .6rem 0; border-bottom: 1px solid #f1f3f4; }
.share-row { display: flex; gap: .6rem; align-items: center; margin: .3rem 0 1rem; }
.share-row .line { font-size: .95rem; }
.share-btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.qr-card { text-align: center; } .qr-card img { border: 1px solid var(--line); border-radius: 8px; }
.toast { position: fixed; bottom: 80px; left: 50%; transform: translate(-50%, 20px); background: #202124; color: #fff; padding: .6rem 1.1rem; border-radius: 6px; font-size: .9rem; opacity: 0; transition: all .25s; z-index: 100; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* responses */
.r-head h2 { margin: 0; }
.accept-row { display: flex; justify-content: flex-end; align-items: center; gap: .7rem; margin: .8rem 0 0; font-size: .9rem; }
.subtabs { display: flex; justify-content: center; gap: 1.5rem; margin: 1rem -1.4rem -1.25rem; border-top: 1px solid var(--line); }
.subtabs a { padding: .6rem .2rem; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 3px solid transparent; }
.subtabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.sum .q-title { margin-bottom: .1rem; }
.bars { margin-top: .9rem; display: flex; flex-direction: column; gap: .45rem; }
.bar-row { display: grid; grid-template-columns: minmax(80px, 34%) 1fr 96px; gap: .7rem; align-items: center; font-size: .9rem; }
.bar-row .bl { overflow: hidden; text-overflow: ellipsis; }
.bar-row .bt { background: #f1f3f4; height: 22px; border-radius: 4px; overflow: hidden; }
.bar-row .bt i { display: block; height: 100%; background: var(--accent); border-radius: 4px; min-width: 2px; }
.bar-row.correct .bt i { background: var(--ok); } .bar-row.correct .bl { color: var(--ok); font-weight: 600; }
.bar-row .bn { text-align: right; white-space: nowrap; }
.bars.vertical { flex-direction: row; align-items: flex-end; height: 190px; gap: .5rem; }
.bars.vertical .bar-row { display: flex; flex-direction: column-reverse; align-items: center; flex: 1; height: 100%; gap: .2rem; }
.bars.vertical .bt { width: 100%; max-width: 54px; flex: 1; display: flex; align-items: flex-end; background: transparent; }
.bars.vertical .bt i { width: 100%; }
.bars.vertical .bn { text-align: center; font-size: .8rem; } .bars.vertical .bn small { display: none; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 110px; margin-top: .6rem; }
.sp { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.sp i { display: block; width: 100%; max-width: 26px; background: var(--accent); border-radius: 3px 3px 0 0; }
.sp small { font-size: .65rem; color: var(--muted); }
.ans-list { list-style: none; padding: 0; margin: .7rem 0 0; max-height: 360px; overflow-y: auto; }
.ans-list li { background: #f8f9fa; border-radius: 4px; padding: .45rem .7rem; margin-bottom: .3rem; font-size: .92rem; }
.sum-grid td { text-align: center; font-weight: 600; }
.ind-nav { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ind-nav .line.num { width: 64px; text-align: center; }
.answer { margin: .4rem 0 0; }
.kv th { text-align: left; font-weight: 500; color: var(--muted); padding: .2rem 1rem .2rem 0; } .kv td { padding: .2rem 0; }
.pager { display: flex; gap: .3rem; justify-content: center; flex-wrap: wrap; }
.pager a { padding: .3rem .7rem; border-radius: 6px; background: #fff; border: 1px solid var(--line); text-decoration: none; }
.pager a.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.score { display: flex; align-items: baseline; gap: .8rem; margin: 1rem 0 .3rem; }
.score span { color: var(--muted); } .score b { font-size: 1.9rem; color: var(--accent); }
.inline-score { margin: .4rem 0 0; } .inline-score b { font-size: 1.3rem; }

/* public form */
body.pub { background: var(--pbg); }
.pub-wrap { max-width: 770px; margin: 0 auto; padding: 1rem .8rem 3rem; }
.embed .pub-wrap { padding-top: .4rem; }
.preview-bar { background: #202124; color: #e8eaed; font-size: .85rem; padding: .5rem .9rem; border-radius: 8px; margin-bottom: .8rem; }
.preview-bar a { color: #aecbfa; }
.form-desc { margin-top: .5rem; color: #3c4043; }
.req { color: var(--err); }
.req-note { color: var(--err); font-size: .85rem; margin: 1rem 0 0; border-top: 1px solid var(--line); padding-top: .7rem; }
.q { transition: border-color .15s; }
.q.has-error { border-color: var(--err); }
.q-title { font-size: 1.02rem; font-weight: 500; }
.q-heading { font-size: 1.3rem; font-weight: 500; margin: 0; }
.pts { font-size: .75rem; color: var(--muted); font-weight: 500; margin-left: .5rem; white-space: nowrap; background: #f1f3f4; padding: .05rem .45rem; border-radius: 4px; }
.q-desc { color: #5f6368; font-size: .9rem; margin-top: .2rem; }
.q-body { margin-top: .9rem; }
.q-body .line { max-width: 100%; }
.q-body .short-w { width: auto; min-width: 180px; }
.q-err { color: var(--err); font-size: .85rem; margin-top: .4rem; } .q-err:empty { display: none; }
.q-err::before { content: "⚠ "; }
.opts { display: flex; flex-direction: column; gap: .15rem; }
.opt { display: flex; align-items: center; gap: .75rem; padding: .45rem .3rem; border-radius: 6px; cursor: pointer; }
.opt:hover { background: #f8f9fa; }
.opt input[type=radio], .opt input[type=checkbox], .grid input, .scale-opt input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 0; cursor: pointer; }
.opt.other .other-text { flex: 1; min-width: 0; }
.clear-choice { font-size: .85rem; margin-top: .5rem; float: right; }
.select { min-width: 200px; padding: .6rem .7rem; }
.scale { display: flex; align-items: flex-end; justify-content: center; gap: .2rem; flex-wrap: wrap; text-align: center; }
.scale-opt { display: flex; flex-direction: column; align-items: center; gap: .55rem; padding: .3rem .55rem; cursor: pointer; font-size: .9rem; }
.scale-lbl { padding: 0 .5rem .2rem; font-size: .88rem; color: #3c4043; max-width: 140px; }
@media (max-width: 560px) { .scale { justify-content: flex-start; } .scale-lbl { width: 100%; text-align: left; padding: 0; } .scale-opt { padding: .3rem .35rem; } }
.rating { display: flex; gap: .3rem; flex-wrap: wrap; }
.rate { display: flex; flex-direction: column; align-items: center; cursor: pointer; padding: .2rem .3rem; }
.rate input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate span { font-size: 2rem; line-height: 1; color: #dadce0; transition: transform .1s, color .1s; }
.icon-thumb .rate span { filter: grayscale(1) opacity(.45); }
.rate small { font-size: .72rem; color: var(--muted); }
.rate:hover span { transform: scale(1.12); }
.rate.on span { color: #f9ab00; } .icon-heart .rate.on span { color: #e8336d; } .icon-thumb .rate.on span { filter: none; }
.rate input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.grid-wrap { overflow-x: auto; }
.grid { border-collapse: separate; border-spacing: 0 4px; width: 100%; font-size: .9rem; }
.grid th { font-weight: 400; padding: .4rem .5rem; color: #3c4043; }
.grid thead th { text-align: center; font-size: .85rem; }
.grid tbody th { text-align: left; background: #f8f9fa; border-radius: 6px 0 0 6px; min-width: 110px; }
.grid td { text-align: center; background: #f8f9fa; padding: .55rem .4rem; }
.grid td:last-child { border-radius: 0 6px 6px 0; }
.sum-grid tbody th, .sum-grid td { background: transparent; border-bottom: 1px solid var(--line); border-radius: 0; }
.file-drop { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; border: 1px dashed #bdc1c6; border-radius: 8px; padding: .8rem 1rem; cursor: pointer; }
.file-drop:hover { border-color: var(--accent); }
.file-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-drop:focus-within { outline: 2px solid var(--accent); }
.file-cta { color: var(--accent); font-weight: 600; border: 1px solid color-mix(in srgb, var(--accent) 35%, #fff); padding: .35rem .8rem; border-radius: 6px; }
.page-nav { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; margin: 1rem 0; }
.page-nav > div:first-child { display: flex; gap: .6rem; }
.progress { display: flex; align-items: center; gap: .6rem; }
.progress .bar { width: 160px; height: 8px; background: color-mix(in srgb, var(--accent) 15%, #fff); border-radius: 4px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.fine { margin-top: 2rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.done-msg { margin: .5rem 0 1rem; font-size: 1rem; }
.review.right { border-left: 5px solid var(--ok); } .review.wrong { border-left: 5px solid var(--err); }
.q.right { border-left: 5px solid var(--ok); } .q.wrong { border-left: 5px solid var(--err); }
.review p { margin: .4rem 0 0; }
@media (max-width: 600px) {
  .card { padding: 1rem 1.05rem; }
  .bq.active { padding-left: calc(1.05rem - 5px); }
  .head-card .head-in { padding: 1rem 1.05rem; }
  .title-in { font-size: 1.5rem; }
  .topbar nav { gap: .7rem; font-size: .9rem; }
  .form-item { grid-template-columns: 1fr; } .fi-meta { justify-self: start; padding-left: 16px; }
  .bar-row { grid-template-columns: minmax(70px, 38%) 1fr 70px; }
  .subtabs { margin-left: -1.05rem; margin-right: -1.05rem; margin-bottom: -1rem; }
  .tabs button, .tabs a { padding: .6rem .6rem; }
}
