/*
  Widget styles for /tools/. Loaded AFTER guides/guide.css, which supplies the
  page chrome (nav, headings, tables, notes, the MixReady panel) — this file is
  only the interactive parts, so an article page never downloads it.

  Every tool is a widget plus an article. The widget sits above the fold
  because that is what the visitor came for; the article underneath is what a
  crawler reads, and it is plain static HTML that works with the script off.
*/

/* The widget shell. Wider than the 760px prose column on purpose — a control
   row and its result need the room, and the eye should read it as an
   instrument rather than as a paragraph. */
.widget{
  margin:36px 0 0;padding:22px 24px 24px;border-radius:16px;
  border:1px solid var(--line);
  background:
    radial-gradient(120% 140% at 12% 0%,rgba(112,134,255,.10),transparent 60%),
    radial-gradient(110% 130% at 92% 100%,rgba(163,177,255,.07),transparent 62%),
    var(--panel);
}
.widget-head{
  display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;
  font-family:var(--mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;
  color:var(--faint);margin-bottom:18px;
}
.widget-head b{color:var(--brand);font-weight:500}

/* Controls ---------------------------------------------------------------- */
.controls{display:flex;flex-wrap:wrap;gap:16px 20px;align-items:flex-end}
.ctrl{display:flex;flex-direction:column;gap:7px;min-width:0}
.ctrl label{
  font-family:var(--mono);font-size:10.5px;letter-spacing:.08em;
  text-transform:uppercase;color:var(--faint);
}
.ctrl input,.ctrl select{
  font:inherit;font-size:16px;color:var(--text);
  background:#0d1016;border:1px solid var(--line);border-radius:9px;
  padding:10px 12px;transition:border-color .15s;
  font-variant-numeric:tabular-nums;
}
.ctrl input:focus,.ctrl select:focus{outline:none;border-color:var(--brand)}
.ctrl input[type=number]{width:110px}
.ctrl select{cursor:pointer;max-width:100%}
.ctrl.grow{flex:1;min-width:180px}
.ctrl.grow select{width:100%}

/* Buttons keep the site's primary look, at control scale. */
.tbtn{
  font:inherit;font-size:14.5px;font-weight:550;cursor:pointer;
  padding:10px 18px;border-radius:9px;border:1px solid transparent;
  background:var(--brand);color:#0b0d12;transition:background .15s;
}
.tbtn:hover{background:var(--brand-hi)}
.tbtn.ghost{background:transparent;border-color:var(--line);color:var(--text)}
.tbtn.ghost:hover{border-color:var(--brand);background:transparent}
.tbtn:focus-visible,.ctrl input:focus-visible,.ctrl select:focus-visible,
.key:focus-visible{outline:2px solid var(--brand);outline-offset:2px}

/* Result ------------------------------------------------------------------ */
.result{
  margin-top:22px;padding-top:20px;border-top:1px solid var(--line-soft);
}
.verdict{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.verdict .big{
  font-size:34px;font-weight:680;letter-spacing:-.03em;color:var(--text);
  font-variant-numeric:tabular-nums;line-height:1.1;
}
.pill{
  font-family:var(--mono);font-size:11px;letter-spacing:.06em;text-transform:uppercase;
  border-radius:6px;padding:4px 10px;white-space:nowrap;
}
.pill.good{color:var(--green);background:rgba(52,211,153,.13)}
.pill.ok{color:var(--amber);background:rgba(251,191,36,.13)}
.pill.hard{color:#f87171;background:rgba(248,113,113,.13)}
.pill.info{color:#959eb2;background:rgba(149,158,178,.13)}
.result .say{margin-top:12px;color:var(--dim);font-size:15.5px;line-height:1.6}
.result .say b{color:var(--text);font-weight:600}
.result .say + .say{margin-top:8px}

/* A small facts row under a result — label over value, tabular. */
.facts{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.fact{
  flex:1 1 120px;padding:11px 13px;border-radius:10px;
  border:1px solid var(--line-soft);background:#10131a;
}
.fact b{display:block;font-size:19px;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.fact span{
  display:block;margin-top:2px;font-family:var(--mono);font-size:9.5px;
  letter-spacing:.07em;text-transform:uppercase;color:var(--faint);
}

/* Camelot wheel ----------------------------------------------------------- */
.wheel-wrap{display:flex;gap:26px;align-items:center;flex-wrap:wrap}
.wheel{flex:0 0 auto;width:min(340px,100%);height:auto;margin-inline:auto}
.wheel .seg{cursor:pointer;transition:opacity .15s}
.wheel .seg:hover{opacity:.85}
.wheel .seg-fill{fill:#161a22;stroke:var(--line);stroke-width:1}
/* Roles are set by the script: selected key, the safe moves, the avoided one. */
.wheel .seg.sel .seg-fill{fill:rgba(112,134,255,.85);stroke:var(--brand-hi)}
.wheel .seg.step .seg-fill{fill:rgba(112,134,255,.30);stroke:rgba(112,134,255,.55)}
/* The flip is a different KIND of move, not a weaker step, so it sits outside
   the two blue tiers: in ink, because the brand has no third hue (2026-09-28). */
.wheel .seg.flip .seg-fill{fill:rgba(231,233,238,.16);stroke:rgba(231,233,238,.45)}
.wheel .seg.avoid .seg-fill{fill:rgba(248,113,113,.13);stroke:rgba(248,113,113,.35)}
.wheel .seg-txt{
  font-family:var(--mono);font-size:9.5px;fill:var(--dim);
  text-anchor:middle;dominant-baseline:middle;pointer-events:none;user-select:none;
}
.wheel .seg.sel .seg-txt{fill:#0b0d12;font-weight:600}
.wheel .seg.step .seg-txt,.wheel .seg.flip .seg-txt{fill:var(--text)}

.wheel-out{flex:1 1 260px;min-width:0}
.moves{display:grid;gap:8px;margin-top:4px}
.move{
  display:flex;align-items:center;gap:11px;padding:9px 12px;
  border:1px solid var(--line-soft);border-radius:9px;background:#12151c;font-size:14px;
}
.move .code{
  font-family:var(--mono);font-size:13px;font-weight:600;color:var(--text);
  min-width:34px;text-align:center;
}
.move .what{color:var(--dim);min-width:0;flex:1}
.move .lift{
  font-family:var(--mono);font-size:11.5px;color:var(--faint);white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.move.is-sel{border-color:rgba(112,134,255,.5)}
.move.is-flip{border-color:rgba(231,233,238,.3)}
.move.is-avoid{border-color:rgba(248,113,113,.28)}
.notation{
  margin-top:14px;padding-top:13px;border-top:1px solid var(--line-soft);
  font-family:var(--mono);font-size:12.5px;color:var(--faint);line-height:1.9;
}
.notation b{color:var(--text);font-weight:500}

/* Set skeleton (printable) ------------------------------------------------- */
.skel{display:grid;gap:8px;margin-top:18px}
.sk{
  display:grid;grid-template-columns:96px 1fr auto;gap:12px;align-items:center;
  padding:11px 14px;border:1px solid var(--line-soft);border-radius:10px;background:#12151c;
}
.sk .when{font-family:var(--mono);font-size:12px;color:var(--brand);font-variant-numeric:tabular-nums}
.sk .what{font-size:14.5px;color:var(--text);font-weight:550}
.sk .what span{display:block;font-weight:400;font-size:13px;color:var(--faint);margin-top:2px}
.sk .n{font-family:var(--mono);font-size:12px;color:var(--dim);white-space:nowrap}

/* Two-track widgets (will-these-two-songs-mix): a side per deck, each with
   its search, its pick-list and its manual fields. */
.pair{display:grid;grid-template-columns:1fr 1fr;gap:18px 22px}
.side{min-width:0}
.side-head{
  font-family:var(--mono);font-size:12px;color:var(--brand);text-transform:uppercase;
  letter-spacing:.1em;margin-bottom:10px;
}
.side .controls{margin-top:12px}
.picks{margin-top:8px}
.picks .moves{margin-top:6px}
.picks .say{margin:8px 0 0;font-size:13.5px;color:var(--faint)}
.ctrl input[type=search]{width:100%}
.ctrl textarea{
  width:100%;font:inherit;font-size:14.5px;line-height:1.5;color:var(--text);
  background:#10131a;border:1px solid var(--line);border-radius:10px;padding:10px 12px;
  resize:vertical;min-height:120px;
}
.ctrl textarea:focus{outline:none;border-color:var(--brand)}
.mono{font-family:var(--mono);font-size:.92em;color:var(--text)}
.result .pill{margin-left:auto;align-self:center}

/* The energy curve (energy-arc-planner). One SVG, built node by node. */
.arc{display:block;width:100%;height:auto;margin-top:16px}
.arc-band{fill:rgba(255,255,255,.025)}
.arc-band.alt{fill:rgba(255,255,255,.055)}
.arc-grid{stroke:var(--line);stroke-width:1}
.arc-lab,.arc-sec{font-family:var(--mono);font-size:11px;fill:var(--faint)}
.arc-sec{fill:var(--dim)}
.arc-line{fill:none;stroke:var(--brand);stroke-width:2.5;stroke-linejoin:round}
.arc-dot{fill:#0b0d12;stroke:var(--brand-hi);stroke-width:2}

/* The no-script state. Every tool's <noscript> says what the page still gives
   you, because the article below the widget is the substance either way. */
.noscript{
  margin-top:18px;padding:14px 16px;border-radius:10px;
  border:1px dashed var(--line);color:var(--faint);font-size:14.5px;
}

@media (max-width:620px){
  .pair{grid-template-columns:1fr}
  .widget{padding:18px 16px 20px;border-radius:14px}
  .controls{gap:14px}
  .ctrl input[type=number]{width:100%}
  .ctrl{flex:1 1 130px}
  .verdict .big{font-size:28px}
  .sk{grid-template-columns:76px 1fr;row-gap:4px}
  .sk .n{grid-column:2;justify-self:start}
}

/* Printing a set skeleton is a real use — it goes to the booth on paper.
   Everything except the plan itself comes off the page. */
@media print{
  header.nav,.back,.widget-head,.controls,.noscript,
  .mrbox,footer,.faq,.tw,h2,p,ul,ol,.banner,.crumb,.kicker,.lede,.byline{display:none!important}
  .widget{border:0;background:none;padding:0;margin:0}
  .result{border-top:0}
  body{background:#fff;color:#000;font-size:12pt}
  .sk{border-color:#bbb;background:none;break-inside:avoid}
  .sk .what,.fact b{color:#000}
  .sk .when,.sk .n,.fact span{color:#444}
  .fact{border-color:#bbb;background:none}
  .verdict .big{color:#000}
  .result .say,.result .say b{color:#000}
  .skel,.facts{display:grid}
  .arc-line{stroke:#000}
  .arc-dot{fill:#fff;stroke:#000}
  .arc-lab,.arc-sec{fill:#444}
  .print-only{display:block!important}
}
.print-only{display:none}

/* --------------------------------------------------------------- consent
   The analytics card, same rules as index.html's inline copy. Markup is
   built by tools/consent.js rather than written into seven pages. */
/* The analytics-consent card (markup at the end of the page). Non-blocking on
   purpose — the page works untouched behind it, and both answers are one equal
   click. Kept identical in index.html and docs.html — edit both. */
.consent{
  position:fixed;z-index:40;right:18px;bottom:18px;left:18px;max-width:470px;
  margin-left:auto;background:var(--panel);border:1px solid var(--line);
  border-radius:12px;padding:16px 18px;
  /* Dark shadow alone vanishes on this page's dark imagery — the hairline
     light ring is what actually separates the card. */
  box-shadow:0 0 0 1px rgba(255,255,255,.07),0 6px 18px rgba(0,0,0,.55),
    0 18px 60px rgba(0,0,0,.75);
}
.consent p{margin:0;font-size:13.5px;line-height:1.55;color:var(--dim)}
.consent p+p{margin-top:8px}
.consent-links{margin-top:10px;font-size:12.5px;color:var(--faint)}
.consent-actions{display:flex;gap:10px;margin-top:12px}
.c-btn{
  flex:1;font:inherit;font-size:13.5px;font-weight:550;padding:8px 4px;text-align:center;
  cursor:pointer;border:1px solid var(--line);border-radius:9px;
  background:var(--panel-2,#1e2333);color:var(--text);transition:border-color .15s;
}
.c-btn:hover{border-color:var(--brand)}
.c-btn.allow{background:var(--brand);border-color:var(--brand);color:#0b0d12}
.c-btn.allow:hover{background:var(--brand-hi);border-color:var(--brand-hi)}
