/* Chakkde Tested pages (/tested/), plus the Tested links on story and Run It Yourself pages.
   Loaded after style.css only when build.py runs with --tested. Tokens and base styles come from style.css. */

/* Links from other pages */
.riys-tested{display:inline-flex;align-items:center;min-height:44px;margin:.15rem 0 0;font:600 .875rem/1.2 var(--sans)}
.riys-table th .riys-tested{display:flex;width:max-content}
.tested-link{margin:1.25rem 0 0;padding:.7rem .9rem;background:var(--surface);border:1px solid var(--line);border-left:4px solid var(--lime);border-radius:12px}
.tested-link a{display:inline-flex;align-items:center;min-height:44px;font-weight:700}

/* Page head */
.hub-head{padding:.75rem 0 .25rem}
.tested h1{text-transform:none;font-size:clamp(2rem,8.5vw,3rem);line-height:1.04;letter-spacing:-.025em;font-weight:900;margin:0 0 .5rem}
.tested .lede{max-width:44rem}
.maker{color:var(--soft);margin:0 0 .9rem;font-size:1.0625rem}
.maker strong{color:var(--text)}
.measured-note{display:flex;gap:.6rem;align-items:flex-start;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:.7rem .85rem;margin:0;color:var(--soft);font-size:.9375rem}
.measured-note::before{content:"";flex:none;width:.6rem;height:.6rem;margin-top:.45rem;background:var(--lime);transform:rotate(45deg);border-radius:2px}

/* Hub: one section per category, a card per tool */
.order-note{color:var(--muted);font-size:.9375rem;margin:1rem 0 0}
.cat-h{font-size:1.4rem;line-height:1.2;letter-spacing:-.01em;font-weight:850;margin:0 0 .4rem}
.cat-h a{display:inline-flex;align-items:center;min-height:44px;color:var(--text);text-decoration:none}
.cat-h a::after{content:"\2192";content:"\2192"/"";color:var(--lime);margin-left:.5rem}
.cat-h a:hover{text-decoration:underline;text-decoration-color:var(--lime)}
.cat-intro{color:var(--soft);margin:0 0 1rem;max-width:44rem}
.tcards{list-style:none;padding:0;margin:0;display:grid;gap:.5rem}
.tcard{position:relative;min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:.85rem .95rem}
.tcard:hover{border-color:var(--line-2)}
.tcard-h{font-size:1.125rem;line-height:1.3;font-weight:800;margin:0}
.tcard-h a{color:var(--text);text-decoration:none}
.tcard-h a::after{content:"";position:absolute;inset:0;border-radius:12px}
.tcard-h a:focus-visible{outline:0}
.tcard-h a:focus-visible::after{outline:3px solid var(--lime);outline-offset:2px}
.tcard:hover .tcard-h a{text-decoration:underline;text-decoration-color:var(--lime)}
.tcard-maker{display:block;color:var(--muted);font-size:.875rem;margin:.1rem 0 0}
.tcard-v{color:var(--soft);margin:.45rem 0 0;font-size:.9375rem;line-height:1.45}
.tcard-d{font:600 .75rem/1.35 var(--mono);letter-spacing:.06em;text-transform:uppercase;color:var(--lime);margin:.55rem 0 0}
.tested .policy .ticks{margin:0}

/* Verdict */
.verdict{background:var(--surface);border:1px solid var(--line);border-left:4px solid var(--lime);border-radius:var(--r);padding:1rem 1.1rem;margin:1rem 0 0}
.verdict-text{font-size:1.2rem;line-height:1.4;font-weight:750;margin:0;color:var(--text)}

/* The numbers */
.stats{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:.5rem}
.stat{min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:.85rem .9rem}
.stat-wide{grid-column:1/-1}
.stat-k{font:700 .72rem/1.2 var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin:0 0 .4rem}
.stat-v{font-size:1.65rem;font-weight:850;line-height:1.1;letter-spacing:-.02em;color:var(--text);margin:0}
.stat-v.txt{font-size:1.1rem;line-height:1.3;font-weight:750;letter-spacing:-.005em}
.stat-n{margin:0;color:var(--soft);font-size:.9375rem;line-height:1.45}
.stat-n code{overflow-wrap:break-word}
.mb{display:block;margin:.35rem 0 0;font:600 .72rem/1.3 var(--mono);letter-spacing:.04em;color:var(--muted)}

/* Prose sections */
.prose p{margin:0 0 .85rem;color:var(--soft)}
.prose .sh+p{margin-top:0}
.prose p+.sh{margin-top:1.5rem}
.ticks{list-style:none;padding:0;margin:0 0 1rem;display:grid;gap:.5rem}
.ticks li{position:relative;padding-left:1.6rem;color:var(--soft)}
.ticks li::before{content:"";position:absolute;left:.15rem;top:.45rem;width:.75rem;height:.4rem;border-left:2.5px solid var(--lime);border-bottom:2.5px solid var(--lime);transform:rotate(-45deg)}

/* Plain link lists (used for, more in this category) */
.tlinks{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:.5rem}
.tlinks a{display:inline-flex;align-items:center;min-height:44px;padding:0 .9rem;border-radius:10px;border:1px solid var(--line-2);background:var(--surface-2);color:var(--text);text-decoration:none;font:600 .9375rem/1.2 var(--sans)}
.tlinks a:hover{border-color:var(--lime)}

/* Developer details */
.dev{background:var(--surface);border:1px solid var(--line);border-radius:var(--r)}
.dev>summary{display:flex;align-items:center;justify-content:space-between;gap:.75rem;min-height:52px;padding:.75rem 1.1rem;cursor:pointer;font-weight:800;font-size:1.0625rem;list-style:none}
.dev>summary::-webkit-details-marker{display:none}
.dev>summary::after{content:"+";flex:none;font:800 1.3rem/1 var(--mono);color:var(--lime)}
.dev[open]>summary::after{content:"\2212"}
.dev>summary .sub{display:block;font:600 .8rem/1.3 var(--mono);color:var(--muted);letter-spacing:.04em;margin-top:.2rem}
.dev-body{padding:0 1.1rem 1.1rem;border-top:1px solid var(--line)}
.dev-body>p{color:var(--soft);margin:1rem 0 0}
.dev-body h3{font:800 .8rem/1.2 var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin:1.25rem 0 .6rem}
.dev-body .riys-note{background:none;border:0;padding:0;margin:0}
.dev-body .riys-note p:first-child{margin-top:0}
.dev-body .riys-note code,.dl code{overflow-wrap:break-word;word-break:normal}
.log-steps{margin:0;padding-left:1.4rem;color:var(--soft);display:grid;gap:.35rem}
.log-steps li::marker{color:var(--lime);font-weight:800}
.dl{margin:1.25rem 0 0;display:grid;gap:.6rem}
.dl div{display:grid;gap:.15rem;min-width:0}
.dl dt{font:700 .75rem/1.2 var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.dl dd{margin:0;color:var(--soft);overflow-wrap:anywhere}

/* Link rows */
.go{display:flex;flex-wrap:wrap;gap:.5rem;margin:0 0 .5rem}
.go .btn{flex:1 1 12rem}

/* Quiet "not tested" */
.nt{display:inline-flex;align-items:center;padding:.2rem .55rem;border:1px dashed var(--line-2);border-radius:999px;color:var(--muted);font:600 .8125rem/1.3 var(--mono);letter-spacing:.02em}
.stat-v .nt{font-size:.8125rem;font-weight:600;letter-spacing:.02em}

/* Category comparison: cards on phones */
.cmp{width:100%;border-collapse:separate;border-spacing:0;margin:0}
.cmp caption{text-align:left;color:var(--muted);font-size:.9375rem;margin:0 0 .75rem}
.cmp thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.cmp tbody{display:grid;gap:1rem}
.cmp tr{display:grid;grid-template-columns:1fr 1fr;gap:0 .75rem;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:1.1rem}
.cmp th,.cmp td{display:block;min-width:0;text-align:left;padding:0}
.cmp th[scope=row],.cmp td.c-task,.cmp td.c-size,.cmp td.c-verdict,.cmp td.c-links{grid-column:1/-1}
.cmp td{padding:.65rem 0 0;margin:.65rem 0 0;border-top:1px solid var(--line);color:var(--soft)}
.cmp td::before{content:attr(data-label);display:block;font:700 .72rem/1.2 var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin:0 0 .35rem}
.t-name{font-size:1.3rem;line-height:1.2;font-weight:850;letter-spacing:-.01em;margin:0}
.t-name a{display:inline-flex;align-items:center;min-height:44px;color:var(--text);text-decoration:none}
.t-name a:hover{text-decoration:underline;text-decoration-color:var(--lime)}
.t-maker{display:block;color:var(--soft);font-weight:500;font-size:.9375rem;margin:0 0 .3rem}
.t-sub{display:block;font:600 .75rem/1.4 var(--mono);letter-spacing:.06em;text-transform:uppercase;color:var(--lime)}
.num{display:block;font-size:1.05rem;font-weight:800;line-height:1.3;color:var(--text)}
.v-text{display:block;font-weight:750;color:var(--text);line-height:1.4;margin:0 0 .35rem}
.v-what{display:block;color:var(--soft);font-size:.9375rem;line-height:1.5}
.cell-links{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:.4rem}
.cell-links a{display:inline-flex;align-items:center;gap:.4rem;min-height:44px;padding:0 .8rem;border-radius:10px;border:1px solid var(--line-2);background:var(--surface-2);color:var(--text);text-decoration:none;font:600 .875rem/1.2 var(--sans);white-space:nowrap}
.cell-links a:hover{border-color:var(--lime)}
.cell-links a.primary{background:var(--lime);border-color:var(--lime);color:#000}
.cell-links a.primary:hover{background:#d8ff4d}
.cell-links svg{width:1.05rem;height:1.05rem;color:var(--lime)}

@media (min-width:600px){
  .dl div{grid-template-columns:11rem 1fr;gap:1rem}
  .tcards{grid-template-columns:1fr 1fr}
}
@media (min-width:760px){
  body.tested-tool .wrap{max-width:52rem}
  body.tested-hub .wrap{max-width:60rem}
  .stats{grid-template-columns:repeat(3,1fr)}
  .stat-wide{grid-column:span 3}
  .verdict{padding:1.25rem 1.5rem}
  .verdict-text{font-size:1.35rem}
  .tcards{grid-template-columns:repeat(3,1fr)}
}

/* Desktop: real side-by-side table */
@media (min-width:960px){
  body.tested-cat .wrap{max-width:84rem}
  .cmp{border:1px solid var(--line);border-radius:var(--r);overflow:hidden;background:var(--surface);border-collapse:collapse;table-layout:fixed}
  .cmp thead{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto;white-space:normal;display:table-header-group}
  .cmp tbody{display:table-row-group}
  .cmp tr{display:table-row;background:none;border:0;border-radius:0;padding:0}
  .cmp th,.cmp td{display:table-cell;vertical-align:top;padding:1rem .85rem;margin:0;border-top:0;border-bottom:1px solid var(--line)}
  .cmp td::before{content:none}
  .cmp thead th{font:700 .72rem/1.3 var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--muted);background:var(--surface-2);vertical-align:bottom;padding:.85rem}
  .cmp tbody tr:last-child th,.cmp tbody tr:last-child td{border-bottom:0}
  .cmp tbody tr:hover{background:rgba(255,255,255,.02)}
  .cmp .h-tool{width:16%}
  .cmp .h-task{width:15%}
  .cmp .h-size{width:12%}
  .cmp .h-speed{width:11%}
  .cmp .h-mem{width:10%}
  .cmp .h-verdict{width:23%}
  .cmp .h-links{width:13%}
  .t-name{font-size:1.15rem}
  .cell-links{flex-direction:column;align-items:stretch}
  .cell-links a{justify-content:flex-start}
}
@media print{.cmp thead{position:static}.dev>summary::after{content:none}}

/* Tagline: "Chakkde is a road test for free AI." */
.tagline{margin:.1rem 0 .75rem;font-size:clamp(1.15rem,4.6vw,1.5rem);line-height:1.25;font-weight:800;letter-spacing:-.01em;color:var(--lime)}
.tagline-sm{font:700 .8rem/1.35 var(--mono);letter-spacing:.06em;text-transform:uppercase;color:var(--lime);margin:0 0 .6rem}
.tagline-end{margin:1rem 0 0;text-transform:none;letter-spacing:.02em}
.tagline-end a{display:inline-flex;align-items:center;min-height:44px;margin-left:.35rem;color:var(--text)}

/* Home: Chakkde Tested card in the hero */
.tested-promo{margin:0 0 .9rem;padding:1rem 1.1rem;background:var(--surface);border:1px solid var(--line);border-left:4px solid var(--lime);border-radius:var(--r);box-shadow:0 0 0 1px rgba(198,255,0,.06),0 0 1.75rem rgba(198,255,0,.08)}
.tp-tag{font-size:1.2rem;line-height:1.25;font-weight:850;letter-spacing:-.01em;color:var(--text);margin:0 0 .4rem}
.tp-text{color:var(--soft);font-size:.9375rem;line-height:1.5;margin:0 0 .85rem}
.tested-promo .btn{width:100%}

/* Story pages: button to the Tested page, right under the headline */
.tested-cta{margin:0 0 .9rem}
.tested-cta .btn{width:100%}

/* "How it compares": a small table that scrolls sideways on phones */
.cmp-cap{color:var(--muted);font-size:.9375rem;margin:0 0 .6rem}
.cmp-hint{font:600 .75rem/1.3 var(--mono);letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:0 0 .5rem}
.cmp-hint::after{content:" \2192";color:var(--lime)}
.cmp-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:var(--r);background:var(--surface)}
.cmp-scroll:focus-visible{outline-offset:2px;border-radius:var(--r)}
.cmp-mini{width:100%;min-width:46rem;border-collapse:separate;border-spacing:0;font-size:.9375rem;line-height:1.45}
.cmp-mini th,.cmp-mini td{text-align:left;vertical-align:top;padding:.75rem .8rem;border-bottom:1px solid var(--line);color:var(--soft)}
.cmp-mini thead th{font:700 .72rem/1.3 var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--muted);background:var(--surface-2);vertical-align:bottom}
.cmp-mini tbody tr:last-child th,.cmp-mini tbody tr:last-child td{border-bottom:0}
.cmp-mini th:first-child{position:sticky;left:0;z-index:1;width:10rem;background:var(--surface);border-right:1px solid var(--line)}
.cmp-mini thead th:first-child{background:var(--surface-2)}
.cmp-mini tbody th a{display:inline-flex;align-items:center;min-height:44px;font-weight:800;color:var(--text);text-decoration:none}
.cmp-mini tbody th a:hover{text-decoration:underline;text-decoration-color:var(--lime)}
.cmp-mini tr.is-current td{background:rgba(198,255,0,.05)}
.cmp-mini tr.is-current th:first-child{box-shadow:inset 4px 0 0 var(--lime)}
.cmp-this{display:block;width:max-content;margin:.1rem 0 0;padding:.15rem .5rem;border-radius:999px;background:var(--lime);color:#000;font:700 .7rem/1.3 var(--mono);letter-spacing:.08em;text-transform:uppercase}
.cmp-mini .nt{white-space:nowrap}
.cmp-more{margin:.75rem 0 0}
.cmp-more a{display:inline-flex;align-items:center;min-height:44px;font-weight:700}

@media (min-width:760px){
  .tested-promo .btn,.tested-cta .btn{width:auto}
  .cmp-hint{display:none}
}
/* "How it compares": fixed column widths so rows stay short on a phone (the table scrolls sideways) */
.cmp-mini{table-layout:fixed;min-width:60rem}
.cmp-mini th:nth-child(1){width:8.5rem}
.cmp-mini th:nth-child(2){width:15rem}
.cmp-mini th:nth-child(3){width:9.5rem}
.cmp-mini th:nth-child(4){width:9rem}
.cmp-mini th:nth-child(5){width:7.5rem}
.cmp-mini th:nth-child(6){width:18rem}
.cmp-mini tbody th a{overflow-wrap:anywhere}
