/* AI tool catalog (/resources/ai-tools/). Builds on site.css tokens.
   Red is reserved for Prohibited; gold carries everything else. */

.ai-hero { padding-bottom: clamp(48px, 6vw, 88px); }
.ai-hero h1 { max-width: 16ch; font-size: clamp(2.2rem, 4.6vw, 4rem); }
.kicker { font-family: var(--head); font-weight: 600; font-size: 0.86rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-2); margin: 0 0 18px; }

/* Meter: three ticks, filled from the left */
.meter { display: inline-flex; gap: 3px; vertical-align: middle; }
.meter i { width: 14px; height: 4px; border-radius: 1px; background: var(--pane-edge); }
.meter i.on { background: var(--gold); }

/* Ceiling scale under the hero: one line, four stops */
.scale { list-style: none; margin: clamp(44px, 6vw, 72px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); box-shadow: inset 0 1px 0 var(--line); }
.scale li { padding: 22px 24px 4px 0; display: grid; gap: 8px; align-content: start; }
.scale li + li { padding-left: 24px; box-shadow: inset 1px 0 0 var(--line); }
.scale strong { font-family: var(--head); font-weight: 700; color: #fff; font-size: 1.05rem; }
.scale span:not(.meter) { color: var(--ink-2); font-size: 0.98rem; line-height: 1.45; }
.scale .s-p strong { color: #f0a3a8; }
.scale .s-p .meter i { background: color-mix(in oklab, var(--red) 55%, transparent); }

/* Layout: catalog column + sticky receipt */
.catalog-sec { padding: clamp(56px, 7vw, 104px) 0 clamp(80px, 10vw, 140px); background: var(--ground-2); position: relative; }
.catalog-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: clamp(32px, 4vw, 64px); align-items: start; }
.catalog-head { margin-bottom: 12px; }
.catalog-head p { color: var(--ink-2); max-width: 58ch; margin-top: 14px; }
.tool-index ol { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tool-index a { display: inline-block; font-family: var(--head); font-weight: 600; font-size: 0.84rem; text-decoration: none; padding: 7px 13px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--pane-edge); transition: background 160ms var(--ease), color 160ms var(--ease); }
.tool-index a:hover { background: var(--pane); color: var(--gold-2); }

/* Each tool: one object, one label schema */
.tool { padding: 34px 0 30px; box-shadow: inset 0 1px 0 var(--line); scroll-margin-top: 96px; }
.tool-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 18px; }
.tool-head h3 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); }
.vendor { font-family: var(--head); font-weight: 600; font-size: 0.86rem; color: var(--ink-3); }
.tool .clear { margin-left: auto; font: 600 0.84rem var(--head); color: var(--ink-2); background: none; border: 0; padding: 6px 2px; cursor: pointer; opacity: 0; visibility: hidden; transition: opacity 160ms var(--ease), color 160ms var(--ease), visibility 0s linear 160ms; }
.tool.picked .clear { opacity: 1; visibility: visible; transition: opacity 160ms var(--ease), color 160ms var(--ease); }
.tool .clear:hover { color: var(--gold-2); }

.tiers { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.tiers legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tier { position: relative; display: grid; gap: 10px; align-content: start; padding: 16px 16px 14px; border-radius: 12px; background: var(--pane); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255,255,255,0.05); transition: box-shadow 180ms var(--ease), background 180ms var(--ease), transform 180ms var(--ease); }
.t-name { font-family: var(--head); font-weight: 600; font-size: 0.92rem; color: #fff; line-height: 1.3; }
.t-ceil { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; }
.t-ceil b { font-family: var(--head); font-weight: 700; font-size: 0.86rem; color: var(--gold-2); }
.t-data { grid-column: 1 / -1; font-size: 0.9rem; color: var(--ink-2); line-height: 1.35; }
.t-note { font-size: 0.84rem; color: var(--ink-3); line-height: 1.35; }
.tier.c-p .t-ceil b, .tier.unsure .t-ceil b { color: #f0a3a8; }
.tier.c-p .meter i, .tier.unsure .meter i { background: color-mix(in oklab, var(--red) 45%, transparent); }
.tier.unsure { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.tier.unsure .t-name { color: var(--ink-2); }

/* Interactive state only once the script is running */
.tier input { position: absolute; opacity: 0; pointer-events: none; }
.js .tier { cursor: pointer; }
.js .tier:hover { box-shadow: inset 0 0 0 1px var(--pane-edge), inset 0 1px 0 rgba(255,255,255,0.06); }
.tier:has(input:checked) { background: color-mix(in oklab, var(--gold) 12%, transparent); box-shadow: inset 0 0 0 1.5px var(--gold); }
.tier.c-p:has(input:checked), .tier.unsure:has(input:checked) { background: color-mix(in oklab, var(--red) 14%, transparent); box-shadow: inset 0 0 0 1.5px #d4606a; }
.tier:has(input:focus-visible) { outline: 2px solid var(--gold-2); outline-offset: 3px; }
.js .tier:active { transform: scale(0.985); }
.tool.picked .tier:not(:has(input:checked)) { opacity: 0.72; }
.tool.picked .tier:not(:has(input:checked)):hover { opacity: 1; }
html:not(.js) .tool .tier { cursor: default; }

.tool-why { color: var(--ink-2); font-size: 1.02rem; max-width: 66ch; margin: 18px 0 0; }
.verified { font-family: var(--head); font-weight: 600; font-size: 0.8rem; color: var(--ink-3); margin: 10px 0 0; font-variant-numeric: tabular-nums; }

.tool.other .vendor { font-family: var(--font); font-weight: 400; font-size: 0.95rem; }
.other-check { display: inline-flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 12px; background: var(--pane); box-shadow: inset 0 0 0 1px var(--line); font-family: var(--head); font-weight: 600; font-size: 0.92rem; color: #fff; }
html:not(.js) .other-check { display: none; }
.js .other-check { cursor: pointer; }
.other-check input { width: 18px; height: 18px; accent-color: var(--gold); margin: 0; }
.other-check:has(input:checked) { box-shadow: inset 0 0 0 1.5px #d4606a; }
.other-check:has(input:focus-visible) { outline: 2px solid var(--gold-2); outline-offset: 3px; }

/* The receipt */
.receipt-col { position: sticky; top: 96px; }
html:not(.js) .receipt-col { display: none; }
.receipt { position: relative; background: var(--ground-3); border-radius: 4px; padding: 30px 26px 26px; font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25), 0 18px 40px -8px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06);
  -webkit-mask: radial-gradient(circle 5px at 50% 0, transparent 98%, #000) 0 0 / 16px 51% repeat-x, radial-gradient(circle 5px at 50% 100%, transparent 98%, #000) 0 100% / 16px 51% repeat-x;
          mask: radial-gradient(circle 5px at 50% 0, transparent 98%, #000) 0 0 / 16px 51% repeat-x, radial-gradient(circle 5px at 50% 100%, transparent 98%, #000) 0 100% / 16px 51% repeat-x; }
.rc-top { text-align: center; padding-bottom: 18px; border-bottom: 1px dashed var(--pane-edge); }
.rc-brand { font-family: var(--head); font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; font-size: 0.78rem; color: var(--gold); margin: 0 0 6px; }
.receipt h2 { font-size: 1.35rem; max-width: none; }
.rc-meta { font-family: var(--head); font-weight: 600; font-size: 0.76rem; color: var(--ink-3); margin: 8px 0 0; }
.rc-empty { color: var(--ink-3); font-size: 0.95rem; margin: 20px 0 4px; text-align: center; }
.rc-lines { list-style: none; margin: 0; padding: 6px 0 0; }
@media (min-width: 1001px) { .rc-lines { max-height: clamp(150px, calc(100vh - 600px), 440px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--pane-edge) transparent; } }
.rc-line { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px dotted var(--pane-edge); }
.rc-tool { font-family: var(--head); font-weight: 700; font-size: 0.92rem; color: #fff; display: grid; gap: 2px; }
.rc-tier, .rc-note { font-family: var(--font); font-weight: 400; font-size: 0.86rem; color: var(--ink-2); }
.rc-note { color: var(--ink-3); }
.rc-ceil { font-family: var(--head); font-weight: 700; font-size: 0.8rem; text-align: right; color: var(--gold-2); }
.rc-line.c-p .rc-ceil { color: #f0a3a8; }
.rc-line.fresh { animation: rc-print 420ms var(--ease) both; }
@keyframes rc-print { from { opacity: 0; transform: translateY(-10px); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); } }

.rc-total { padding-top: 18px; }
.rc-total dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; text-align: center; }
.rc-total dt { font-family: var(--head); font-weight: 600; font-size: 0.72rem; color: var(--ink-3); letter-spacing: 0.04em; }
.rc-total dd { margin: 4px 0 0; font-family: var(--head); font-weight: 700; font-size: 1.7rem; color: #fff; line-height: 1; }
.stamp { margin: 20px auto 0; width: fit-content; max-width: 100%; text-align: center; padding: 10px 16px; border: 2px solid currentColor; border-radius: 6px; font-family: var(--head); font-weight: 700; font-size: 0.86rem; line-height: 1.25; text-transform: uppercase; letter-spacing: 0.03em; transform: rotate(-2.5deg); }
.stamp.s-p { color: #f0a3a8; }
.stamp.s-i { color: var(--gold-2); }
.stamp.s-c { color: #b9d7a8; }
.stamp.hit { animation: stamp 460ms var(--ease) both; }
@keyframes stamp { 0% { opacity: 0; transform: rotate(-2.5deg) scale(1.18); } 60% { opacity: 1; transform: rotate(-2.5deg) scale(0.97); } 100% { opacity: 1; transform: rotate(-2.5deg) scale(1); } }
.rc-sub { text-align: center; color: var(--ink-2); font-size: 0.92rem; margin: 14px 0 0; }
.rc-foot { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--pane-edge); }
.rc-foot p { color: var(--ink-2); font-size: 0.92rem; line-height: 1.5; }
.rc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 16px; }
.rc-print { background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); }
.rc-print:focus-visible, .tool .clear:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 4px; }

/* Phone tally bar */
.tally { display: none; }
@media (max-width: 1000px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .receipt-col { position: static; max-width: 520px; }
  .tally:not([hidden]) { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; text-decoration: none;
    background: var(--ground-3);
    box-shadow: inset 0 0 0 1px var(--edge), 0 12px 30px -8px rgba(0,0,0,0.6);
    font-family: var(--head); font-weight: 600; font-size: 0.9rem; color: #fff; transition: opacity 200ms var(--ease), transform 260ms var(--ease); }
  .tally.away { opacity: 0; transform: translateY(16px); pointer-events: none; }
  .tally-go { color: var(--gold-2); white-space: nowrap; }
  .scale { grid-template-columns: 1fr 1fr; }
  .scale li:nth-child(3) { padding-left: 0; box-shadow: inset 0 1px 0 var(--line); }
  .scale li:nth-child(4) { box-shadow: inset 1px 0 0 var(--line), inset 0 1px 0 var(--line); }
}
@media (max-width: 640px) {
  .scale { grid-template-columns: 1fr; }
  .scale li, .scale li + li, .scale li:nth-child(n) { padding: 16px 0 6px; box-shadow: inset 0 1px 0 var(--line); }
  .tiers { grid-template-columns: 1fr 1fr; }
  .tier { padding: 13px 12px 12px; }
  .receipt { padding: 26px 18px 22px; }
}

/* Method: deliberately still */
.method { padding: clamp(80px, 10vw, 140px) 0; }
.method-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.method-grid p { color: var(--ink-2); max-width: 52ch; }
.method-grid h2 { margin-bottom: 20px; }
.method-list { margin: 0; }
.method-list dt { font-family: var(--head); font-weight: 700; color: #fff; padding-top: 20px; box-shadow: inset 0 1px 0 var(--line); }
.method-list dd { margin: 6px 0 22px; color: var(--ink-2); font-size: 1.02rem; max-width: 68ch; }
@media (max-width: 1000px) { .method-grid { grid-template-columns: 1fr; } }

.ai-close { padding-bottom: clamp(96px, 12vw, 160px); }
.ai-close .lede { max-width: 52ch; margin-top: 20px; }

@media (prefers-reduced-motion: reduce) {
  .rc-line.fresh { animation: rc-fade 200ms linear both; }
  .stamp.hit { animation: rc-fade 200ms linear both; }
  .tier, .tally { transition: none; }
  .js .tier:active { transform: none; }
}
@keyframes rc-fade { from { opacity: 0; } to { opacity: 1; } }

/* Print: just the receipt */
@media print {
  body.ai-tools { background: #fff; }
  body.ai-tools .site-header, body.ai-tools .page-hero, body.ai-tools .catalog, body.ai-tools .method, body.ai-tools .close, body.ai-tools .site-footer, body.ai-tools .tally, body.ai-tools .rc-actions { display: none !important; }
  body.ai-tools .catalog-sec { background: #fff; padding: 0; }
  body.ai-tools .catalog-layout { display: block; }
  body.ai-tools .receipt-col { position: static; }
  body.ai-tools .receipt { -webkit-mask: none; mask: none; box-shadow: none; background: #fff; color: #111; border: 1px solid #999; max-width: 420px; margin: 0 auto; }
  body.ai-tools .receipt * { color: #111 !important; border-color: #999 !important; }
  body.ai-tools .rc-line.fresh, body.ai-tools .stamp.hit { animation: none; }
}
@media print { body.ai-tools .rc-foot::after { content: "valor-ops.com/resources/ai-tools"; display: block; margin-top: 14px; text-align: center; font: 600 0.8rem var(--head); } }
