/* Ostro pro Office (0.1.0). 60 % calm light surfaces, 30 % ink, 10 % blue for the one thing to press.
   Pink and butter appear only where they mean the same as in the document: pink = sounds like AI,
   butter = does not sound like you. Three numbered steps, one place at a time. */
:root {
  --page: #ECEFF3; --card: #FFFFFF; --soft: #F5F7FA; --well: #DDE2E9; --line: #C3CAD6; --hair: #E1E5EC;
  --ink: #1A2034; --ink2: #2A3350; --muted: #4E566C; --on-ink: #EEF1F6; --on-ink2: #AFB8CA;
  --blue: #4353F5; --blue-d: #2F3DCC; --blue-l: #E8EAFE;
  --mint: #B4E5CE; --mint-d: #2E9E6B; --mint-ink: #12402C;
  --pink: #F6C2D4; --pink-d: #E0729A; --pink-ink: #7A1F40; --pink-l: #FCE9F0;
  --butter: #FBE7A1; --butter-ink: #5E4A00; --butter-l: #FDF5D8;
  --head: "Ostro Grotesk", "Segoe UI", system-ui, sans-serif; --body: "Ostro Plex", "Segoe UI", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(26, 32, 52, .06), 0 6px 20px rgba(26, 32, 52, .07);
}
* { box-sizing: border-box; }
html { background: var(--page); }
body { margin: 0; background: var(--page); color: var(--ink); font: 14px/1.45 var(--body); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* header */
.top { background: var(--ink); color: var(--on-ink); display: flex; gap: 10px; align-items: center; padding: 10px 14px; position: sticky; top: 0; z-index: 3; }
.top .bot { width: 38px; height: 38px; object-fit: contain; background: var(--page); border-radius: 12px; padding: 2px; flex: none; }
.top .who { flex: 1; min-width: 0; }
.top b { font: 700 16px/1.2 var(--head); display: block; letter-spacing: .01em; }
.top small { color: var(--on-ink2); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .ghost { flex: none; background: transparent; color: var(--on-ink); box-shadow: inset 0 0 0 1px #4A5372; padding: 6px 11px; font-size: 12.5px; font-weight: 500; }
.top .ghost:hover { background: var(--ink2); }
.top .ghost:focus-visible { outline-color: #fff; }

main { padding: 12px; display: block; }
#kontrola { display: flex; flex-direction: column; gap: 12px; }

/* buttons */
button, .btn { border: 0; border-radius: 11px; padding: 9px 12px; background: var(--soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; font-weight: 500; transition: background .12s, transform .06s; text-align: center; display: inline-block; }
button:hover, .btn:hover { background: #fff; }
button:active, .btn:active { transform: translateY(1px); }
.pri, button.pri, .btn.pri { background: var(--blue); color: #fff; box-shadow: none; font-weight: 600; }
.pri:hover, button.pri:hover, .btn.pri:hover { background: var(--blue-d); }
button.link { background: none; box-shadow: none; color: var(--blue-d); padding: 2px 0; text-decoration: underline; text-underline-offset: 2px; font-weight: 500; border-radius: 4px; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, label.btn:focus-within, [tabindex]:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.wide { width: 100%; }

/* numbered steps */
.sh { display: flex; align-items: center; gap: 9px; }
.sh b { font: 700 15px/1.25 var(--head); flex: 1; }
.num { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 12.5px/24px var(--head); text-align: center; }
.step, .hero { background: var(--card); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); }
.step { display: flex; flex-direction: column; gap: 10px; transition: box-shadow .2s; }
.step.pulse { box-shadow: 0 0 0 3px var(--blue), var(--shadow); }
.snote { margin: 0; color: var(--muted); font-size: 13px; }

/* 1: the result */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.hero .sh { align-self: stretch; text-align: left; margin-bottom: 4px; }
.gauge { position: relative; width: 148px; height: 148px; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 12; }
.gauge .gt { stroke: var(--well); }
.gauge .gv { stroke: var(--pink-d); stroke-linecap: round; transition: stroke-dasharray .5s ease, stroke .3s; }
body[data-level="low"] .gauge .gv { stroke: var(--mint-d); }
body[data-host="excel"] .gauge .gv { stroke: var(--pink-d); }
.gnum { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gnum b { font: 700 34px/1 var(--head); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.gnum small { font-size: 12px; color: var(--muted); margin-top: 3px; letter-spacing: .02em; }
.hero h1 { font: 700 19px/1.25 var(--head); margin: 6px 0 0; }
.hsub { margin: 0; color: var(--ink2); font-size: 13.5px; max-width: 280px; }
.keys { list-style: none; padding: 8px 0 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--hair); align-self: stretch; }
.keys li { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 13px; height: 13px; border-radius: 4px; display: inline-block; box-shadow: inset 0 0 0 1px rgba(26, 32, 52, .12); }
.dot.pink { background: var(--pink); } .dot.butter { background: var(--butter); }

/* one place at a time */
.one { background: var(--card); border-radius: 18px; padding: 14px; box-shadow: inset 0 4px 0 var(--pink-d), var(--shadow); }
.one:has(.tag.butter) { box-shadow: inset 0 4px 0 #E2C34A, var(--shadow); }
.oh { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.tag { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; border-radius: 999px; padding: 2px 9px; flex: none; }
.tag.pink { background: var(--pink); color: var(--pink-ink); } .tag.butter { background: var(--butter); color: var(--butter-ink); }
.where { font-size: 12px; color: var(--muted); flex: 1; min-width: 0; }
.nav { display: flex; align-items: center; gap: 2px; flex: none; }
.nb { width: 28px; height: 28px; padding: 0; border-radius: 9px; font: 600 17px/26px var(--head); }
.cnt { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 38px; text-align: center; }
.lab { display: block; font: 700 17px/1.25 var(--head); }
.one q { display: block; quotes: none; margin: 9px 0 0; font-size: 13px; line-height: 1.5; padding: 8px 10px; border-radius: 9px; cursor: pointer; overflow-wrap: anywhere; }
.one q span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.one q.pink { background: var(--pink-l); box-shadow: inset 3px 0 0 var(--pink-d); } .one q.butter { background: var(--butter-l); box-shadow: inset 3px 0 0 #E2C34A; }
.rs { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.rs li { font-size: 12.5px; color: var(--ink2); padding-left: 14px; position: relative; }
.rs li::before { content: ""; position: absolute; left: 0; top: 6px; width: 7px; height: 7px; border-radius: 2px; background: var(--pink-d); }
.rs b { display: block; font-size: 13px; color: var(--ink); font-weight: 600; }
.rs span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.more { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; padding-left: 14px; }
.one .why, .one .fix { margin: 9px 0 0; font-size: 13px; color: var(--ink2); }
.one .fix span, .core span { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 1px; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.acts button { flex: 1 1 0; white-space: nowrap; }
.acts .wide { flex: 1 1 100%; }
.clear { margin: 0; background: var(--mint); color: var(--mint-ink); border-radius: 14px; padding: 12px 14px; font-weight: 500; text-align: center; }

/* the rewrite */
.rw { margin-top: 14px; padding: 12px; border-radius: 14px; background: var(--blue-l); box-shadow: inset 0 0 0 1px #C9CEFB; }
.rw.busy { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink2); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid #C9CEFB; border-top-color: var(--blue); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } .gauge .gv { transition: none; } }
.rwh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rwh b { font: 700 14px var(--head); flex: 1 1 100%; }
.chipok { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 9px; }
.chipok.ok { background: var(--mint); color: var(--mint-ink); } .chipok.warn { background: var(--pink); color: var(--pink-ink); }
.rwtext { margin: 10px 0 0; background: #fff; border-radius: 10px; padding: 10px 11px; font-size: 13.5px; line-height: 1.55; box-shadow: inset 0 0 0 1px #DADDFB; }
.core { margin: 9px 0 0; font-size: 12.5px; color: var(--ink2); }
.rw .acts { margin-top: 12px; }

/* 2: your style */
.meter { display: flex; flex-direction: column; gap: 5px; }
.track { display: block; height: 8px; border-radius: 4px; background: var(--well); overflow: hidden; }
.track i { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 4px; transition: width .3s; }
.meter.full .track i { background: var(--mint-d); }
.meter small { font-size: 12.5px; color: var(--muted); }
.sacts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filebtn { flex: 1 1 auto; }
#styleFiles { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.sformats { color: var(--muted); font-size: 12px; }
#stylePaste { display: flex; flex-direction: column; gap: 6px; }
textarea, input, select { border: 0; border-radius: 10px; padding: 8px 10px; background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; width: 100%; }
.stag { font-size: 11.5px; font-weight: 600; background: var(--mint); color: var(--mint-ink); border-radius: 999px; padding: 2px 9px; }
#styleKnown { display: flex; flex-direction: column; gap: 9px; }
.sdet summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink2); }
.sdesc { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--ink2); display: flex; flex-direction: column; gap: 2px; }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sprog { margin: 0; font-size: 12.5px; color: var(--ink2); background: var(--soft); border-radius: 9px; padding: 7px 9px; }

/* 3: the report */
.plabel { font-size: 12.5px; color: var(--muted); margin-bottom: -4px; }
.pacts { display: flex; gap: 8px; flex-wrap: wrap; }
.pacts button { flex: 1 1 auto; }

/* footer */
.foot { display: flex; flex-direction: column; gap: 10px; padding: 4px 4px 8px; }
.frow { display: flex; align-items: center; gap: 10px; }
.frow button { flex: none; font-size: 13px; padding: 7px 11px; }
.frow small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.prog { display: flex; flex-direction: column; gap: 5px; }
.prog .track { height: 5px; }
.prog small { color: var(--muted); font-size: 12px; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; font-size: 13.5px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { flex: none; width: 36px; height: 20px; border-radius: 10px; background: #A7B0C0; position: relative; transition: background .15s; }
.switch i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + i { background: var(--blue); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 2px solid var(--blue); outline-offset: 2px; }

/* settings */
.card { background: var(--card); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.card > b { font: 700 14.5px var(--head); }
.card small { color: var(--muted); font-size: 12.5px; }
.card button { align-self: flex-start; }
.note { color: var(--muted); font-size: 12.5px; margin: 12px 2px; }
.toast { position: fixed; left: 12px; right: 12px; bottom: 12px; background: var(--ink); color: var(--on-ink); border-radius: 12px; padding: 10px 12px; font-size: 13px; box-shadow: 0 8px 24px rgba(26, 32, 52, .25); z-index: 5; }

/* the whole work */
.full { margin-top: 6px; background: var(--ink); color: #fff; box-shadow: none; font-weight: 600; padding: 9px 16px; }
.full:hover { background: var(--ink2); }
.fullbox .track.big { height: 12px; border-radius: 6px; }
.fullbox .track.big i { transition: width .25s ease; }
.fstats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; }
.fstats div { background: var(--soft); border-radius: 10px; padding: 8px 10px; }
.fstats dt { font-size: 11.5px; color: var(--muted); } .fstats dd { margin: 2px 0 0; font: 700 17px var(--head); }
.fsec { margin-top: 4px; }
.fsec h3 { font: 700 13.5px var(--head); margin: 8px 0 4px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fsec h3 small { font: 500 11.5px var(--body); color: var(--muted); }
.flist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.flist li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; padding: 7px 9px; border-radius: 9px; background: var(--soft); cursor: pointer; }
.flist li:hover { background: var(--pink-l); }
.flist b { font-size: 13px; overflow-wrap: anywhere; } .flist .x { font: 700 13px var(--head); color: #B0406A; white-space: nowrap; }
.flist small { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); }
.fdash { margin: 6px 0 0; font-size: 12.5px; padding: 8px 10px; border-radius: 9px; }
.fdash.ok { background: var(--mint); color: var(--mint-ink); } .fdash.warn { background: var(--pink-l); color: var(--pink-ink); }
.fstale { margin: 6px 0 0; font-size: 12px; color: var(--ink2); background: var(--butter-l); border-radius: 9px; padding: 7px 9px; }

.toast.undo { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.toast.undo button { flex: none; background: #fff; color: var(--ink); box-shadow: none; padding: 6px 10px; font-size: 12.5px; }
/* level comparison: rows are info, not links */
.flist.lvl li { cursor: default; }
.flist.lvl li:hover { background: var(--soft); }
.flist.lvl li.warn { background: var(--pink-l); }
.flist.lvl li.warn small { color: var(--ink); }
#fLevel { width: 100%; margin: 4px 0 8px; padding: 7px 9px; border-radius: 9px; border: 1px solid var(--line, #d9dde6); font: inherit; background: #fff; }

#fbText { width: 100%; box-sizing: border-box; min-height: 64px; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line, #d9dde6); font: inherit; resize: vertical; margin-top: 6px; }
#fbbox .pacts { display: flex; gap: 8px; margin-top: 8px; }
#fbRate { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line, #d9dde6); font: inherit; background: #fff; }

/* the ring is the human share: green from 90 %, orange from 80 %, red below */
body[data-human="ok"] .gauge .gv { stroke: #22a06b; }
body[data-human="mid"] .gauge .gv { stroke: #f08c1a; }
body[data-human="low"] .gauge .gv { stroke: #e0433b; }
body[data-human="ok"] #pct { color: #17794f; }
body[data-human="mid"] #pct { color: #b8640a; }
body[data-human="low"] #pct { color: #c22f28; }
