/* HEW Coach Academy (the client's brand). Colors are placeholders until HEW supplies its brand kit:
   change --hew and --hew-ink to match their logo and everything follows. */
:root {
  /* HEW brand colors, sampled from the HEW Fitness logo and site */
  --hew: #ffd249;
  --hew-2: #e9b928;
  --hew-soft: #fff4cf;
  --hew-ink: #021f2d;
  --hew-ink-2: #0a2b3c;
  --hew-blue: #4473b4;
  --hew-blue-2: #2f5c99;
  --hew-steel: #1d3a4b;
  --paper: #f6f5f1;
  --ink: #021f2d;
  --ink-2: #1d3a4b;
  --muted: #55656d;
  --line: #e2e4e3;
  --line-2: #eef0ef;
  --accent: var(--hew-ink);
  --accent-soft: var(--hew-soft);
  --display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
}
body.hew { font-family: var(--sans); }
.hew h1, .hew h2, .hew .h-dis { font-family: var(--display); font-weight: 400; letter-spacing: .03em; text-transform: uppercase; }
.hew h3 { font-family: var(--sans); font-weight: 700; }
body.hew { background: var(--paper); }
.hew .wrap { width: min(1200px, calc(100% - 40px)); margin: 0 auto; }
@media (max-width: 600px) { .hew .wrap { width: calc(100% - 32px); } }
.btn.hew-btn { background: var(--hew); color: var(--hew-ink); }
.btn.hew-btn:hover { background: var(--hew-2); box-shadow: 0 6px 18px rgba(233, 185, 40, .35); }

/* ---------- App header ---------- */
.app-top { background: #fff; color: var(--hew-ink); box-shadow: inset 0 -5px 0 var(--hew); position: sticky; top: var(--bar-h); z-index: 50; border-bottom: 1px solid rgba(255,255,255,.06); }
.app-top .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.wordmark { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--hew-ink); flex: 0 0 auto; }
.wordmark img { height: 26px; width: auto; }

.wordmark .hewmark-old { white-space: nowrap; font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: .02em; line-height: 1; padding: 6px 9px 5px; background: #fff; color: var(--hew-ink); border-radius: 6px; }
.wordmark .hewmark-old i { font-style: normal; color: var(--hew); }
.wordmark > span:not(.hewmark) { display: flex; flex-direction: column; line-height: 1.05; }
.wordmark b { font-family: var(--display); font-size: 19px; letter-spacing: .12em; text-transform: uppercase; font-weight: 400; padding-left: 14px; border-left: 2px solid var(--line); }
.wordmark small { font-size: 11.5px; color: #5d6b72; letter-spacing: .04em; padding-left: 16px; }
.roles { display: flex; gap: 4px; margin-left: auto; background: var(--paper); padding: 4px; border-radius: 999px; }
.roles a { text-decoration: none; color: #4a5a63; font-size: 13px; font-weight: 700; padding: 7px 13px; border-radius: 999px; white-space: nowrap; }
.roles a:hover { color: var(--hew-ink); }
.roles a[aria-current] { background: var(--hew-ink); color: #fff; }
.who { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--hew); color: var(--hew-ink); flex: 0 0 auto; }
.avatar.alt { background: var(--hew-blue); color: #fff; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.who > span:not(.avatar) { display: flex; flex-direction: column; line-height: 1.15; font-size: 13px; }
.who small { color: #5d6b72; font-size: 11.5px; }
@media (max-width: 900px) { .who > span:not(.avatar) { display: none; } }
@media (max-width: 640px) {
  .app-top .wrap { height: auto; padding: 10px 0; flex-wrap: wrap; gap: 10px; }
  .roles { order: 3; margin: 0; width: 100%; justify-content: space-between; }
  .roles a { flex: 1; text-align: center; padding: 7px 6px; font-size: 12.5px; }
  .who { margin-left: auto; }
  .wordmark small { display: none; }
}

/* ---------- Page header ---------- */
.page-head { background: var(--hew-ink-2); color: #fff; padding: 36px 0 34px; position: relative; overflow: hidden; }
.page-head::after { content: ""; position: absolute; right: -120px; top: -160px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,210,73,.22), transparent 70%); pointer-events: none; }
.page-head .wrap { position: relative; z-index: 1; }
.eyebrow { font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--hew-blue-2); margin-bottom: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(40px, 5.4vw, 64px); line-height: .95; }
.page-head p { color: #c6d3da; max-width: 680px; margin: 12px 0 0; font-size: 16.5px; }
.page-head .sample-tag { color: #c7c9d0; border-color: rgba(255,255,255,.25); background: transparent; }

/* ---------- Layout ---------- */
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; padding: 28px 0 60px; align-items: start; }
@media (max-width: 1020px) { .grid-main { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 20px; min-width: 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; min-width: 0; }
.card h2 { font-size: 26px; line-height: 1; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.empty { color: var(--muted); font-size: 14.5px; padding: 18px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; }

/* ---------- Next up ---------- */
.next-up { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: center; background: var(--hew-ink); color: #fff; border: 0; }
.next-up .thumb { aspect-ratio: 16/10; border-radius: 12px; background: linear-gradient(rgba(2,31,45,.35), rgba(2,31,45,.65)), url(../img/hew-coach.webp) center/cover; position: relative; overflow: hidden; display: grid; place-items: center; }
.next-up .thumb .play { width: 54px; height: 54px; border-radius: 50%; background: var(--hew); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(255,210,73,.45); }
.next-up .thumb .play::after { content: ""; border-left: 16px solid var(--hew-ink); border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }
.next-up .thumb .mv { position: absolute; left: 12px; bottom: 10px; font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #fff; opacity: .85; }
.next-up h2 { font-size: 36px; color: #fff; }
.next-up p { color: #c6d3da; margin: 8px 0 16px; }
.next-up .meta { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--hew); font-weight: 800; }
@media (max-width: 640px) { .next-up { grid-template-columns: 1fr; } }

/* ---------- Progress ring ---------- */
.ready { text-align: center; }
.ring { width: 150px; height: 150px; margin: 6px auto 12px; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .bg { stroke: var(--line-2); }
.ring .fg { stroke: var(--hew-blue); stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease); }
.ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; }
.ring .lbl b { font-family: var(--display); font-size: 46px; font-weight: 400; line-height: 1; }
.ring .lbl small { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.checklist { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.checklist li { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 9px 11px; border-radius: 10px; background: var(--paper); }
.checklist li .ck { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; border: 2px solid var(--line); color: transparent; flex: 0 0 auto; }
.checklist li.ok .ck { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist li.wait .ck { border-color: var(--warn); color: var(--warn); }
.checklist li span { flex: 1; }
.ready-badge { display: inline-flex; gap: 8px; align-items: center; background: var(--ok-soft); color: var(--ok); font-weight: 800; padding: 8px 14px; border-radius: 999px; font-size: 14px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.stat b { display: block; font-family: var(--display); font-size: 38px; font-weight: 400; line-height: 1; }
.stat span { font-size: 13px; color: var(--muted); }
.stats.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .stats.four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .stats { grid-template-columns: 1fr 1fr; } .stats .stat:last-child:nth-child(3) { grid-column: 1 / -1; } }

/* ---------- Learning path ---------- */
.track { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; }
.track + .track { margin-top: 12px; }
.track > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; }
.track > summary::-webkit-details-marker { display: none; }
.track > summary:hover { background: #fbfaf8; }
.track .tn { width: 38px; height: 38px; border-radius: 10px; background: var(--hew-ink); color: var(--hew); display: grid; place-items: center; font-family: var(--display); font-size: 22px; }
.track.complete .tn { background: var(--ok); }
.track h3 { font-size: 17px; font-weight: 800; }
.track .tsub { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.track .tbar { width: 120px; }
.track .chev { transition: transform .2s; display: inline-block; margin-left: 8px; color: var(--muted); }
.track[open] .chev { transform: rotate(180deg); }
.bar { height: 7px; border-radius: 7px; background: var(--line-2); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--hew-blue); border-radius: 7px; transition: width .8s var(--ease); }
.bar.ok > span { background: var(--ok); }
.bar.warn > span { background: #d39a1c; }
.tbar small { display: block; font-size: 12px; color: var(--muted); text-align: right; margin-top: 4px; }
@media (max-width: 560px) { .track .tbar { width: 70px; } .track .tsub { display: none; } }
.lessons { list-style: none; margin: 0; padding: 0 10px 10px; display: grid; gap: 4px; }
.lrow { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 10px 10px; border-radius: 12px; text-decoration: none; color: inherit; }
a.lrow:hover { background: var(--paper); }
.lrow .st { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; border: 2px solid var(--line); color: var(--muted); }
.lrow.done .st { background: var(--ok); border-color: var(--ok); color: #fff; }
.lrow.current { background: var(--hew-soft); box-shadow: inset 4px 0 0 var(--hew); }
.lrow.current .st { border-color: var(--hew-ink); background: var(--hew); color: var(--hew-ink); }
.lrow.locked { opacity: .55; }
.lrow .lt { font-weight: 700; font-size: 15px; }
.lrow .lm { font-size: 12.5px; color: var(--muted); }
.lrow .tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 480px) { .lrow { grid-template-columns: 30px 1fr; } .lrow .tags { grid-column: 2; justify-content: flex-start; } }

/* ---------- Updates banner ---------- */
.update { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; background: #fff7e6; border: 1px solid #f1d9a3; border-radius: 16px; padding: 16px 18px; }
.update + .update { margin-top: 10px; }
.update .ui { width: 40px; height: 40px; border-radius: 10px; background: #d39a1c; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.update b { display: block; font-size: 15.5px; }
.update span { font-size: 13.5px; color: #6b5420; }
@media (max-width: 560px) { .update { grid-template-columns: auto 1fr; } .update .btn { grid-column: 1 / -1; } }

/* ---------- Lists ---------- */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.feed li { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); font-size: 14px; align-items: flex-start; }
.feed li:first-child { border-top: 0; }
.feed .when { color: var(--muted); font-size: 12.5px; white-space: nowrap; margin-left: auto; }
.reply { background: var(--paper); border-radius: 12px; padding: 14px; font-size: 14px; }
.reply + .reply { margin-top: 10px; }
.reply .q { font-weight: 700; margin-bottom: 6px; }
.reply .a { border-left: 3px solid var(--hew-blue); padding-left: 10px; }

/* ---------- Lesson page ---------- */
.lesson-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; padding: 24px 0 70px; align-items: start; }
@media (max-width: 1060px) { .lesson-wrap { grid-template-columns: 1fr; } }
.crumbs { font-size: 13.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.crumbs a { color: var(--ink); font-weight: 700; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.lesson-title { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.lesson-title h1 { font-size: clamp(42px, 5vw, 60px); line-height: .95; }
.stage { border-radius: 18px; overflow: hidden; background: var(--hew-ink); color: #fff; }
.screen { aspect-ratio: 16/9; position: relative; background: radial-gradient(80% 90% at 30% 20%, #1d3a4b, #021f2d 70%); display: grid; place-items: center; overflow: hidden; }
.screen .figure { position: absolute; inset: 0; display: grid; place-items: center end; padding-right: 9%; }
.screen .figure svg { width: 26%; max-width: 220px; height: auto; opacity: .9; }
.screen .trail { stroke: rgba(255,255,255,.18); stroke-dasharray: 4 7; }
.screen .fig-arm { transform-origin: 50% 40%; }
.screen .pend { transform-origin: 100px 30px; transform: rotate(-38deg); transition: transform .6s var(--ease); }
.screen.playing .pend { animation: swing 1.3s ease-in-out infinite alternate; }
@keyframes swing { from { transform: rotate(-38deg); } to { transform: rotate(38deg); } }
.screen .clockhand { transform-origin: 100px 120px; }
.screen.playing .clockhand { animation: tick 4s linear infinite; }
@keyframes tick { to { transform: rotate(360deg); } }
.screen .ov { position: absolute; left: 16px; top: 14px; right: 16px; display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.screen .ov .lbl { font-family: var(--display); font-size: 22px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; }
.screen .ov small { display: block; font-family: var(--sans); font-size: 12px; color: #b9bbc3; letter-spacing: 0; text-transform: none; font-weight: 600; }
.screen .ov .sample-tag { background: rgba(0,0,0,.4); color: #d7d9de; border-color: rgba(255,255,255,.3); }
.screen .bigplay { position: relative; z-index: 2; width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--hew); cursor: pointer; box-shadow: 0 12px 36px rgba(255,210,73,.45); display: grid; place-items: center; transition: transform .2s var(--ease); }
.screen .bigplay:hover { transform: scale(1.06); }
.screen .bigplay::after { content: ""; border-left: 22px solid var(--hew-ink); border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 6px; }
.screen.playing .bigplay { opacity: 0; pointer-events: none; }
.screen .chapter-now { position: absolute; left: 16px; bottom: 14px; background: rgba(0,0,0,.55); padding: 7px 11px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.controls { display: flex; align-items: center; gap: 12px; padding: 12px 16px 14px; flex-wrap: wrap; }
.controls .pp { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; color: var(--hew-ink); cursor: pointer; font-weight: 800; flex: 0 0 auto; }
.scrub { flex: 1; min-width: 140px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.18); position: relative; cursor: pointer; }
.scrub > span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--hew); border-radius: 6px; }
.scrub i { position: absolute; top: -3px; width: 3px; height: 12px; background: rgba(255,255,255,.6); border-radius: 2px; }
.controls .time { font-size: 12.5px; color: #b9bbc3; font-variant-numeric: tabular-nums; }
.controls label { font-size: 12.5px; color: #b9bbc3; display: flex; align-items: center; gap: 8px; }
.controls select { font: inherit; font-size: 14px; font-weight: 700; padding: 7px 10px; border-radius: 9px; border: 1px solid rgba(255,255,255,.2); background: var(--hew-steel); color: #fff; }
.chapters { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 16px; }
.chapters button { border: 1px solid rgba(255,255,255,.18); background: transparent; color: #e3e4e8; padding: 7px 11px; border-radius: 999px; font-size: 13px; cursor: pointer; }
.chapters button b { color: var(--hew); font-variant-numeric: tabular-nums; margin-right: 6px; }
.chapters button:hover, .chapters button.on { background: #fff; color: var(--hew-ink); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 16px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 10px 14px; font-weight: 700; font-size: 14.5px; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--hew-blue); }
.cue-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.cue-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; }
.cue-list li b { width: 28px; height: 28px; border-radius: 8px; background: var(--hew-ink); color: var(--hew); display: grid; place-items: center; font-size: 13px; flex: 0 0 auto; }
.cue-list.faults li b { background: var(--danger-soft); color: var(--danger); }
.scale-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.scale-grid div { border-radius: 12px; padding: 14px; background: var(--paper); }
.scale-grid h4 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px; color: var(--muted); }
@media (max-width: 560px) { .scale-grid { grid-template-columns: 1fr; } }
.notes textarea { width: 100%; min-height: 110px; font: inherit; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; resize: vertical; }
.notes textarea:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--hew-ink); box-shadow: 0 0 0 3px rgba(13,13,15,.08); }
.opts { display: grid; gap: 8px; margin: 12px 0; }
.opt { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 15px; background: #fff; text-align: left; width: 100%; }
.opt:hover { border-color: var(--hew-ink); }
.opt .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: 0 0 auto; }
.opt[aria-pressed="true"] { border-color: var(--hew-ink); }
.opt[aria-pressed="true"] .dot { border: 6px solid var(--hew-ink); }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.right .dot { border: 6px solid var(--ok); }
.opt.wrong { border-color: var(--danger); background: var(--danger-soft); }
.feedback { font-size: 14px; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }
.feedback.ok { background: var(--ok-soft); color: var(--ok); }
.feedback.no { background: var(--danger-soft); color: var(--danger); }
.practical { border: 2px dashed var(--line); }
.practical.pending { border-color: #d39a1c; background: #fffaf0; }
.practical.approved { border-style: solid; border-color: var(--ok); background: #f4fbf6; }
.practical.redo { border-color: var(--danger); background: #fff6f4; }
.locked-box { text-align: center; padding: 50px 20px; }
.locked-box .lk { width: 64px; height: 64px; border-radius: 50%; background: var(--hew-ink); color: #fff; display: grid; place-items: center; margin: 0 auto 14px; font-size: 26px; }

/* ---------- Ask HEW ---------- */
.ask { position: sticky; top: calc(var(--bar-h) + 80px); display: flex; flex-direction: column; max-height: calc(100vh - var(--bar-h) - 100px); padding: 0; overflow: hidden; }
.ask-head { padding: 16px 18px; background: var(--hew-ink); color: #fff; display: flex; gap: 12px; align-items: center; }
.ask-head .ai { width: 38px; height: 38px; border-radius: 10px; background: var(--hew); color: var(--hew-ink); display: grid; place-items: center; font-family: var(--display); font-size: 17px; letter-spacing: .04em; }
.ask-head b { display: block; font-family: var(--display); font-size: 22px; font-weight: 400; letter-spacing: .04em; }
.ask-head small { color: #b9bbc3; font-size: 12px; }
.ask-log { padding: 16px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 220px; flex: 1; background: #fbfaf8; }
.msg { max-width: 92%; padding: 11px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; }
.msg.me { align-self: flex-end; background: var(--hew-ink); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg .src { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); }
.msg .jump { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; border: 0; background: var(--hew); color: var(--hew-ink); text-decoration: none; font-weight: 800; font-size: 12.5px; padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.msg .acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ask-sugg { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 10px; background: #fbfaf8; }
.ask-sugg button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 10px; font-size: 12.5px; cursor: pointer; text-align: left; }
.ask-sugg button:hover { border-color: var(--hew-ink); }
.ask-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.ask-form input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 12px; }
.ask-form input:focus { outline: none; border-color: var(--hew-ink); }
.ask-rule { font-size: 12px; color: var(--muted); padding: 0 14px 12px; background: #fff; }
@media (max-width: 1060px) { .ask { position: static; max-height: none; } .ask-log { max-height: 420px; } }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.tbl th { text-align: left; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 800; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: #fbfaf8; }
.tbl .pname { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.tbl .pname small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.tbl .pb { min-width: 120px; }
.tbl .pb small { font-size: 12px; color: var(--muted); }
.tbl tr.hl td { background: #fff7e6; }

/* ---------- Priorities ---------- */
.prio { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.prio li { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.prio .pi { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 16px; }
.pi.so { background: var(--hew); color: var(--hew-ink); }
.pi.qq { background: var(--info-soft); color: var(--info); }
.pi.up { background: #fff1d6; color: #8a5e0e; }
.pi.tr { background: var(--hew-ink); color: var(--hew); }
.pi.nh { background: var(--ok-soft); color: var(--ok); }
.prio b { display: block; font-size: 15px; }
.prio span { font-size: 13.5px; color: var(--muted); }
@media (max-width: 560px) { .prio li { grid-template-columns: auto 1fr; } .prio li .btn { grid-column: 1 / -1; } }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13.5px; font-weight: 700; }
.field label small { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea { font: inherit; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; width: 100%; }
.field textarea { min-height: 90px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.rubric { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.rubric label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14.5px; }
.rubric input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--ok); }
.kn { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 6px; }
.kn + .kn { margin-top: 10px; }
.kn .kh { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.kn b { font-size: 15px; }
.kn p { margin: 0; font-size: 14px; color: var(--ink-2); }
.kn .ka { display: flex; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--hew-ink); color: #fff; }
.hq-curr { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.hq-curr .tc { border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.hq-curr .tc b { font-family: var(--display); font-size: 22px; font-weight: 400; letter-spacing: .03em; display: block; }
.hq-curr .tc span { font-size: 13px; color: var(--muted); }
.foot-note { font-size: 12.5px; color: var(--muted); padding: 18px 0 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1020px) { .two-col { grid-template-columns: 1fr; } }
