/* Atomic Labs free tools. Prefix "at-" for everything new; reuses the site tokens from site.css. Mobile first. */
.at-hero { padding: 64px 0 28px; }
.at-hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
.at-sec { padding: 28px 0; }
.at-panel { padding: 20px; }
.at-panel:hover { transform: none; }
.at-panel h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); margin-bottom: .35em; }
.at-panel > p:first-of-type { margin-bottom: 14px; }
.at-stack { display: grid; gap: 22px; }
.at-two { display: grid; gap: 22px; }
.at-two > *, .at-stack > * { min-width: 0; } /* grid children may shrink below their content (no sideways scroll) */
.at-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.at-label { font: 700 .72rem/1 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.at-fine { font-size: .86rem; color: var(--dim); margin: 10px 0 0; }

/* inputs */
.at-num { width: 8.5em; min-width: 0; flex: none; font: 600 1.6rem/1 var(--display); padding: 10px 16px; text-align: center; color: var(--lime); }
.at-num.sm { width: 7em; font-size: 1.1rem; }
.at-txt { width: 9em; min-width: 0; flex: none; }
.at-sel { background: var(--bg); border: 1px solid var(--line2); color: var(--text); border-radius: 999px; padding: 10px 14px; font: inherit; }
.at-sel:focus { border-color: var(--lime); outline: none; }
.at-bpm { display: grid; gap: 14px; }
.at-bpm .at-row { gap: 8px; }
.at-step { width: 44px; height: 44px; justify-content: center; padding: 0; }

/* the custom slider: lime -> cyan -> violet rail, glowing thumb */
.at-range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; }
.at-range::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: var(--grad); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.at-range::-moz-range-track { height: 6px; border-radius: 6px; background: var(--grad); }
.at-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: #e9ffc2; border: 3px solid var(--lime); box-shadow: 0 0 16px rgba(184,240,60,.6); }
.at-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #e9ffc2; border: 3px solid var(--lime); box-shadow: 0 0 16px rgba(184,240,60,.6); }

.at-tap { min-width: 9.5em; justify-content: center; }
.at-tap.at-hit { animation: at-hit .25s ease-out; }
@keyframes at-hit { from { box-shadow: 0 0 0 0 rgba(184,240,60,.7); } to { box-shadow: 0 0 0 14px rgba(184,240,60,0); } }

/* tables */
.at-tblbox { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; border: 1px solid var(--line); }
.at-tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.at-tbl th, .at-tbl td { padding: 6px; text-align: left; border-bottom: 1px solid var(--line); }
.at-tbl thead th { font: 700 .7rem/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: var(--panel2); padding: 10px 6px; }
.at-tbl tbody th { font: 700 1rem var(--display); color: var(--text); white-space: nowrap; }
.at-tbl tr:last-child > * { border-bottom: 0; }
.at-cell { display: grid; width: 100%; text-align: left; gap: 2px; background: rgba(18,20,23,.55); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 8px 10px; transition: border-color .2s, box-shadow .2s, background .2s; }
.at-cell b { font: 600 1.05rem/1.1 var(--display); }
.at-cell b::after { content: " ms"; font: 500 .72rem var(--font); color: var(--muted); }
.at-cell small { font-size: .72rem; color: var(--dim); }
.at-cell:hover { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(184,240,60,.12); }
.at-cell.sel { border-color: var(--violet); background: linear-gradient(135deg, rgba(184,240,60,.12), rgba(160,124,245,.16)); }
.at-cell.sel b { color: var(--lime); }
.at-rev td { white-space: nowrap; }
.at-rev td:nth-child(2) { color: var(--lime); font-weight: 600; }

/* big readouts */
.at-out { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0 0; }
.at-out div { background: rgba(18,20,23,.55); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.at-out dt { font: 700 .66rem/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.at-out dd { margin: 0; font: 600 1.15rem/1.2 var(--display); overflow-wrap: anywhere; }
.at-out .at-big dd { font-size: 2rem; color: var(--lime); text-shadow: 0 0 22px rgba(184,240,60,.35); }
.at-result { font: 600 1.25rem/1.3 var(--display); color: var(--lime); margin: 14px 0 0; min-height: 1.3em; }

/* cents meter: green at the centre, violet at the edges */
.at-meter { position: relative; height: 30px; margin: 18px 4px 4px; border-radius: 999px; background: linear-gradient(90deg, var(--violet), var(--cyan) 35%, var(--lime) 50%, var(--cyan) 65%, var(--violet)); opacity: .9; }
.at-meter::before { content: ""; position: absolute; inset: 3px; border-radius: inherit; background: rgba(18,20,23,.82); }
.at-meter span { position: absolute; top: 100%; font-size: .7rem; color: var(--dim); transform: translateX(-50%); margin-top: 2px; }
.at-needle { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; border-radius: 4px; background: #f2f6f9; box-shadow: 0 0 12px rgba(255,255,255,.6); transition: left .25s cubic-bezier(.2,.7,.2,1), background .2s; }
.at-needle.in { background: var(--lime); box-shadow: 0 0 16px rgba(184,240,60,.9); }

/* segmented choices (A/B/C, tuning, wave) */
.at-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.at-seg button { border: 1px solid transparent; background: transparent; color: var(--muted); padding: 8px 12px; border-radius: 10px; font-weight: 600; min-height: 40px; }
.at-seg button b { color: var(--text); font-family: var(--display); margin-right: 6px; }
.at-seg button.on { background: var(--lime); color: #11150a; box-shadow: 0 0 18px rgba(184,240,60,.35); }
.at-seg button.on b { color: #11150a; }

/* the 16-step light row */
.at-steps { display: grid; grid-template-columns: repeat(16, 1fr); gap: 4px; margin: 16px 0; }
.at-steps i { display: block; height: 22px; border-radius: 5px; background: rgba(255,255,255,.05); border: 1px solid var(--line); transition: background .08s, box-shadow .08s; }
.at-steps i:nth-child(4n+1) { border-color: var(--line2); }
.at-steps i.on { background: linear-gradient(180deg, var(--lime), #7fc02a); border-color: transparent; }
.at-steps i.now { box-shadow: 0 0 0 2px var(--violet), 0 0 14px rgba(160,124,245,.8); }
.at-play.on { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(160,124,245,.2); }
.at-check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; }
.at-check input { width: 18px; height: 18px; accent-color: var(--lime); }
.at-hearbtns .btn.on { border-color: var(--lime); color: var(--lime); }

/* the note table */
.at-tblbox.at-tall { max-height: 460px; overflow: auto; }
.at-tall thead th { position: sticky; top: 0; z-index: 1; }
#at-notes tbody tr { cursor: pointer; }
#at-notes tbody tr:hover { background: rgba(184,240,60,.06); }
#at-notes tbody tr.hit { background: linear-gradient(90deg, rgba(184,240,60,.18), rgba(160,124,245,.14)); }
#at-notes td, #at-notes th { white-space: nowrap; }
.at-search { max-width: 420px; margin: 0 0 14px; }

/* internal links */
.at-links { display: grid; gap: 16px; }
.at-links .card h3 { margin-bottom: 6px; }
.at-soon { opacity: .82; }

@media (min-width: 700px) {
  .at-panel { padding: 28px; }
  .at-two { grid-template-columns: 1fr 1fr; align-items: start; }
  .at-out { grid-template-columns: repeat(3, 1fr); }
  .at-tbl th, .at-tbl td { padding: 8px 12px; }
  .at-cell { padding: 10px 14px; }
  .at-cell b { font-size: 1.2rem; }
  .at-links { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1080px) {
  /* the tool column; the right-hand space is where an ad would sit later, beside the tool, never over it */
  .at-wide { grid-template-columns: 1.35fr 1fr; }
}
@media (max-width: 420px) {
  .at-tbl th, .at-tbl td { padding: 5px 3px; }
  .at-cell { padding: 6px 6px; border-radius: 8px; }
  .at-cell b { font-size: .95rem; }
  .at-cell b::after { content: ""; }
  .at-cell small { font-size: .66rem; }
  .at-num { font-size: 1.3rem; width: 6.6em; }
  .at-steps { gap: 2px; }
  #at-notes { font-size: .8rem; }
  #at-notes th, #at-notes td { padding: 6px 4px; }
}

/* Words-to-Synth page: the app (ui.js) mounts into .w2s-mount; the reserved height stops the page below from jumping (CLS 0) */
.w2s-mount { min-height: 3600px; }
@media (min-width: 700px) { .w2s-mount { min-height: 2400px; } }
@media (min-width: 1080px) { .w2s-mount { min-height: 1300px; } }
.w2s-map td:last-child { white-space: normal; text-align: left; min-width: 14em; }
.w2s-map td:nth-child(2) { color: var(--dim); white-space: normal; }
.at-ideas { padding-left: 1.1em; display: grid; gap: 6px; }
