/* focus.exe — timer, review form, today's sessions; stats when maximized */
.fx { gap: 10px; }
.fx-cols { display: grid; gap: 16px; }
.fx-cols.full { grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); align-items: start; }
.fx-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fx-stats { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fx-stats .hb-block h4 { margin: 0 0 4px; }

.fx-lab, .fx-review label { font-weight: 700; font-size: 13px; }
.fx-review label { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.fx select, .fx input:not([type="checkbox"]), .fx textarea {
  border: var(--b); background: var(--field); padding: 0 10px; font-size: 15px; width: 100%; height: 40px; color: var(--ink);
}
.fx textarea { height: auto; padding: 8px 10px; resize: vertical; font-family: inherit; }

.fx-start, .fx-run, .fx-review { display: flex; flex-direction: column; gap: 8px; }
.fx-digits {
  font-family: var(--display); font-size: 64px; line-height: 1; text-align: center; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; padding: 4px 0;
}
.fx-digits.mute { color: var(--mute); }
.fx-digits.over { color: var(--accent); }
.fx-digits.small { font-size: 40px; text-align: left; }
.win.max .fx-digits { font-size: 84px; }
.fx-name { text-align: center; font-weight: 700; }
.fx-sub { text-align: center; font-size: 13px; min-height: 1.2em; }
.fx-hint { margin: 0; font-size: 12px; }
.fx-tight { margin: 0; }
.fx-len { display: flex; gap: 8px; align-items: stretch; }
.fx-len .seg-btns { flex: 1; }
.fx-len .seg-btns button { white-space: nowrap; }
.fx-len { flex-direction: column; }
.fx-len2 { display: flex; gap: 8px; }
.fx-plus { height: 36px; padding: 0 14px; font-size: 15px; flex: none; }
.fx-custom { flex: 1; }
.fx-custom input { height: 36px; text-align: center; padding: 0 6px; }

/* hard mode switch */
.fx-hard { display: flex; align-items: center; gap: 10px; cursor: pointer; border: var(--line) dashed var(--outline); padding: 8px 10px; }
.fx-hard input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fx-switch { width: 38px; height: 22px; border: var(--b); background: var(--field); position: relative; flex: none; }
.fx-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: var(--ink); transition: left .1s; }
.fx-hard input:checked + .fx-switch { background: var(--accent); }
.fx-hard input:checked + .fx-switch::after { left: 18px; }
.fx-hard input:focus-visible + .fx-switch { outline: 2px dashed var(--ink); outline-offset: 2px; }
.fx-hard span:last-child { display: flex; flex-direction: column; font-size: 13px; }
.fx-hard small { font-size: 11px; }
.fx-badge { display: inline-block; border: var(--b); background: var(--accent); color: var(--on-accent); font-size: 11px; padding: 0 6px; margin-left: 6px; vertical-align: 2px; text-transform: uppercase; letter-spacing: .05em; }

/* drift notes */
.fx-drifts { list-style: none; margin: 0; padding: 0 0 0 10px; border-left: var(--line) solid var(--rule); display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.fx-det summary { cursor: pointer; font-size: 12px; color: var(--mute); margin-top: 2px; }
.fx-det[open] summary { margin-bottom: 4px; }
.fx-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.fx-log li { display: flex; flex-direction: column; font-size: 13px; border-left: 4px solid var(--purple); padding-left: 8px; }
.fx-log li .mut { font-size: 11px; }
.fx-dlg textarea { border: var(--b); background: var(--field); padding: 8px 10px; font-size: 15px; font-family: inherit; resize: vertical; }
.fx-dlg .btn { flex: 1; }
.fx-go { width: 100%; margin-top: 4px; }
.fx-past, .fx-discard { align-self: center; }

.fx-bar { height: 12px; border: var(--b); background: var(--field); padding: 1px; }
.fx-bar i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 10px); }

.fx-drift { display: flex; align-items: center; gap: 12px; border: var(--line) dashed var(--outline); padding: 8px 10px; font-size: 13px; }
.fx-drift span { flex: 1; display: flex; flex-direction: column; }
.fx-drift small { font-size: 11px; }
.fx-drift b { font-family: var(--display); font-size: 28px; }
.fx-drift .btn { height: 38px; padding: 0 14px; }
.fx-row { display: flex; gap: 8px; }
.fx-row > .btn { flex: 1; padding: 0 10px; }

.fx-review h3 { margin: 0; font-size: 15px; }
.fx-q { display: grid; grid-template-columns: repeat(5, 1fr); border: var(--b); }
.fx-q button { border: none; border-right: var(--b); background: var(--field); height: 38px; font-weight: 700; font-size: 16px; }
.fx-q button:last-child { border-right: none; }
.fx-q button:hover { background: var(--hover); }
.fx-q button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.fx-qlab { display: flex; justify-content: space-between; font-size: 11px; margin-top: -4px; }

.fx-today { margin: 0; border-top: var(--line) dashed var(--rule); padding-top: 8px; font-size: 12px; text-align: center; }
.fx-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fx-list li { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; border-top: 1px solid var(--rule); font-size: 13px; }
.fx-list li:first-child { border-top: none; }
.fx-list li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fx-list li > div b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-list .mut { font-size: 12px; overflow-wrap: anywhere; }
.fx-len-v { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fx-x { border: none; background: transparent; color: var(--mute); font-size: 12px; padding: 2px 4px; }
.fx-x:hover { color: var(--ink); }

.fx-bars { height: 150px; }
.fx-bars.dense { gap: 3px; }
.fx-trend { margin: 6px 0 0; font-size: 13px; }
.fx-trend .up { color: var(--heat); }
.fx-trend .down { color: var(--accent); }
.fx-acts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fx-acts li { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.fx-act-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.fx-act-bar { height: 14px; border: var(--b); background: var(--surface); padding: 1px; }
.fx-act-bar i { display: block; height: 100%; background: var(--accent-2); }

.fx-sample { margin: 0; font-size: 12px; border: var(--line) dashed var(--outline); padding: 6px 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* menubar chip while a timer runs */
.focus-chip {
  display: inline-flex; align-items: center; gap: 8px; border: var(--b); background: var(--accent); color: var(--on-accent);
  height: 34px; padding: 0 10px; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; max-width: 240px;
}
.focus-chip[hidden] { display: none; }
.focus-chip [data-chip-n] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; font-size: 12px; }

@media (max-width: 860px) {
  .fx-cols.full { grid-template-columns: 1fr; }
  .focus-chip [data-chip-n] { display: none; }
}

.fx-stats .hb-tiles { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.fx-cols.full .fx-main { position: sticky; top: 0; }

/* Focus page: the full view, a touch bigger */
.fx-pagewin .fx-digits { font-size: 84px; }
.fx-pagewin .fx-cols.full .fx-main { top: 12px; }

/* ---- focus training (focustrain.js) ---- */
.ft-goal { margin: 0; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; border: var(--line) solid var(--outline); background: var(--field); padding: 5px 8px; }
.ft-goal.done { background: color-mix(in srgb, var(--heat) 22%, var(--field)); }
.ft-live { margin: 0; text-align: center; font-size: 13px; }
.ft-ok { color: var(--heat); font-weight: 700; }
.ft-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.ft-top h4 { margin: 0; }
.ft-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.ft-card { border: var(--b); background: var(--surface); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.ft-card.on { box-shadow: var(--sh); }
.ft-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ft-name { border: none; background: none; padding: 0; font-weight: 700; font-size: 14px; text-decoration: underline dotted; text-underline-offset: 3px; }
.ft-name[aria-pressed="true"] { text-decoration: none; background: var(--accent-2); padding: 0 4px; }
.ft-target { flex: 1; font-size: 12px; color: var(--mute); }
.ft-target b { font-family: var(--display); font-size: 22px; color: var(--ink); }
.ft-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ft-d { border: var(--line) solid var(--outline); background: var(--field); display: flex; flex-direction: column; align-items: center; padding: 2px 0; min-height: 40px; }
.ft-d small { font-size: 10px; color: var(--mute); }
.ft-d b { font-size: 11px; text-align: center; line-height: 1.1; }
.ft-d.hit { background: var(--heat); color: var(--surface); }
.ft-d.hit small { color: inherit; }
.ft-d.miss { background: var(--soil); }
.ft-d.today { border-style: dashed; border-color: var(--accent); }
.ft-d.future { opacity: .45; }
.ft-status { margin: 0; font-size: 12px; }
.ft-h { margin: 12px 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.ft-bars { display: flex; align-items: stretch; gap: 3px; height: 150px; padding-top: 16px; }
.ft-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ft-v { font-size: 9px; font-weight: 700; height: 12px; }
.ft-col { flex: 1; width: 100%; max-width: 34px; position: relative; }
.ft-col i { position: absolute; bottom: 0; left: 0; right: 0; border: var(--line) solid var(--outline); min-height: 2px; display: block; }
.ft-col i.hit { background: var(--heat); }
.ft-col i.miss { background: var(--accent-2); }
.ft-tgt { position: absolute; left: -2px; right: -2px; height: 0; border-top: 3px dashed var(--ink); }
.ft-l { font-size: 9px; color: var(--mute); white-space: nowrap; overflow: hidden; max-width: 100%; height: 12px; }
.ft-key { display: flex; gap: 6px; align-items: center; font-size: 11px; margin: 6px 0 0; }
.ft-key i { width: 11px; height: 11px; display: inline-block; border: 1px solid var(--outline); }
.ft-key i.hit { background: var(--heat); } .ft-key i.miss { background: var(--accent-2); margin-left: 8px; }
.ft-key i.tgt { border: none; border-top: 3px dashed var(--ink); height: 0; width: 16px; margin-left: 8px; }
.ft-proj { margin: 8px 0 0; font-size: 13px; }
.ft-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ft-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 13px; }
.ft-form input { height: 40px; border: var(--b); background: var(--field); padding: 0 10px; font-size: 15px; }
.ft-form .btn { flex: 1; }

/* just timing + variants (time.log step 1) */
.fx-badge.alt { background: var(--blue, #B9D3F2); color: var(--ink); }
.fx-vars { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fx-chip { border: var(--line) solid var(--outline); background: var(--field); padding: 3px 10px; font-size: 13px; font-weight: 700; }
.fx-chip:hover { background: var(--hover); }
.fx-chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.fx-varnew { flex: 1; min-width: 140px; }
.fx-varnew input { height: 32px !important; font-size: 13px !important; }
.fx-review .fx-grow { flex: 2; }
.fx-review .fx-amt { flex: 1; }
