/* UseFlo free tools: layered on top of /blog/blog.css (same tokens, buttons, cards, prose). */
:root { --lilac: #c9a7ff; --lilac-soft: #ebe0ff; --ok: #23a094; --warn: #ffc900; --bad: #ff7051; --field-h: 46px; }
.tone-lilac { --tone: var(--lilac); --tone-soft: var(--lilac-soft); }
.tool-body { background: var(--paper); }

/* Hero */
.tool-hero { background: var(--tone); border-bottom: 1px solid var(--ink); padding: 28px 0 36px;
  background-image: radial-gradient(rgba(0,0,0,.14) 1px, transparent 1.2px); background-size: 14px 14px; }
.tool-hero h1 { font-size: clamp(34px, 5.6vw, 60px); line-height: 1; letter-spacing: -.04em; font-weight: 700; margin: 14px 0 14px; max-width: 16em; }
.tool-hero .dek { max-width: 760px; }
.perks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 14px; font-weight: 600; }
.perks li::before { content: "\2713"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 6px; border: 1px solid var(--ink); border-radius: 999px; background: #fff; font-size: 11px; }

/* Stage */
.tool-stage { padding: 28px 0 8px; }
.tool-card { display: grid; gap: 0; background: #fff; border: 1px solid var(--ink); border-radius: var(--r); box-shadow: 6px 6px 0 0 #000; overflow: hidden; }
@media (min-width: 900px) { .tool-card:not(.stack) { grid-template-columns: minmax(0, 7fr) minmax(0, 6fr); } .tool-card:not(.stack) .tool-result { border-left: 1px solid var(--ink); border-top: 0; } }
.tool-form { padding: 22px 20px 24px; min-width: 0; }
.tool-result { padding: 22px 20px 24px; background: var(--tone-soft, #fff); border-top: 1px solid var(--ink); min-width: 0; }
.tool-card.stack .tool-result { background: #fff; }
.tool-result .hint { margin: 0; color: var(--muted); font-size: 16px; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.privacy { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.btn.flashed { background: var(--yellow); color: var(--ink); }

/* Form controls */
.row { display: grid; gap: 14px 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin-bottom: 14px; }
.row .field { margin-bottom: 0; }
.field.wide { grid-column: 1 / -1; }
.f-label { font-size: 14px; font-weight: 700; letter-spacing: -.01em; display: flex; justify-content: space-between; gap: 8px; }
.f-label output { font-weight: 800; background: var(--yellow); border: 1px solid var(--ink); border-radius: 999px; padding: 0 10px; font-size: 13px; line-height: 22px; }
.f-hint, .fs-hint { font-size: 13px; color: var(--muted); line-height: 1.4; margin: 0; }
.f-note { font-size: 14px; color: var(--muted); margin: -4px 0 14px; }
.f-box { display: flex; align-items: stretch; border: 1px solid var(--ink); border-radius: var(--r); background: #fff; min-height: var(--field-h); overflow: hidden; }
.f-box:focus-within { outline: 3px solid var(--pink); outline-offset: 1px; }
.f-box input, .f-box select { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 17px; font-weight: 600; padding: 0 12px; height: var(--field-h); color: var(--ink); outline: none; }
.f-box select { appearance: none; -webkit-appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 34px; cursor: pointer; }
.f-box input[type=date], .f-box input[type=time] { font-size: 16px; }
.f-suffix { display: grid; place-items: center; padding: 0 12px; border-left: 1px solid var(--ink); background: var(--paper); font-size: 13px; font-weight: 700; white-space: nowrap; }
.field.range input[type=range] { width: 100%; accent-color: var(--ink); height: 32px; margin: 0; cursor: pointer; }
.seg { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--ink); border-radius: var(--r); overflow: hidden; background: #fff; }
.seg label { flex: 1 1 auto; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 6px 12px; font-size: 14px; font-weight: 700; border-right: 1px solid var(--ink); text-align: center; line-height: 1.2; cursor: pointer; }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--pink); outline-offset: -3px; }
.field.checkbox { flex-direction: row; align-items: flex-start; gap: 10px; font-size: 15px; font-weight: 600; }
.field.checkbox input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.field.checkbox small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.fs { border: 1px solid var(--ink); border-radius: var(--r); padding: 14px 14px 2px; margin: 0 0 16px; min-width: 0; }
.fs legend { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 0 6px; }
.fs .row:last-child { margin-bottom: 12px; }
textarea.ta { width: 100%; min-height: 96px; border: 1px solid var(--ink); border-radius: var(--r); font: inherit; font-size: 16px; padding: 10px 12px; resize: vertical; }
textarea.ta:focus { outline: 3px solid var(--pink); outline-offset: 1px; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 14px; }
.btn-x { height: var(--field-h); width: var(--field-h); padding: 0; flex: none; font-size: 20px; line-height: 1; }

/* Dynamic lists (subjects, blocks) */
.list { display: grid; gap: 10px; margin-bottom: 12px; }
.list-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.list-row .f-box { min-height: 42px; }
.list-row .f-box input, .list-row .f-box select { height: 42px; font-size: 15px; }
.list-row .swatch { width: 14px; height: 14px; border: 1px solid var(--ink); border-radius: 50%; flex: none; margin-left: 12px; align-self: center; }
.list-head { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.list-head span:last-child { width: 42px; }

/* Results */
.big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 6px; }
.big-num { font-size: clamp(44px, 7vw, 64px); font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.big-label { font-size: 16px; font-weight: 700; color: #333; }
.r-title { font-size: clamp(26px, 4vw, 36px); line-height: 1.05; letter-spacing: -.035em; font-weight: 800; margin: 0 0 8px; }
.r-sub { margin: 0 0 16px; font-size: 16px; color: #333; }
.verdict { display: grid; gap: 4px; border: 1px solid var(--ink); border-left-width: 8px; border-radius: var(--r); background: #fff; padding: 12px 14px; margin: 14px 0; font-size: 15px; }
.verdict strong { font-size: 17px; }
.v-ok { border-left-color: var(--ok); } .v-warn { border-left-color: var(--warn); } .v-bad { border-left-color: var(--bad); } .v-info { border-left-color: var(--sky); }
.stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin: 14px 0; }
.stat { background: #fff; border: 1px solid var(--ink); border-radius: var(--r); padding: 10px 12px; }
.stat-v { font-size: 22px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.stat-l { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: .06em; }
.meters { display: grid; gap: 10px; margin: 14px 0; }
.meter-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.meter-track { height: 14px; border: 1px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; }
.meter-fill { height: 100%; background: var(--tone, var(--pink)); border-right: 1px solid var(--ink); transition: width .4s cubic-bezier(.3,.7,.4,1); }
.tips { margin: 12px 0 0; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.tips li { background: #fff; border: 1px solid var(--ink); border-radius: var(--r); padding: 10px 12px; font-size: 15px; line-height: 1.45; }
.tips li::before { content: "→ "; font-weight: 800; }
.r-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.plan { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--ink); border-radius: var(--r); overflow: hidden; font-size: 14px; margin: 12px 0; }
.plan th { background: var(--yellow); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--ink); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.plan td { padding: 8px 10px; border-bottom: 1px solid rgba(0,0,0,.15); vertical-align: top; }
.plan tr:last-child td { border-bottom: 0; }
.plan td.num { font-weight: 800; white-space: nowrap; }
.r-small { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.tag { display: inline-block; padding: 1px 8px; border: 1px solid var(--ink); border-radius: 999px; font-size: 12px; font-weight: 700; background: #fff; }

/* Quiz */
.quiz { min-width: 0; }
.q-intro { margin: 0 0 14px; color: #333; font-size: 16px; }
.q-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.q-text { font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; margin: 0 0 12px; }
.q-n { color: var(--muted); font-weight: 600; }
.q-scale { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.q-opt { height: 48px; border: 1px solid var(--ink); border-radius: var(--r); background: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.q-opt:hover { transform: translate(-2px, -2px); box-shadow: 2px 2px 0 0 #000; }
.q-opt.sel { background: var(--ink); color: #fff; }
.quiz.live .q { display: none; } .quiz.live .q.on { display: block; animation: qin .22s ease-out; }
.quiz.done .q, .quiz.done .q-nav, .quiz.done .q-intro { display: none; }
.quiz.done .q-count::after { content: " · done"; }
@keyframes qin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.q-progress { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.q-bar { flex: 1; height: 12px; border: 1px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; }
.q-fill { height: 100%; width: 0; background: var(--tone, var(--pink)); transition: width .3s; }
.q-count { font-size: 13px; font-weight: 800; white-space: nowrap; }
.q-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.q-hint { font-size: 13px; color: var(--muted); }
.q-back[disabled] { opacity: .4; pointer-events: none; }
.quiz:not(.live) .q-scale { pointer-events: none; }
.result-card { background: #fff; border: 1px solid var(--ink); border-radius: var(--r); box-shadow: var(--pop); padding: 20px; }
.result-card .kicker { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

/* Timetable grid */
.tt { display: grid; gap: 8px; margin: 12px 0; }
.tt-day { background: #fff; border: 1px solid var(--ink); border-radius: var(--r); overflow: hidden; }
.tt-day.rest { opacity: .7; }
.tt-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 8px; padding: 8px 10px; background: var(--paper); border-bottom: 1px solid var(--ink); font-size: 13px; font-weight: 800; }
.tt-head .exam { background: var(--coral); border: 1px solid var(--ink); border-radius: 999px; padding: 0 8px; font-size: 11px; }
.tt-blocks { display: grid; gap: 6px; padding: 8px; }
.tt-block { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border: 1px solid var(--ink); border-radius: 4px; font-size: 14px; font-weight: 600; line-height: 1.3; }
.tt-block small { font-weight: 700; opacity: .75; white-space: nowrap; }
.tt-empty { padding: 8px 10px; font-size: 13px; color: var(--muted); }
@media (min-width: 720px) { .tt.week { grid-template-columns: repeat(7, minmax(0, 1fr)); } .tt.week .tt-block { flex-direction: column; gap: 2px; font-size: 13px; } }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.legend i { width: 14px; height: 14px; border: 1px solid var(--ink); border-radius: 4px; display: inline-block; }

/* Printable planner */
.planner { background: #fff; border: 1px solid var(--ink); border-radius: var(--r); padding: 22px; margin: 12px 0; box-shadow: var(--pop); }
.planner h3 { margin: 0; font-size: 26px; letter-spacing: -.03em; line-height: 1.1; }
.planner .sub { color: var(--muted); font-size: 14px; margin: 4px 0 16px; }
.planner .cols { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .planner .cols { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.planner h4 { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.planner .slot { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: center; border-bottom: 1px solid rgba(0,0,0,.2); min-height: 32px; font-size: 14px; }
.planner .slot b { font-weight: 800; font-size: 12px; color: var(--muted); }
.planner .slot .blk { border: 1px solid var(--ink); border-radius: 4px; padding: 2px 8px; font-weight: 600; margin: 3px 0; }
.planner .lines .line { border-bottom: 1px solid rgba(0,0,0,.25); min-height: 30px; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.planner .box { width: 16px; height: 16px; border: 1px solid var(--ink); border-radius: 4px; flex: none; }
.planner .dots-row { display: flex; gap: 6px; } .planner .dots-row i { width: 18px; height: 18px; border: 1px solid var(--ink); border-radius: 50%; display: inline-block; }
.planner .week { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.planner .wday { border: 1px solid var(--ink); border-radius: 4px; padding: 8px; min-height: 140px; font-size: 13px; }
.planner .wday b { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.planner.style-cute { background: var(--pink-soft); } .planner.style-cute h3 { font-family: 'DM Sans', sans-serif; }
.planner.style-grid { background-image: linear-gradient(rgba(0,0,0,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,.08) 1px, transparent 1px); background-size: 20px 20px; }

/* Index */
.tools-hero h1 { font-size: clamp(40px, 7vw, 80px); }
.cat-blurb { margin: -8px 0 18px; color: var(--muted); font-size: 17px; max-width: 700px; }
.tile-emoji { font-size: 26px; line-height: 1; margin-right: auto; }
.tool-tile .card-band { justify-content: space-between; align-items: center; }
.tools-about { padding-bottom: 8px; }
.tools-about p { font-size: 18px; line-height: 1.6; }
.read-next { margin-top: 40px; }

/* Focus test */
.sart { display: grid; place-items: center; gap: 12px; min-height: 260px; border: 1px solid var(--ink); border-radius: var(--r); background: #fff; user-select: none; -webkit-user-select: none; touch-action: manipulation; cursor: pointer; }
.sart .digit { font-size: 120px; font-weight: 800; letter-spacing: -.06em; line-height: 1; }
.sart .msg { font-size: 16px; font-weight: 700; text-align: center; padding: 0 20px; max-width: 420px; }
.sart.go { background: var(--yellow-soft); }
.sart .mini { font-size: 13px; color: var(--muted); }

@media (max-width: 560px) { .tool-form, .tool-result { padding: 18px 14px 20px; } .list-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; } }

/* Print: only the result */
@media print {
  .site-header, .site-footer, .tool-hero, .tool-form, .tool-actions, .privacy, .post-grid, .related, .r-actions, .q-progress, .q-nav { display: none !important; }
  .tool-card { display: block; border: 0; box-shadow: none; }
  .tool-result { border: 0; background: #fff; padding: 0; }
  .planner, .result-card { box-shadow: none; }
  body { background: #fff; }
  @page { margin: 12mm; }
}

/* Timetable maker: subject rows + week labels */
.list-row[hidden] { display: none; }
.s-head, .s-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr) minmax(0, .9fr) auto; }
.s-head span:last-child { width: 42px; }
.tt-week-label { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 14px 0 -4px; }
.tt-day.today { outline: 3px solid var(--ink); outline-offset: -1px; }
.r-h { font-size: 20px; letter-spacing: -.02em; margin: 20px 0 6px; }
.today-plan { padding: 0; background: #fff; border: 1px solid var(--ink); border-radius: var(--r); padding: 8px; }
@media (max-width: 560px) {
  .s-head { display: none; }
  .s-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .s-row .s-name { grid-column: 1 / -1; }
}

/* Planner maker */
.planner .slot.cont { opacity: .75; }
.planner .slot .blk.cont { border-style: dashed; min-height: 14px; margin: 3px 0; }
.planner .slot .blk small { font-weight: 500; opacity: .7; }
.planner .mood span { font-size: 20px; width: 30px; height: 30px; display: inline-grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; background: #fff; }
.planner .habit-grid { border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.planner .habit-grid th { font-size: 11px; font-weight: 800; color: var(--muted); padding: 2px 4px; }
.planner .habit-grid td { padding: 3px 4px; border-bottom: 1px solid rgba(0,0,0,.15); }
.planner .habit-grid td:first-child { font-weight: 600; padding-right: 10px; }
.planner .habit-grid .box { display: inline-block; }
.planner .wday .blk { border: 1px solid var(--ink); border-radius: 4px; padding: 1px 6px; font-size: 12px; font-weight: 600; margin: 2px 0; background: #fff; }
.planner.weekly .cols { margin-top: 16px; }
@media print { .planner { break-inside: avoid; page-break-inside: avoid; } .planner .week { grid-template-columns: repeat(7, 1fr); } .planner .cols { grid-template-columns: 1.2fr 1fr; } }
