/* Free tools — shared UI. Sits on top of /marketing/styles.css tokens. */
.tool-page { --tb-r: 18px; }
.tp-main { max-width: 1120px; margin: 0 auto; padding: 18px 18px 60px; }
.tp-crumbs { font-size: .82rem; color: var(--muted-2); margin: 6px 0 14px; }
.tp-crumbs a { color: var(--muted); }
.tp-hero { max-width: 760px; margin: 0 0 22px; }
.tp-eyebrow { display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.tp-hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.06; margin-bottom: 10px; }
.tp-lede { color: var(--muted); font-size: 1.06rem; max-width: 62ch; }
.tp-tool-area { margin-bottom: 48px; }
.tp-article { max-width: 760px; margin: 0 auto 40px; color: var(--text); }
.tp-article h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 34px 0 12px; }
.tp-article h3 { font-size: 1.15rem; margin: 22px 0 8px; }
.tp-article p, .tp-article li { color: var(--text); font-size: 1.02rem; line-height: 1.72; }
.tp-article p { margin: 0 0 14px; }
.tp-article ul, .tp-article ol { margin: 0 0 16px 22px; }
.tp-article li { margin-bottom: 6px; }
.tp-article a { text-decoration: underline; text-decoration-color: rgba(230,171,67,.4); text-underline-offset: 3px; }
.tp-article table { width: 100%; border-collapse: collapse; margin: 10px 0 18px; font-size: .95rem; }
.tp-article th, .tp-article td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.tp-article th { color: var(--cream); }
.tp-faq { max-width: 760px; margin: 0 auto 46px; }
.tp-faq h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 12px; }
.tp-faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.tp-faq details:last-child { border-bottom: 1px solid var(--line); }
.tp-faq summary { cursor: pointer; font-weight: 700; color: var(--cream); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.tp-faq summary::after { content: '+'; color: var(--gold); font-weight: 800; }
.tp-faq details[open] summary::after { content: '−'; }
.tp-faq p { color: var(--muted); margin-top: 8px; }
.tp-related { max-width: 1120px; margin: 0 auto; }
.tp-related h2 { font-size: 1.35rem; margin: 26px 0 14px; }
.tp-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tp-tool { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 16px; background: linear-gradient(180deg, var(--card), var(--card-2)); border: 1px solid var(--line); color: var(--text); transition: border-color .2s, transform .2s; }
.tp-tool:hover { border-color: rgba(230,171,67,.5); transform: translateY(-2px); color: var(--text); }
.tp-tool strong { color: var(--cream); font-size: 1rem; }
.tp-tool span:last-child { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.tp-ic { font-size: 1.4rem; }
.tp-tools.big .tp-tool { padding: 22px; }
.tp-guides { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; }
.tp-guides a { color: var(--gold-2); }

/* cards + forms */
.tb-card { background: linear-gradient(180deg, var(--card), var(--card-2)); border: 1px solid var(--line); border-radius: var(--tb-r); padding: 18px; }
.tb-form { max-width: 620px; }
.tb-seg { display: flex; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 12px; gap: 4px; }
.tb-seg button { flex: 1; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; padding: 10px 6px; border-radius: 999px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .95rem; }
.tb-seg button.on { background: linear-gradient(180deg, var(--gold-2), var(--gold-deep)); color: #241704; }
.tb-seg img { width: 18px; height: 18px; border-radius: 4px; }
.tb-seg.small button { padding: 8px 6px; font-size: .85rem; }
.tb-row { display: flex; gap: 10px; }
.tb-row input, .tool-root select, .tool-root textarea, .an-fen { flex: 1; min-width: 0; font: inherit; font-size: 1.02rem; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: #0f0e0b; color: var(--cream); outline: none; }
.tb-row input:focus, .tool-root textarea:focus, .an-fen:focus { border-color: rgba(230,171,67,.6); }
.tb-row .btn { padding: 14px 24px; white-space: nowrap; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.sm { padding: 9px 14px; font-size: .88rem; }
.tb-hint { color: var(--muted-2); font-size: .84rem; margin-top: 10px; }
.tb-err { margin-top: 12px; background: rgba(224,106,92,.12); border: 1px solid rgba(224,106,92,.4); color: #f3b3aa; border-radius: 12px; padding: 11px 14px; font-size: .94rem; }
.tb-loading { color: var(--muted); padding: 30px 0; text-align: center; }
.tb-progress { text-align: center; padding: 30px 10px; max-width: 520px; margin: 0 auto; }
.tb-progress p { color: var(--muted); min-height: 1.5em; }
.tb-spin { width: 42px; height: 42px; border-radius: 50%; border: 4px solid rgba(230,171,67,.2); border-top-color: var(--gold); margin: 0 auto 16px; animation: tbsp 1s linear infinite; }
@keyframes tbsp { to { transform: rotate(360deg); } }
.tb-bar { height: 6px; background: rgba(255,255,255,.07); border-radius: 99px; margin-top: 12px; overflow: hidden; }
.tb-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold-2)); transition: width .3s; }

/* board + eval */
.tb-board { width: 100%; aspect-ratio: 1; touch-action: none; }
.tb-evalbar { position: relative; background: #2a2723; border-radius: 6px; overflow: hidden; flex: 0 0 auto; }
.tb-evalbar.v { width: 22px; align-self: stretch; display: flex; flex-direction: column-reverse; }
.tb-evalbar.v.flip { flex-direction: column; }
.tb-eval-white { background: #f3efe6; transition: height .35s ease, width .35s ease; }
.tb-evalbar.h { height: 14px; width: 100%; display: flex; }
.tb-eval-label { position: absolute; left: 0; right: 0; text-align: center; font-size: 10px; font-weight: 800; }
.tb-evalbar.v .tb-eval-label.on-white { bottom: 4px; color: #2a2723; }
.tb-evalbar.v .tb-eval-label.on-black { top: 4px; color: #f3efe6; }
.tb-evalbar.v.flip .tb-eval-label.on-white { top: 4px; bottom: auto; }
.tb-evalbar.v.flip .tb-eval-label.on-black { bottom: 4px; top: auto; }

/* CTA + sticky bar */
.tb-cta { text-align: center; margin-top: 18px; padding: 24px 18px; border-radius: var(--tb-r); background: radial-gradient(520px 240px at 50% 0%, rgba(230,171,67,.2), transparent 70%), var(--card); border: 1px solid rgba(230,171,67,.35); }
.tb-cta-icon { width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 12px; }
.tb-cta h3 { font-size: 1.3rem; margin-bottom: 8px; }
.tb-cta p { color: var(--muted); margin: 0 auto 16px; max-width: 52ch; font-size: .97rem; }
.tb-cta-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tb-cta-btns .btn { padding: 13px 22px; }
.tb-cta-brand { font-size: .78rem !important; color: var(--muted-2) !important; margin: 12px 0 0 !important; }
.tool-sticky { display: none; }
@media (max-width: 820px) {
  .tool-sticky { display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 18px; background: rgba(27,23,18,.96); border: 1px solid rgba(230,171,67,.45); box-shadow: 0 18px 50px -10px rgba(0,0,0,.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transform: translateY(140%); transition: transform .45s cubic-bezier(.2,.8,.2,1); }
  .tool-sticky.on { transform: none; }
  .tool-sticky img { width: 40px; height: 40px; border-radius: 10px; }
  .ts-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
  .ts-text strong { font-size: .82rem; color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ts-text span { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ts-btn { background: linear-gradient(180deg, var(--gold-2), var(--gold-deep)); color: #241704 !important; font-weight: 800; font-size: .86rem; padding: 10px 14px; border-radius: 999px; white-space: nowrap; }
  .ts-x { background: none; border: 0; color: var(--muted); font-size: 1.4rem; line-height: 1; padding: 4px 6px; cursor: pointer; }
  body.has-sticky { padding-bottom: 90px; }
}

/* share */
.tb-share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.tb-share .btn { padding: 11px 16px; font-size: .9rem; }
.tb-share-msg { color: var(--green); font-size: .88rem; }

/* generic result bits */
.tb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.tb-stat { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.tb-stat b { display: block; font-size: 1.7rem; color: var(--gold-2); line-height: 1.1; letter-spacing: -.02em; }
.tb-stat span { color: var(--muted); font-size: .85rem; }
.tb-h { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 22px 0 10px; font-weight: 800; }
.tb-result { scroll-margin-top: 80px; }
.tb-pattern { border: 1px solid rgba(230,171,67,.4); background: rgba(230,171,67,.07); border-radius: 16px; padding: 18px; }
.tb-pattern strong { display: block; color: var(--cream); font-size: 1.12rem; margin-bottom: 6px; line-height: 1.35; }
.tb-pattern p { color: var(--muted); margin: 0; }
.tb-blur { position: relative; margin-top: 16px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.tb-blur-inner { filter: blur(6px); user-select: none; pointer-events: none; padding: 18px; color: var(--muted); }
.tb-blur-lock { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px; background: rgba(13,12,10,.35); }
.tb-blur-lock span { background: rgba(13,12,10,.9); border: 1px solid rgba(230,171,67,.5); border-radius: 999px; padding: 10px 16px; font-weight: 700; color: var(--gold-2); font-size: .92rem; }
.tb-list { display: flex; flex-direction: column; gap: 6px; }
.tb-game { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--text); font: inherit; cursor: pointer; }
.tb-game:hover { border-color: rgba(230,171,67,.5); }
.tb-game .res { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.res.win { background: rgba(110,195,110,.16); color: var(--green); } .res.loss { background: rgba(224,106,92,.16); color: var(--red); } .res.draw { background: rgba(255,255,255,.08); color: var(--muted); }
.tb-game .who { min-width: 0; }
.tb-game .who strong { color: var(--cream); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-game .who span, .tb-game .meta { color: var(--muted); font-size: .82rem; }

/* analysis board */
.an-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.an-boardrow { display: flex; gap: 8px; }
.an-board-col { position: relative; flex: 1; min-width: 0; }
.an-main { max-width: 640px; width: 100%; }
.an-nav { display: flex; gap: 6px; margin-top: 10px; }
.an-nav button { flex: 1; background: var(--card); border: 1px solid var(--line); color: var(--cream); border-radius: 10px; padding: 10px 0; font-size: 1rem; cursor: pointer; }
.an-nav button:disabled { opacity: .35; cursor: default; }
.an-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.an-engine { padding: 14px; }
.an-engine-head { display: flex; align-items: center; gap: 10px; }
.an-engine-head select { flex: 0 0 auto; padding: 6px 8px; font-size: .85rem; border-radius: 8px; }
.an-depth { color: var(--muted-2); font-size: .82rem; margin-right: auto; }
.an-switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--cream); font-size: .92rem; cursor: pointer; }
.an-switch input { display: none; }
.an-switch span { width: 34px; height: 20px; border-radius: 99px; background: #3a352d; position: relative; transition: background .2s; }
.an-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
.an-switch input:checked + span { background: var(--gold-deep); }
.an-switch input:checked + span::after { transform: translateX(14px); }
.an-status { color: var(--muted); font-size: .85rem; margin: 8px 0 6px; }
.an-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.an-line { display: flex; gap: 10px; align-items: baseline; padding: 7px 8px; border-radius: 9px; cursor: pointer; font-size: .9rem; line-height: 1.45; }
.an-line:hover { background: rgba(255,255,255,.05); }
.an-line.ghost { color: var(--muted-2); cursor: default; }
.an-score { flex: 0 0 52px; text-align: center; font-weight: 800; border-radius: 6px; padding: 1px 0; font-size: .82rem; }
.an-score.w { background: #f3efe6; color: #1c1b18; } .an-score.b { background: #2c2925; color: #f3efe6; border: 1px solid #3c372f; }
.an-pv { color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.an-moves { max-height: 260px; overflow-y: auto; padding: 12px; }
.an-movegrid { display: flex; flex-wrap: wrap; gap: 2px 4px; font-size: .92rem; }
.an-mv-wrap { display: inline-flex; align-items: center; }
.an-num { color: var(--muted-2); margin: 0 3px 0 6px; font-size: .82rem; }
.an-mv { background: none; border: 0; color: var(--cream); font: inherit; padding: 3px 6px; border-radius: 6px; cursor: pointer; }
.an-mv:hover { background: rgba(255,255,255,.07); }
.an-mv.on { background: rgba(230,171,67,.25); color: var(--gold-2); font-weight: 700; }
.an-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.an-headers { font-size: .85rem; color: var(--muted); }
.an-pgn label { display: block; font-weight: 700; color: var(--cream); margin-bottom: 8px; font-size: .92rem; }
.an-pgn textarea { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; resize: vertical; }
.an-editor-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.an-promo { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; background: rgba(13,12,10,.7); z-index: 5; border-radius: 6px; }
.an-promo button { width: 22%; aspect-ratio: 1; background: var(--card); border: 1px solid rgba(230,171,67,.5); border-radius: 12px; cursor: pointer; padding: 6px; }
.an-promo button svg { width: 100%; height: 100%; }
.an-promo .an-promo-x { width: auto; aspect-ratio: auto; position: absolute; top: 8px; right: 8px; color: var(--cream); font-size: 1.4rem; padding: 2px 10px; }
.an-editor { max-width: 640px; }
.an-palette { display: grid; grid-template-columns: repeat(13, 1fr); gap: 4px; margin-bottom: 10px; }
.an-palette button { aspect-ratio: 1; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 2px; cursor: pointer; display: grid; place-items: center; font-size: 1.1rem; }
.an-palette button svg { width: 100%; height: 100%; }
.an-palette button.on { border-color: var(--gold); background: rgba(230,171,67,.2); }
.an-editor-opts { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.an-castle { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .9rem; color: var(--text); }
.an-castle label { display: inline-flex; gap: 6px; align-items: center; }
.an-castle label.dis { opacity: .4; }
.an-fen-label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: .85rem; color: var(--muted); }
.an-fen { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; padding: 10px 12px; }
@media (max-width: 900px) {
  .an-wrap { grid-template-columns: 1fr; }
  .an-main { max-width: none; }
  .an-palette { grid-template-columns: repeat(7, 1fr); }
}
@media (max-width: 560px) {
  .tp-main { padding: 10px 12px 50px; }
  .tb-row { flex-direction: column; }
  .tb-row .btn { width: 100%; }
  .tb-card { padding: 14px; }
  .tb-evalbar.v { width: 14px; }
  .tb-evalbar.v .tb-eval-label { font-size: 8px; }
}

/* rating level pages */
.lv-card { margin-bottom: 18px; }
.lv-head { display: flex; gap: 18px; align-items: center; }
.lv-big { font-size: 3.4rem; font-weight: 900; color: var(--gold-2); letter-spacing: -.03em; line-height: 1; }
.lv-verdict { font-weight: 800; color: var(--cream); font-size: 1.15rem; }
.lv-sub { color: var(--muted); font-size: .95rem; }
.lv-meter { height: 10px; border-radius: 99px; background: rgba(255,255,255,.07); margin: 16px 0; overflow: hidden; }
.lv-meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold-2)); }
.lv-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.lv-table th, .lv-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); }
.lv-table thead th { color: var(--muted-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.lv-table tbody th { color: var(--cream); font-weight: 600; }

/* converter */
.cv { max-width: 760px; }
.cv-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.cv-l { display: flex; flex-direction: column; gap: 6px; font-weight: 700; color: var(--muted); font-size: .85rem; flex: 1; min-width: 160px; }
.cv-l input { font: inherit; font-size: 1.4rem; font-weight: 800; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: #0f0e0b; color: var(--cream); width: 100%; }
.cv-l select { font-size: 1rem; padding: 15px 12px; }
.cv-out { margin-top: 14px; }
.cv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.cv-more summary { cursor: pointer; color: var(--gold-2); margin-top: 14px; font-weight: 700; font-size: .9rem; }
.tool-rating-level .tool-root { margin-top: 6px; }

/* review */
.rv-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--muted); font-size: .92rem; flex-wrap: wrap; }
.rv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.rv-grid > div:first-child { max-width: 620px; width: 100%; }
.rv-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rv-acc { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: center; margin-bottom: 8px; }
.rv-acc > div { display: flex; flex-direction: column; color: var(--muted); font-size: .85rem; }
.rv-acc-n { font-size: 2.3rem; font-weight: 900; color: var(--gold-2); letter-spacing: -.03em; line-height: 1.05; }
.rv-acc-n.opp { color: var(--cream); }
.rv-counts { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rv-counts th { text-align: left; font-weight: 600; color: var(--text); padding: 4px 6px; }
.rv-counts td.c { width: 40px; text-align: center; font-weight: 800; color: var(--cream); }
.rv-counts td.opp { color: var(--muted); }
.rv-counts .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.rv-graph { width: 100%; height: 110px; border-radius: 12px; cursor: pointer; display: block; }
.rv-movenote { margin-top: 10px; font-size: .95rem; color: var(--muted); }
.rv-key button { display: block; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); color: var(--text); font: inherit; font-size: .9rem; padding: 8px 0; cursor: pointer; }
.rv-movelist { max-height: 200px; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 2px; font-size: .9rem; padding: 12px; }
.rv-movelist sup { font-weight: 800; margin-left: 1px; }
.rv-pattern { max-width: 760px; margin-top: 26px; }
.rv-ex { margin-top: 8px !important; font-size: .88rem; }
@media (max-width: 900px) { .rv-grid { grid-template-columns: 1fr; } .rv-grid > div:first-child { max-width: none; } }

/* tilt */
.tl-head { margin-bottom: 14px; }
.tl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tl-grid .tb-h { margin-top: 0; }
.tl-bars { display: flex; gap: 6px; align-items: flex-end; height: 190px; }
.tl-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; }
.tl-col { flex: 1; width: 100%; max-width: 46px; background: rgba(255,255,255,.04); border-radius: 8px; display: flex; align-items: flex-end; overflow: hidden; }
.tl-col span { display: block; width: 100%; background: linear-gradient(180deg, #8f8676, #5d564a); border-radius: 8px 8px 0 0; transition: height .6s cubic-bezier(.2,.8,.2,1); }
.tl-bar.best .tl-col span { background: linear-gradient(180deg, #8fd88f, #4e9a4e); }
.tl-bar.worst .tl-col span { background: linear-gradient(180deg, #f08a7e, #b4483c); }
.tl-bar b { font-size: .82rem; color: var(--cream); }
.tl-bar em { font-style: normal; font-size: .72rem; color: var(--muted); text-align: center; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tl-bar small { font-size: .66rem; color: var(--muted-2); }
.tl-bar.thin b { color: var(--muted-2); }
@media (max-width: 760px) { .tl-grid { grid-template-columns: 1fr; } .tl-bar em { font-size: .64rem; } }

/* report */
.rp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.rp-radar { width: 100%; max-width: 420px; display: block; margin: 0 auto; overflow: visible; }
.rp-weak { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.rp-n { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(224,106,92,.15); color: var(--red); font-weight: 900; }
.rp-weak strong, .rp-strong strong { color: var(--cream); display: block; }
.rp-weak em { font-style: normal; color: var(--gold-2); font-size: .85rem; margin-left: 6px; }
.rp-weak p, .rp-strong p { color: var(--muted); margin: 3px 0 0; font-size: .93rem; }
.rp-strong { padding: 12px 14px; border-radius: 12px; background: rgba(110,195,110,.08); border: 1px solid rgba(110,195,110,.3); margin: 8px 0 12px; }
.rp-hours .tb-stat b { font-size: 1.25rem; }
@media (max-width: 820px) { .rp-grid { grid-template-columns: 1fr; } }

/* wrapped */
.wr { max-width: 560px; margin: 0 auto; }
.wr-dots { display: flex; gap: 4px; margin-bottom: 10px; }
.wr-dots span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.12); transition: background .3s; }
.wr-dots span.on { background: var(--gold); }
.wr-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 26px; }
.wr-track::-webkit-scrollbar { display: none; }
.wr-card { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 9 / 14; max-height: 78vh; padding: 34px 28px 22px; display: flex; flex-direction: column; position: relative; overflow: hidden; background: radial-gradient(420px 380px at 85% 0%, rgba(230,171,67,.35), transparent 70%), linear-gradient(180deg, #1b1712, #0d0c0a); border: 1px solid rgba(230,171,67,.3); border-radius: 26px; }
.wr-card:nth-child(3n+2) { background: radial-gradient(420px 380px at 10% 0%, rgba(230,171,67,.3), transparent 70%), linear-gradient(200deg, #221b12, #0d0c0a); }
.wr-card:nth-child(3n) { background: radial-gradient(460px 420px at 50% 100%, rgba(230,171,67,.3), transparent 70%), linear-gradient(180deg, #16130f, #0d0c0a); }
.wr-eyebrow { color: var(--gold); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; }
.wr-card h2 { font-size: clamp(1.8rem, 7vw, 2.5rem); margin: 10px 0 18px; line-height: 1.05; }
.wr-big { font-size: clamp(3.6rem, 18vw, 5.6rem); font-weight: 900; color: var(--gold-2); letter-spacing: -.04em; line-height: .95; margin: 8px 0 18px; }
.wr-big small { display: block; font-size: 1rem; letter-spacing: 0; color: var(--muted); font-weight: 600; margin-top: 8px; }
.wr-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.wr-card li { color: var(--cream); font-size: 1.08rem; line-height: 1.45; padding-left: 18px; position: relative; }
.wr-card li::before { content: ''; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.wr-type h2 { font-size: clamp(2.2rem, 9vw, 3.2rem); color: var(--gold-2); margin-top: 40%; }
.wr-roast li { font-size: 1.35rem; font-weight: 700; }
.wr-months { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin: 0 0 18px; }
.wr-months span { flex: 1; background: rgba(245,239,226,.2); border-radius: 4px 4px 0 0; min-height: 2px; }
.wr-months span.on { background: var(--gold); }
.wr-link { margin-top: 14px; font-weight: 700; }
.wr-final { display: flex; flex-direction: column; gap: 10px; margin-top: auto; margin-bottom: 18px; }
.wr-brand { margin-top: auto; padding-top: 14px; font-size: .78rem; color: var(--muted-2); border-top: 1px solid rgba(230,171,67,.2); }
.wr-final + .wr-brand { margin-top: 0; }
.wr-nav { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 4px; color: var(--muted); font-size: .9rem; }

/* roast */
.ro { max-width: 760px; }
.ro-card { position: relative; padding: 28px 24px; border-radius: 24px; background: radial-gradient(520px 300px at 90% 0%, rgba(224,106,92,.22), transparent 70%), radial-gradient(420px 260px at 0% 100%, rgba(230,171,67,.18), transparent 70%), linear-gradient(180deg, var(--card), var(--card-2)); border: 1px solid rgba(230,171,67,.35); overflow: hidden; }
.ro-fire { position: absolute; right: 18px; top: 10px; font-size: 3rem; opacity: .9; }
.ro-card h2 { font-size: clamp(1.6rem, 5vw, 2.3rem); margin: 6px 0 16px; padding-right: 50px; }
.ro-lines { margin: 0 0 16px 0; padding-left: 0; list-style: none; counter-reset: r; display: flex; flex-direction: column; gap: 12px; }
.ro-lines li { counter-increment: r; position: relative; padding-left: 40px; color: var(--cream); font-size: 1.08rem; line-height: 1.5; }
.ro-lines li::before { content: counter(r); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(224,106,92,.18); color: #f3a093; font-weight: 900; font-size: .85rem; }
.ro-verdict { color: var(--gold-2); font-weight: 700; font-size: 1.05rem; border-top: 1px solid var(--line); padding-top: 14px; }
.ro-chips { margin-top: 12px; }
.ro-chips .tb-stat b { font-size: 1.3rem; }
.tool-root > .tb-err, .tool-root > .tb-progress { max-width: 620px; }
.tool-root > .tb-progress { margin: 0; }
/* the marketing stylesheet pads every <section> for the homepage; tool pages set their own rhythm */
.tool-page main section { padding: 0; }
.tool-page .tp-faq, .tool-page .tp-related { padding-top: 8px; }
.rv-open { display: grid; place-items: center; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-size: .85rem; font-weight: 700; white-space: nowrap; }
.tl-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tl-grid > * { min-width: 0; }
@media (max-width: 760px) { .tl-grid { grid-template-columns: minmax(0, 1fr); } .tl-bars { gap: 4px; } }
@media (max-width: 820px) {
  .ts-text strong { white-space: normal; font-size: .8rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .ts-text span { display: none; }
}
.rv-pgn-toggle { background: none; border: 0; color: var(--gold-2); font: inherit; font-weight: 700; margin-top: 12px; cursor: pointer; padding: 4px 0; }
.rv-pgnbox { max-width: 620px; margin-top: 12px; }
.rv-pgnbox label[for] { display: block; font-weight: 700; color: var(--cream); margin-bottom: 8px; }
.rv-pgnbox textarea { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.rv-pgn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.rv-pgn-row .tb-seg { margin: 0; flex: 1 1 220px; }
.rv-file { position: relative; overflow: hidden; }
.rv-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rv-summary { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.rv-summary > div { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: .9rem; }
.rv-summary span { color: var(--muted); white-space: nowrap; }
.rv-summary b { color: var(--cream); }
.rv-summary button { background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; text-align: right; padding: 0; }

/* ── analysis workspace: one screen, nothing moves ─────────────────── */
.tp-crumbs.hide { display: none; }
.tp-hero.compact { margin: 4px 0 12px; }
.tp-hero.compact h1 { font-size: clamp(1.15rem, 1.9vw, 1.45rem); letter-spacing: -.01em; margin: 0; color: var(--cream); }
.tp-intro { font-size: 1.08rem; color: var(--muted); }
.tool-analysis .tp-main { padding-top: 10px; }
.tool-analysis .tp-tool-area { margin-bottom: 56px; }
.tool-analysis .an-wrap {
  --side: 360px;
  --navh: 46px;
  --board: min(calc(100svh - 172px - var(--navh)), calc(100vw - var(--side) - 96px), 720px);
  display: grid; grid-template-columns: calc(var(--board) + 30px) var(--side); gap: 18px; justify-content: center; align-items: start;
}
.tool-analysis .an-main { width: calc(var(--board) + 30px); max-width: none; }
.tool-analysis .an-board-col { width: var(--board); flex: 0 0 var(--board); }
.tool-analysis .an-nav { height: var(--navh); margin-top: 8px; }
.tool-analysis .an-nav button { padding: 0; }
.tool-analysis .an-side { height: calc(var(--board) + var(--navh) + 8px); display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.an-engine { flex: 0 0 auto; }
.an-engine-head { height: 30px; }
.an-depth { font-variant-numeric: tabular-nums; min-width: 64px; }
.an-status { height: 20px; line-height: 20px; margin: 6px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-line, .an-line.ghost { height: 44px; align-items: flex-start; overflow: hidden; box-sizing: border-box; }
.an-pv { line-height: 1.4; }
.tool-analysis .an-moves { flex: 1 1 auto; min-height: 60px; max-height: none; overflow-y: auto; }
.an-headers { flex: 0 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-actions { flex: 0 0 auto; }
.an-dl-slot { flex: 0 0 76px; }
.dl-box { height: 76px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); animation: dlin .35s ease both; }
@keyframes dlin { from { opacity: 0; } to { opacity: 1; } }
.dl-box img { width: 44px; height: 44px; border-radius: 10px; flex: 0 0 44px; }
.dl-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.dl-copy strong { color: var(--cream); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-copy span { color: var(--muted); font-size: .76rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dl-btns { display: flex; flex-direction: column; gap: 5px; }
.dl-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; background: var(--cream); color: #16130f !important; font-weight: 700; font-size: .78rem; white-space: nowrap; }
.dl-btn svg { width: 14px; height: 14px; }
.an-modal { position: fixed; inset: 0; z-index: 80; background: rgba(8,7,6,.72); display: grid; place-items: center; padding: 16px; }
.an-modal-card { width: min(560px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.an-modal-card label[for] { display: block; font-weight: 700; color: var(--cream); margin-bottom: 8px; }
.an-modal-card textarea { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
@media (max-width: 900px) {
  .tool-analysis .an-wrap { grid-template-columns: minmax(0, 1fr); --board: min(calc(100vw - 54px), 560px); }
  .tool-analysis .an-main { width: 100%; }
  .tool-analysis .an-boardrow { justify-content: center; }
  .tool-analysis .an-side { height: auto; }
  .tool-analysis .an-moves { flex: 0 0 auto; height: 96px; }
}
@media (max-width: 560px) { .tool-analysis .an-wrap { --board: calc(100vw - 42px); } }

/* ── restraint pass: plain headings, flat surfaces, no ornament ───── */
.tb-h { text-transform: none; letter-spacing: 0; font-size: 1rem; font-weight: 700; color: var(--cream); margin: 22px 0 10px; }
.tb-card, .tp-tool { background: var(--card); }
.tp-tool:hover { transform: none; border-color: rgba(245,239,226,.28); }
.tp-tool strong { font-size: 1rem; }
.tb-cta { background: var(--card); border-color: var(--line); text-align: left; display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; align-items: start; }
.tb-cta-icon { grid-row: span 4; margin: 0; }
.tb-cta p { margin: 0 0 14px; }
.tb-cta-btns { justify-content: flex-start; }
.tb-cta h3 { font-size: 1.15rem; }
.tb-pattern { background: var(--card); border-color: rgba(230,171,67,.45); border-left-width: 3px; }
.ro-card { background: var(--card); border-color: var(--line); }
.ro-kicker { display: block; color: var(--muted); font-size: .85rem; font-weight: 600; }
.ro-lines li::before { background: rgba(255,255,255,.06); color: var(--cream); }
.ro-verdict { color: var(--cream); font-weight: 600; }
.rv-acc-n { color: var(--cream); }
.wr-card, .wr-card:nth-child(3n+2), .wr-card:nth-child(3n) { background: linear-gradient(180deg, #1a1612, #0f0d0b); border-color: rgba(245,239,226,.12); }
.wr-eyebrow { letter-spacing: .02em; text-transform: none; font-size: .9rem; }
.lv-big { color: var(--cream); }
.tb-stat b { color: var(--cream); }
.btn-primary { box-shadow: none; }
.btn-primary:hover { box-shadow: none; transform: none; }
.tool-sticky { box-shadow: 0 10px 30px -12px rgba(0,0,0,.6); border-color: var(--line); }
.an-line, .an-line.ghost { height: 34px; align-items: center; }
.an-pv { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: unset; }
.an-dl-slot { flex: 0 0 112px; }
.dl-box { height: 112px; flex-direction: column; align-items: stretch; justify-content: center; gap: 10px; padding: 12px 14px; }
.dl-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dl-box img { width: 40px; height: 40px; flex: 0 0 40px; }
.dl-copy strong { font-size: .9rem; }
.dl-copy span { -webkit-line-clamp: 1; font-size: .8rem; }
.dl-btns { flex-direction: row; gap: 8px; }
.dl-btn { flex: 1; justify-content: center; padding: 8px 10px; font-size: .82rem; }

/* analysis side panel v2: the app box is the second thing you see; moves are a strip */
.tool-analysis .an-side .an-dl-slot { order: 1; flex: 0 0 168px; }
.tool-analysis .an-side .an-engine { order: 0; }
.tool-analysis .an-side .an-headers { order: 2; }
.tool-analysis .an-side .an-moves { order: 3; flex: 0 0 48px; min-height: 48px; height: 48px; overflow-x: auto; overflow-y: hidden; padding: 0 10px; display: flex; align-items: center; scrollbar-width: none; }
.tool-analysis .an-side .an-moves::-webkit-scrollbar { display: none; }
.tool-analysis .an-side .an-moves .an-movegrid { flex-wrap: nowrap; white-space: nowrap; }
.tool-analysis .an-side .an-moves .tb-hint { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-analysis .an-side .an-actions { order: 4; margin-top: auto; }
.dl-box { height: 168px; gap: 14px; padding: 16px 18px; border-color: rgba(230,171,67,.35); }
.dl-box img { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 12px; }
.dl-copy strong { font-size: 1.08rem; white-space: normal; line-height: 1.25; letter-spacing: -.01em; }
.dl-copy span { -webkit-line-clamp: 2; font-size: .84rem; margin-top: 4px; }
.dl-btn { padding: 10px 12px; font-size: .88rem; }
@media (max-width: 900px) { .tool-analysis .an-side .an-moves { height: 48px; } }
.tool-analysis .an-side .an-actions { margin-top: 0; }
@media (min-width: 901px) { .tool-analysis .an-side { height: auto; max-height: calc(var(--board) + var(--navh) + 8px); } }
@media (max-width: 900px) { .tool-analysis .an-side { height: auto; max-height: none; } .tool-analysis .an-side .an-dl-slot { flex-basis: auto; } }
