/* visionboards.cc — free tools (/tools/). Loaded after /site/site.css; uses its tokens. */

.tools-page .top { position: sticky; top: 0; }
.tl { max-width: 1120px; margin: 0 auto; padding: clamp(36px, 7vh, 80px) var(--gutter) 96px; }

/* breadcrumb + hero */
.tl-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font: 400 12.5px/1.5 var(--mono); color: var(--muted); }
.tl-crumbs a { color: var(--ink-2); text-decoration: none; }
.tl-crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.tl-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.tl-head { max-width: 760px; margin: 18px 0 clamp(28px, 4vw, 44px); }
.tl-eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 400 12.5px/1.4 var(--mono); color: var(--ultra); }
.tl-eyebrow::before { content: "✦"; font-family: var(--sans); }
.tl-head .display { font-size: clamp(42px, 6.2vw, 80px); line-height: 1; letter-spacing: -.02em; margin: 14px 0 20px; }
.tl-head .tl-answer { font-size: clamp(17px, 1.4vw, 19.5px); line-height: 1.6; color: var(--ink-2); max-width: 40em; }

/* the tool card */
.tl-app { background: #fbfaf6; border-radius: 20px; box-shadow: var(--shadow); padding: clamp(18px, 3vw, 36px); display: grid; gap: clamp(20px, 3vw, 40px); }
@media (min-width: 900px) { .tl-app { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } }

.tl-controls { display: grid; gap: 22px; align-content: start; min-width: 0; }
.tl-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.tl-legend, .tl-label { display: block; padding: 0; margin: 0 0 10px; font: 500 12.5px/1.3 var(--mono); color: var(--ink-2); }
.tl-hint { font: 400 13px/1.5 var(--sans); color: var(--muted); margin-top: 8px; }

/* chips + segmented options built on real radio inputs */
.tl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-chip { position: relative; }
.tl-chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.tl-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font: 500 14px/1.2 var(--sans); color: var(--ink-2); transition: background .15s, color .15s, border-color .15s; }
.tl-chip:hover span { border-color: var(--ink-2); color: var(--ink); }
.tl-chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.tl-chip input:focus-visible + span { outline: 2px solid var(--ultra); outline-offset: 3px; }

.tl-seg { display: inline-flex; flex-wrap: wrap; padding: 4px; gap: 4px; border-radius: 12px; background: var(--paper-2); }
.tl-seg .tl-chip span { border: 0; border-radius: 9px; background: transparent; min-height: 36px; padding: 7px 14px; }
.tl-seg .tl-chip input:checked + span { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(26,25,21,.12); }
.tl-seg .tl-chip span small { margin-left: 6px; font: 400 12px/1 var(--sans); color: var(--muted); }

.tl-input { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--card); font: 400 15px/1.3 var(--sans); color: var(--ink); }
.tl-input:focus { outline: 2px solid var(--ultra); outline-offset: 1px; border-color: transparent; }
.tl-input::placeholder { color: var(--muted); }

.tl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.tl-actions .btn { min-height: 44px; cursor: pointer; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--ink-2); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.tl-link { font: 600 14px/1.2 var(--sans); color: var(--ultra); text-decoration: none; padding: 12px 4px; }
.tl-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- affirmation generator ---------- */
.af-stage { position: relative; min-height: clamp(260px, 30vw, 380px); border-radius: 14px; background: var(--paper); display: grid; place-items: center; padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 52px); text-align: center; overflow: hidden; }
.af-stage::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--line); border-radius: 8px; pointer-events: none; }
.af-tag { position: absolute; top: 22px; left: 0; right: 0; font: 400 12px/1 var(--mono); color: var(--muted); }
.af-quote { margin: 0; font: 400 clamp(30px, 3.6vw, 48px)/1.12 var(--display); letter-spacing: -.015em; color: var(--ink); max-width: 15em; text-wrap: balance; }
.af-quote.empty { font: italic 300 clamp(20px, 2vw, 24px)/1.4 var(--serif); color: var(--muted); }
.af-quote.pop { animation: af-pop .45s var(--ease); }
@keyframes af-pop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.af-out { display: grid; gap: 16px; min-width: 0; }
.af-status { min-height: 1.5em; font: 400 13px/1.5 var(--mono); color: var(--ultra); }

/* ---------- printable template ---------- */
.vt-labels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.vt-labels label { position: relative; display: block; }
.vt-labels .n { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font: 400 11px/1 var(--mono); color: var(--muted); pointer-events: none; }
.vt-labels .tl-input { padding-left: 30px; }
.vt-labels label.off .tl-input { opacity: .5; }

.vt-preview { min-width: 0; display: grid; gap: 14px; justify-items: center; position: sticky; top: 84px; }
.vt-frame { width: 100%; display: grid; place-items: center; background: var(--paper-2); border-radius: 14px; padding: clamp(16px, 3vw, 32px); }
#vtPreview { width: 100%; display: grid; justify-items: center; }
.vt-frame .sheet { width: min(100%, var(--pw, 520px)); box-shadow: 0 1px 2px rgba(26,25,21,.1), 0 14px 34px rgba(26,25,21,.14); }
.vt-meta { font: 400 12.5px/1.4 var(--mono); color: var(--muted); }

/* the sheet itself: everything in cqw so the preview and the print match */
.sheet { --ink-s: #1a1915; --line-s: #b9b2a3; container-type: inline-size; position: relative; background: #fff; color: var(--ink-s); aspect-ratio: var(--ar, 8.5 / 11); overflow: hidden; }
.sheet-in { position: absolute; inset: 0; padding: 5.5cqw; display: flex; flex-direction: column; gap: 2.4cqw; }
.sheet-grid { flex: 1; min-height: 0; display: grid; gap: 2cqw; }
.sheet-title { font: 400 6.4cqw/1 var(--display); letter-spacing: -.02em; text-align: center; margin: 0; overflow-wrap: anywhere; }
.sheet-sub { font: 400 1.5cqw/1 var(--mono); text-align: center; color: #6c675d; margin-top: 1.4cqw; letter-spacing: .08em; text-transform: uppercase; }
.sheet-box { position: relative; min-height: 0; border: .25cqw dashed var(--line-s); border-radius: 1.2cqw; padding: 1.8cqw; display: flex; flex-direction: column; justify-content: space-between; }
.sheet-box b { font: 500 1.9cqw/1.1 var(--mono); letter-spacing: .06em; text-transform: uppercase; overflow-wrap: anywhere; }
.sheet-box i { display: block; height: 2.6cqw; border-bottom: .2cqw solid var(--line-s); font: italic 300 1.6cqw/1 var(--serif); color: #8a8477; }
.sheet-box.t { border: .3cqw solid var(--ink-s); justify-content: center; align-items: center; text-align: center; background: #faf8f3; }
.sheet-box.t .sheet-title { font-size: 5.2cqw; }
.sheet-foot { font: 400 1.4cqw/1 var(--mono); color: #8a8477; text-align: center; }
.sheet.land .sheet-in { padding: 4cqw; gap: 1.6cqw; }
.sheet.land .sheet-title { font-size: 4.4cqw; }
.sheet.land .sheet-box.t .sheet-title { font-size: 3.6cqw; }
.sheet.land .sheet-box b { font-size: 1.35cqw; }
.sheet.land .sheet-box i { height: 1.9cqw; font-size: 1.15cqw; }
.sheet.land .sheet-box { padding: 1.3cqw; }
.sheet.land .sheet-sub, .sheet.land .sheet-foot { font-size: 1.05cqw; }

/* layouts */
.sheet[data-layout="grid6"] .sheet-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 1fr); }
.sheet.land[data-layout="grid6"] .sheet-grid { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); }
.sheet[data-layout="grid9"] .sheet-grid { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); }
.sheet[data-layout="collage"] .sheet-grid { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); grid-template-areas: "a a b c" "d t t c" "d t t e" "f g h h"; }
.sheet.land[data-layout="collage"] .sheet-grid { grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(3, 1fr); grid-template-areas: "a a b c c" "d t t t e" "f g g h e"; }
.sheet[data-layout="collage"] .sheet-box:nth-child(1) { grid-area: a; }
.sheet[data-layout="collage"] .sheet-box:nth-child(2) { grid-area: b; }
.sheet[data-layout="collage"] .sheet-box:nth-child(3) { grid-area: c; }
.sheet[data-layout="collage"] .sheet-box:nth-child(4) { grid-area: d; }
.sheet[data-layout="collage"] .sheet-box:nth-child(5) { grid-area: e; }
.sheet[data-layout="collage"] .sheet-box:nth-child(6) { grid-area: f; }
.sheet[data-layout="collage"] .sheet-box:nth-child(7) { grid-area: g; }
.sheet[data-layout="collage"] .sheet-box:nth-child(8) { grid-area: h; }
.sheet[data-layout="collage"] .sheet-box.t { grid-area: t; }

#print-root { display: none; }
@media print {
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block; }
  #print-root .sheet { width: var(--print-w); height: var(--print-h); aspect-ratio: auto; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; break-inside: avoid; page-break-after: avoid; }
}

/* ---------- explainer + FAQ ---------- */
.tl-body { max-width: 720px; margin: clamp(56px, 8vw, 96px) auto 0; }
.tl-body h2 { font: 400 clamp(30px, 3.4vw, 42px)/1.08 var(--display); letter-spacing: -.015em; margin: 0 0 16px; }
.tl-body h2:not(:first-child) { margin-top: clamp(48px, 6vw, 72px); }
.tl-body h3 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; margin: 28px 0 6px; }
.tl-body p { font-size: 17px; line-height: 1.65; color: var(--ink); }
.tl-body p + p { margin-top: 14px; }
.tl-body .tl-answer { font-size: 19px; line-height: 1.55; color: var(--ink-2); }
.tl-list { display: grid; gap: 12px; margin-top: 18px; counter-reset: tl; }
.tl-list li { position: relative; padding-left: 42px; font-size: 17px; line-height: 1.6; counter-increment: tl; }
.tl-list li::before { content: counter(tl, decimal-leading-zero); position: absolute; left: 0; top: 3px; font: 400 13px/1.6 var(--mono); color: var(--ultra); }
.tl-list b { font-weight: 600; }
.tl-pairs { display: grid; gap: 10px; margin-top: 18px; }
.tl-pairs li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 14px 16px; border-radius: 12px; background: #fbfaf6; font-size: 15.5px; line-height: 1.45; }
.tl-pairs s { color: var(--muted); text-decoration-color: rgba(108,103,93,.5); }
.tl-pairs strong { font-weight: 500; }
.tl-ex { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 20px; }
.tl-ex div { background: #fbfaf6; border-radius: 12px; padding: 16px; }
.tl-ex b { display: block; font: 400 12px/1.3 var(--mono); color: var(--ultra); margin-bottom: 8px; text-transform: lowercase; }
.tl-ex p { font: italic 300 17px/1.4 var(--serif) !important; margin: 0 !important; }
.tl-ex p + p { margin-top: 6px !important; }

.tl-faq { margin-top: 18px; border-top: 1px solid var(--line); }
.tl-faq details { border-bottom: 1px solid var(--line); }
.tl-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 2px; font-weight: 600; font-size: 17px; line-height: 1.35; }
.tl-faq summary::-webkit-details-marker { display: none; }
.tl-faq summary::after { content: "+"; flex: none; font: 300 24px/1 var(--sans); color: var(--ink-2); transition: transform .2s var(--ease); }
.tl-faq details[open] summary::after { transform: rotate(45deg); }
.tl-faq summary:focus-visible { outline-offset: 2px; }
.tl-faq details p { padding: 0 2px 20px; color: var(--ink-2); font-size: 16px; }

.tl-cta { margin: clamp(56px, 7vw, 88px) auto 0; max-width: 720px; padding: clamp(24px, 4vw, 36px); background: #e9e3d6; color: var(--ink); border-radius: 18px; display: grid; gap: 16px; justify-items: start; }
.tl-cta h2 { font: 400 clamp(28px, 3vw, 38px)/1.08 var(--display); letter-spacing: -.015em; margin: 0; }
.tl-cta p { color: var(--ink-2); font-size: 16.5px; line-height: 1.55; }

/* ---------- index ---------- */
.tl-cards { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.tl-card { display: grid; grid-template-rows: auto 1fr auto; gap: 18px; padding: clamp(20px, 3vw, 28px); border-radius: 18px; background: #fbfaf6; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s; }
.tl-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(26,25,21,.08), 0 18px 40px rgba(26,25,21,.12); }
.tl-card-art { aspect-ratio: 16 / 9; border-radius: 12px; background: var(--paper); display: grid; place-items: center; padding: 20px; overflow: hidden; }
.tl-card-art q { font: 400 clamp(24px, 2.6vw, 32px)/1.12 var(--display); text-align: center; quotes: "“" "”"; max-width: 12em; }
.tl-card-art .mini { width: 34%; aspect-ratio: 8.5 / 11; background: #fff; box-shadow: 0 6px 18px rgba(26,25,21,.12); padding: 7%; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto repeat(3, 1fr); gap: 5px; }
.tl-card-art .mini span { border: 1.5px dashed #c6bfb0; border-radius: 3px; }
.tl-card-art .mini em { grid-column: 1 / -1; height: 7px; margin: 0 22%; background: var(--ink); border-radius: 2px; }
.tl-card h2 { font: 400 clamp(28px, 2.8vw, 36px)/1.05 var(--display); letter-spacing: -.015em; margin: 0; }
.tl-card p { color: var(--ink-2); font-size: 16px; line-height: 1.55; margin-top: 8px; }
.tl-card .tl-go { font: 600 14px/1 var(--sans); color: var(--ultra); }
.tl-card:hover .tl-go { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 560px) {
  .tl-head .display { font-size: clamp(38px, 11vw, 52px); }
  .tl-pairs li { grid-template-columns: 1fr; gap: 4px; }
  .af-stage { min-height: 240px; }
  .vt-preview { position: static; }
  .tl-actions .btn { flex: 1 1 auto; }
}
@media (max-width: 899px) { .vt-preview { position: static; order: -1; } }
@media (prefers-reduced-motion: reduce) {
  .af-quote.pop { animation: none; }
  .tl-card, .tl-card:hover { transition: none; transform: none; }
}
.tl-row { display: flex; flex-wrap: wrap; gap: 8px; }
