/* Circle converter — extra tokens on top of site.css */
.converter-app {
  --err: var(--bad);
  --m-hot1: #4f8cff; --m-hot2: #2950bd; --m-hot3: #0e3789; --m-hot-ink: #ffffff; --m-hot-ink2: rgba(255,255,255,.85);
  --m-ink: #030641; --m-ink2: #5a6478;
  --m-shadow: drop-shadow(0 18px 30px rgba(14,55,137,.18)) drop-shadow(0 2px 4px rgba(14,55,137,.12));
  --hub-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 10px 30px rgba(40,48,60,.12);
}
@media (prefers-color-scheme: dark) {
  .converter-app {
    --m-hot1: #4f8cff; --m-hot2: #2950bd; --m-hot3: #0e3789; --m-hot-ink: #ffffff; --m-hot-ink2: rgba(255,255,255,.85);
    --m-ink: #e9edf6; --m-ink2: #a8b1c7;
    --m-shadow: drop-shadow(0 14px 26px rgba(0,0,0,.55)) drop-shadow(0 2px 3px rgba(0,0,0,.4));
    --hub-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 10px 30px rgba(0,0,0,.35);
  }
}
.converter-app {
  max-width: 1120px; margin: 0 auto; padding-block: 26px 40px;
  display: grid; gap: 28px 56px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
  grid-template-areas: "intro wheel" "log wheel";
  align-items: start;
}
.intro { grid-area: intro; min-width: 0; display: grid; gap: 18px; }
.wheel-wrap { grid-area: wheel; min-width: 0; position: sticky; top: 90px; }
.log { grid-area: log; min-width: 0; }
@media (max-width: 900px) {
  .converter-app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "wheel" "log"; padding-block: 24px 40px; }
  .wheel-wrap { position: static; max-width: 520px; width: 100%; justify-self: center; }
}

.lede { margin: 0; color: var(--muted); max-width: 46ch; font-size: 1.05rem; }
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: baseline; }
.steps li::before {
  content: counter(s, arabic-indic); font-family: var(--font-display); font-weight: 700;
  color: var(--accent); font-size: 1.15rem; text-align: center;
}
.reads { display: grid; gap: 8px; }
.label { font-size: .78rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.fmtchips { display: flex; flex-wrap: wrap; gap: 6px; direction: ltr; justify-content: flex-end; }
.fmtchip {
  font-family: var(--font-mono); font-size: .74rem; font-weight: 500; padding: 2px 8px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface);
}
.sample-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
button.ghost {
  font: inherit; font-weight: 600; font-size: .92rem; color: var(--accent);
  background: transparent; border: 1.5px solid currentColor; border-radius: 10px;
  padding: 7px 14px; cursor: pointer;
}
button.ghost[aria-pressed="true"] { background: var(--accent); color: var(--surface); border-color: var(--accent); }
button.ghost:hover { background: color-mix(in oklch, var(--accent) 10%, transparent); }
button.ghost[aria-pressed="true"]:hover { background: var(--accent); }
.privacy { font-size: .85rem; color: var(--muted); margin: 0; display: flex; gap: 8px; align-items: baseline; }
.privacy svg { flex: none; translate: 0 2px; }

/* the wheel */
.wheel { position: relative; width: 100%; aspect-ratio: 1; max-width: 100%; user-select: none; -webkit-user-select: none; }
.wheel svg { display: block; width: 100%; height: 100%; overflow: visible; filter: var(--m-shadow); }
.seg { cursor: pointer; transition: transform .18s ease; outline: none; }
.seg path { fill: url(#metal); stroke: var(--m-edge); stroke-width: 1.2; transition: opacity .18s ease; }
.seg .lbl { font-family: var(--font-mono); font-weight: 600; font-size: 17px; fill: var(--m-ink); }
.seg .desc { font-family: var(--font-body); font-weight: 500; font-size: 12.5px; fill: var(--m-ink2); }
.seg text { pointer-events: none; text-anchor: middle; dominant-baseline: middle; }
.wheel.has-active .seg:not(.active) path { opacity: .62; }
.seg.active { transform: translate(var(--tx), var(--ty)); }
.seg.active path { fill: url(#metal-hot); }
.seg.active .lbl { fill: var(--m-hot-ink); }
.seg.active .desc { fill: var(--m-hot-ink2); }
.seg:focus-visible path { stroke: var(--ink); stroke-width: 3; }
.wheel.busy .seg { cursor: progress; }
.wheel.busy .seg path { opacity: .55; }
@media (max-width: 520px) {
  .seg .desc { display: none; }
  .seg .lbl { font-size: 22px; }
}
.hub {
  position: absolute; inset: 29.5%; border-radius: 50%;
  background: var(--surface); box-shadow: var(--hub-shadow), 0 0 0 6px var(--m3), 0 0 0 7px var(--m4);
  border: 1px solid var(--line);
  display: grid; place-content: center; text-align: center; padding: 10%;
  gap: 4px; cursor: default;
}
.hub-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.05rem, 3.4vw, 1.55rem); line-height: 1.25; text-wrap: balance; }
.hub-sub { font-size: clamp(.72rem, 1.9vw, .86rem); color: var(--muted); line-height: 1.5; text-wrap: balance; overflow-wrap: anywhere; }
.hub[data-state="ok"] .hub-title { color: var(--ok); }
.hub[data-state="err"] .hub-title { color: var(--err); }
.hub::before {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 3px solid transparent; pointer-events: none;
}
.hub[data-state="busy"]::before { border-top-color: var(--accent); animation: spin 1s linear infinite; }
.wheel.drag-on .hub { border-style: dashed; border-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .seg, .seg path { transition: none; }
  .hub[data-state="busy"]::before { animation: none; border-color: var(--accent); opacity: .5; }
}
.wheel-note { margin: 14px auto 0; text-align: center; font-size: .82rem; color: var(--muted); max-width: 48ch; }

/* log */
.log h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; margin: 0 0 10px; }
.log-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.log-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.fmt-dot {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--m1), var(--m2) 55%, var(--m5)); color: var(--m-ink);
  box-shadow: inset 0 0 0 1px var(--m-edge), 0 1px 3px rgba(0,0,0,.15);
  font-family: var(--font-mono); font-size: .64rem; font-weight: 600; letter-spacing: .02em;
}
.log-main { min-width: 0; }
.log-name { font-weight: 600; overflow-wrap: anywhere; line-height: 1.45; }
.log-meta { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.log-meta.err { color: var(--err); }
.log-item button {
  font: inherit; font-size: .85rem; font-weight: 600; border-radius: 8px; padding: 6px 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.log-item button:hover { border-color: var(--accent); color: var(--accent); }
.log-empty { color: var(--muted); font-size: .9rem; padding: 14px 0; margin: 0; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

