/* ============================================================
   Slap Post — free tools shared UI. Sits on top of /_shared.css
   (nav, footer, buttons, brand mark, texture, palette).
   ============================================================ */

.tool-main { padding: 40px 0 90px; position: relative; z-index: 2; }

.tool-head { text-align: center; max-width: 640px; margin: 0 auto 30px; }
.tool-head .label { display: inline-block; margin-bottom: 14px; }
.tool-head h1 {
  font-size: clamp(34px, 5.5vw, 56px);
  line-height: 1.02; letter-spacing: -0.03em; font-weight: 900; margin: 0 0 12px;
}
.tool-head h1 .accent { color: var(--accent); }
.tool-head p { color: var(--text-2); font-size: 16.5px; line-height: 1.55; margin: 0; }

/* Main interactive panel */
.panel {
  max-width: 680px; margin: 0 auto;
  background:
    radial-gradient(620px 240px at 50% -40px, rgba(197,247,79,0.07), transparent 60%),
    var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 28px 26px;
}
.panel.wide { max-width: 760px; }

/* Inputs */
.t-textarea, .t-input, .t-select {
  width: 100%; font-family: var(--ui); font-size: 16px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--hairline);
  border-radius: var(--r-md); padding: 14px 14px;
}
.t-textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.t-textarea:focus, .t-input:focus, .t-select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}
.t-row { display: flex; gap: 12px; flex-wrap: wrap; }
.t-row > * { flex: 1; min-width: 150px; }
.t-field { margin-bottom: 14px; }
.t-field > label {
  display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-3); margin: 0 0 7px;
}
.t-count { text-align: right; font-family: var(--mono); font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
.t-count.over { color: var(--danger); }

.t-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.t-actions .btn { flex: 1; min-width: 140px; }

/* Selectable chips (quiz answers / niches) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-family: var(--ui); font-size: 14.5px; font-weight: 600; cursor: pointer;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 10px 16px; transition: border-color .12s, background .12s, transform .06s;
  text-align: left;
}
.chip:hover { border-color: var(--text-3); }
.chip[aria-pressed="true"], .chip.sel { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip:active { transform: translateY(1px); }

/* Quiz */
.q-progress { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); letter-spacing: 0.06em; margin-bottom: 6px; }
.q-bar { height: 4px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-bottom: 22px; }
.q-bar > span { display: block; height: 100%; background: var(--accent); transition: width .25s ease; }
.q-question { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 18px; line-height: 1.25; }
.q-options { display: flex; flex-direction: column; gap: 10px; }
.q-opt {
  text-align: left; font-family: var(--ui); font-size: 15.5px; color: var(--text); cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-md);
  padding: 14px 16px; transition: border-color .12s, background .12s, transform .06s;
}
.q-opt:hover { border-color: var(--accent); background: var(--surface-3); }
.q-opt:active { transform: translateY(1px); }

/* Result block */
.result { margin-top: 8px; text-align: center; }
.result.hidden, .hidden { display: none !important; }
.result .r-emoji { font-size: 72px; line-height: 1; margin-bottom: 8px; }
.result .r-kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.result .r-title { font-size: clamp(28px, 5vw, 40px); font-weight: 900; letter-spacing: -0.02em; margin: 0 0 10px; line-height: 1.05; }
.result .r-desc { color: var(--text-2); font-size: 16px; line-height: 1.6; max-width: 520px; margin: 0 auto 14px; }
.result .r-tip {
  text-align: left; background: var(--surface-2); border: 1px solid var(--hairline-soft);
  border-left: 3px solid var(--accent); border-radius: var(--r-md); padding: 14px 16px; margin: 16px 0;
  color: var(--text-2); font-size: 14.5px; line-height: 1.55;
}
.result .r-tip strong { color: var(--text); }

/* Big score ring */
.score-ring { display: grid; place-items: center; margin: 4px auto 10px; width: 168px; height: 168px; position: relative; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .num { position: absolute; font-size: 52px; font-weight: 900; letter-spacing: -0.03em; }
.score-ring .num small { font-size: 18px; color: var(--text-3); font-weight: 700; }
.grade { font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }

/* Breakdown bars */
.bars { display: flex; flex-direction: column; gap: 12px; text-align: left; margin: 18px 0 4px; }
.bar-row .bar-top { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 6px; }
.bar-row .bar-top .lbl { color: var(--text); font-weight: 600; }
.bar-row .bar-top .val { font-family: var(--mono); color: var(--text-2); }
.bar-track { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .5s ease; }
.bar-fill.low { background: var(--danger); }
.bar-fill.mid { background: #FFC53D; }
.bar-note { font-size: 12.5px; color: var(--text-3); margin-top: 5px; }

/* Rewrites (rate my bio) */
.rewrites { text-align: left; display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.rewrite {
  background: var(--surface-2); border: 1px solid var(--hairline-soft); border-radius: var(--r-md);
  padding: 13px 15px; font-size: 15px; color: var(--text); line-height: 1.5; cursor: pointer;
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.rewrite:hover { border-color: var(--accent); }
.rewrite .copy-hint { font-family: var(--mono); font-size: 11px; color: var(--text-3); flex: none; }

/* Share row + binge loop */
.share-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 20px; }
.share-row .btn { flex: 1; min-width: 150px; }

/* Branded attribution under a result — keeps the slappost.app link on the
   card even when someone screenshots the page instead of saving it. */
.r-brand { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--text-2); margin-top: 16px; }
.r-brand .accent { color: var(--accent); }

/* Bingo */
.bingo-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 4px 0 6px; }
.bingo-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 11.5px; line-height: 1.25; font-weight: 600; cursor: pointer; padding: 7px 6px;
  background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 10px;
  color: var(--text-2); transition: background .12s, color .12s, border-color .12s, transform .06s;
  user-select: none;
}
.bingo-cell:hover { border-color: var(--text-3); }
.bingo-cell.marked { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.bingo-cell.free { background: var(--surface-3); color: var(--accent); font-family: var(--mono); }
.bingo-cell.win { animation: pop .4s ease; }
.bingo-cell:active { transform: scale(0.97); }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.06); } 100% { transform: scale(1); } }
.bingo-banner {
  text-align: center; font-size: 22px; font-weight: 900; color: var(--accent);
  margin: 8px 0 2px; letter-spacing: -0.01em;
}
@media (max-width: 520px) { .bingo-cell { font-size: 10px; padding: 4px 3px; border-radius: 8px; } }

/* Heatmap (power hours) */
.heat-wrap { overflow-x: auto; margin: 6px 0; }
.heat { border-collapse: separate; border-spacing: 5px; width: 100%; min-width: 460px; }
.heat th { font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; padding: 0 0 4px; }
.heat td.day { font-family: var(--mono); font-size: 11px; color: var(--text-2); text-align: right; padding-right: 6px; white-space: nowrap; }
.heat .cell { height: 34px; border-radius: 7px; position: relative; background: var(--surface-2); cursor: default; }
.heat .cell.best { box-shadow: 0 0 0 2px var(--accent); }
.heat .cell .pk { position: absolute; top: 2px; right: 4px; font-size: 9px; }
.legend { display: flex; align-items: center; gap: 8px; justify-content: center; font-family: var(--mono); font-size: 11px; color: var(--text-3); margin-top: 8px; }
.legend .sw { width: 16px; height: 10px; border-radius: 3px; }
.top-slots { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 16px 0 2px; }
.top-slots .slot { background: var(--surface-2); border: 1px solid var(--accent); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 600; }
.top-slots .slot .n { font-family: var(--mono); color: var(--accent); margin-right: 6px; }

/* Funnel CTA inside a tool */
.tool-cta {
  max-width: 680px; margin: 26px auto 0;
  background:
    radial-gradient(440px 200px at 85% 0%, rgba(197,247,79,0.12), transparent 60%),
    var(--surface-1);
  border: 1px solid var(--hairline); border-radius: var(--r-lg);
  padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.tool-cta .t { flex: 1; min-width: 240px; }
.tool-cta strong { display: block; font-size: 17px; font-weight: 800; letter-spacing: -0.015em; margin-bottom: 4px; }
.tool-cta p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.tool-cta .btn { flex: none; }

/* Binge loop — other tools */
.binge { max-width: 760px; margin: 44px auto 0; }
.binge .label { display: block; text-align: center; margin-bottom: 16px; }
.binge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.binge-card {
  display: flex; align-items: center; gap: 12px; background: var(--surface-1);
  border: 1px solid var(--hairline-soft); border-radius: var(--r-lg); padding: 14px 16px;
  transition: transform .12s, border-color .12s;
}
.binge-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.binge-card .ic { font-size: 26px; flex: none; }
.binge-card .nm { font-size: 14.5px; font-weight: 700; color: var(--text); }
.binge-card .ds { font-size: 12.5px; color: var(--text-3); line-height: 1.4; }

/* Tools hub grid */
.hub-count { text-align: center; font-family: var(--mono); font-size: 12.5px; color: var(--text-3); margin: 0 auto 8px; }
.hub-count b { color: var(--accent); }
.hub-cat { max-width: 940px; margin: 30px auto 4px; }
.hub-cat h2 { font-size: 14px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-2); margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.hub-cat h2::after { content: ""; flex: 1; height: 1px; background: var(--hairline-soft); }
.hub-card.locked { opacity: 0.5; cursor: default; border-style: dashed; }
.hub-card.locked:hover { transform: none; border-color: var(--hairline-soft); }
.hub-card .lock { font-family: var(--mono); font-size: 11px; color: var(--text-3); letter-spacing: 0.03em; }
.hub-card.locked .ic { filter: grayscale(1); }
.hub-card .day-pill { position: absolute; top: 12px; right: 14px; font-family: var(--mono); font-size: 10px; color: var(--text-3); background: var(--surface-2); border: 1px solid var(--hairline-soft); padding: 2px 7px; border-radius: 999px; }
.hub-card { position: relative; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; max-width: 940px; margin: 8px auto 0; }
.hub-card {
  display: flex; flex-direction: column; gap: 10px; background: var(--surface-1);
  border: 1px solid var(--hairline-soft); border-radius: var(--r-lg); padding: 22px 22px 20px;
  transition: transform .12s, border-color .12s;
}
.hub-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.hub-card .ic { font-size: 36px; }
.hub-card h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.015em; }
.hub-card p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; flex: 1; }
.hub-card .go { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.04em; }

/* ============= SEO content section (under each tool) ============= */
.seo { max-width: 680px; margin: 46px auto 0; }
.seo h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.015em; margin: 28px 0 10px; color: var(--text); }
.seo h2:first-child { margin-top: 0; }
.seo p { color: var(--text-2); font-size: 15px; line-height: 1.65; margin: 0 0 12px; }
.seo ol, .seo ul { color: var(--text-2); font-size: 15px; line-height: 1.6; padding-left: 22px; margin: 0 0 12px; }
.seo li { margin: 5px 0; }
.seo li::marker { color: var(--accent); }
.seo a { color: var(--accent); text-decoration: none; }
.seo a:hover { text-decoration: underline; }
.seo .faq { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 4px; }
.seo details {
  background: var(--surface-1); border: 1px solid var(--hairline-soft);
  border-radius: var(--r-md); padding: 0 16px;
}
.seo details[open] { border-color: var(--hairline); }
.seo summary {
  cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 15px; color: var(--text);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.seo summary::-webkit-details-marker { display: none; }
.seo summary::after { content: "+"; color: var(--accent); font-size: 20px; font-weight: 400; flex: none; }
.seo details[open] summary::after { content: "–"; }
.seo details p { padding: 0 0 14px; margin: 0; font-size: 14.5px; }
.seo-links { font-size: 14px; color: var(--text-3); margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--hairline-soft); }

/* Toast */
.tool-toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px;
  padding: 11px 20px; border-radius: 999px; z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; box-shadow: 0 12px 40px -8px rgba(0,0,0,0.6);
}
.tool-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 560px) {
  .tool-cta { flex-direction: column; align-items: flex-start; }
  .score-ring { width: 148px; height: 148px; }
}
