/* ============================================================================
   content.css — the guides and free tools (site/guides, site/tools). Loaded
   after styles.css, which supplies the palette, buttons, nav and footer.
   Pages are generated by tools/build-content.mjs.
   ========================================================================== */

.page { max-width: calc(820px + 2 * var(--pad)); margin: 0 auto; padding: 18px var(--pad) clamp(48px, 7vw, 88px); overflow-x: visible; }
.page:has(.tiles--index) { max-width: calc(var(--wrap) + 2 * var(--pad)); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-bottom: clamp(18px, 3vw, 32px); color: var(--mute); font-size: calc(14.5px * var(--fs)); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--mute); text-underline-offset: 3px; }
.crumbs a:hover { color: var(--accent-deep); }
.crumbs span { color: var(--ink); }

/* ── article ─────────────────────────────────────────────────────────────── */
.article h1, .index-head h1 { margin-top: 16px; color: var(--ink); font: 800 calc(calc(clamp(32px, 5vw, 54px) * var(--dscale, 1)) * var(--fs))/1.06 var(--display); letter-spacing: -.03em; text-wrap: balance; animation: rise .8s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
.byline { margin-top: 14px; color: var(--mute); font-size: calc(15px * var(--fs)); }
.lede { margin-top: 16px; color: var(--ink-2); font-size: calc(clamp(18px, 1.7vw, 21px) * var(--fs)); line-height: 1.5; }
.answer { position: relative; margin: 26px 0 8px; padding: 20px 22px 20px 26px; border-radius: var(--r); background: var(--accent-soft); color: var(--ink); overflow: hidden; }
.answer::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--accent); }
.answer b { display: block; margin-bottom: 4px; color: var(--accent-deep); font: 700 calc(14px * var(--fs))/1.2 var(--body); letter-spacing: .04em; text-transform: uppercase; }
.answer p { font-size: calc(18px * var(--fs)); line-height: 1.55; }
.article > h2, .qa > h2, .try > h2, .more > h2, .index-group > h2 { margin: 44px 0 12px; color: var(--ink); font: 800 calc(clamp(24px, 3vw, 32px) * var(--fs))/1.15 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.article > h3 { margin: 28px 0 8px; color: var(--ink); font: 700 calc(21px * var(--fs))/1.25 var(--display); }
.article > p, .article > ul, .article > ol, .article > blockquote { margin-top: 14px; font-size: calc(18px * var(--fs)); line-height: 1.65; }
.article > ul, .article > ol { padding-left: 24px; }
.article > ul { list-style: none; padding-left: 0; }
.article > ul > li { position: relative; padding-left: 30px; margin-top: 8px; }
.article > ul > li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); transform: rotate(45deg); }
.article > ol { list-style: decimal; }
.article > ol > li { margin-top: 8px; padding-left: 4px; }
.article > ol > li::marker { color: var(--accent-deep); font-weight: 700; }
.article strong { color: var(--ink); font-weight: 600; }
.article a { color: var(--accent-deep); font-weight: 500; text-underline-offset: 3px; }
.article blockquote { margin-inline: 0; padding: 16px 20px; border-radius: 14px; background: var(--bg-2); }
.article blockquote p { margin: 0; }
.table { margin-top: 18px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); overflow-x: auto; }
.table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: calc(16px * var(--fs)); }
.table th, .table td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: var(--ink); color: #fff; font: 600 calc(14.5px * var(--fs))/1.3 var(--body); }
.table tr:last-child td { border-bottom: 0; }
.table td:first-child { color: var(--ink); font-weight: 600; }
.fine { margin-top: 14px; color: var(--mute); font-size: calc(14.5px * var(--fs)); }

/* questions */
.qa details { margin-top: 10px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 12px 20px; color: var(--ink); font: 600 calc(18px * var(--fs))/1.3 var(--display); cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); font: 500 calc(22px * var(--fs))/1 var(--body); transition: transform .3s var(--ease), background .3s; }
.qa details[open] summary::after { transform: rotate(135deg); background: var(--sun); color: var(--ink); }
.qa .faq-a { padding: 0 20px 18px; font-size: calc(17px * var(--fs)); }
.qa .faq-a p + p { margin-top: 10px; }

/* ── tiles: links to tools and guides ────────────────────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.tiles--index { grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px 20px 46px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); color: var(--ink-2); font-size: calc(15.5px * var(--fs)); line-height: 1.45; text-decoration: none; transition: transform .3s var(--ease), box-shadow .3s; }
.tile:hover { transform: translateY(-5px) rotate(-.5deg); box-shadow: 0 2px 4px rgba(20, 22, 29, .06), 0 24px 40px -18px rgba(var(--accent-rgb), .45); }
.tile-k { align-self: flex-start; padding: 5px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-deep); font: 600 calc(12.5px * var(--fs))/1 var(--body); }
.tile b { color: var(--ink); font: 700 calc(19px * var(--fs))/1.2 var(--display); letter-spacing: -.01em; }
.tile i { position: absolute; left: 20px; bottom: 16px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-size: calc(14px * var(--fs)); transition: transform .3s var(--ease), background .3s; }
.tile:hover i { transform: translateX(6px); background: var(--accent); }
.index-head { margin-bottom: 30px; }
.index-group > p { margin-bottom: 16px; }
.more { margin-top: 8px; }

/* ── the free-sample box ─────────────────────────────────────────────────── */
.lead { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 3vw, 36px); align-items: center; margin-top: 48px; padding: clamp(22px, 3.4vw, 40px); border-radius: 28px; background: var(--accent-deep); color: rgba(255, 255, 255, .93); }
.lead h2 { color: #fff; font: 800 calc(clamp(24px, 3vw, 34px) * var(--fs))/1.1 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.lead-copy p { margin-top: 12px; font-size: calc(16.5px * var(--fs)); }
.lead-star { position: absolute; right: 22px; top: -18px; width: 44px; height: 44px; fill: var(--sun); animation: twinkle 4s ease-in-out infinite; }
.lead-form { display: grid; gap: 10px; padding: 18px; border-radius: 20px; background: var(--card); color: var(--ink-2); }
.lead-form label { display: grid; gap: 5px; color: var(--ink); font-weight: 600; font-size: calc(14.5px * var(--fs)); }
.lead-form input, .tool input, .tool select, .tool textarea { width: 100%; min-height: 50px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: calc(16px * var(--fs))/1.4 var(--body); }
.lead-form input:focus, .tool input:focus, .tool select:focus, .tool textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lead-form .btn { width: 100%; }

/* ── a tool ──────────────────────────────────────────────────────────────── */
.tool { margin-top: 26px; padding: clamp(18px, 3vw, 30px); border: 2px solid var(--ink); border-radius: 24px; background: var(--card); box-shadow: 0 18px 40px -22px rgba(20, 22, 29, .5); }
.tool form { display: grid; gap: 14px; }
.tool .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tool label { display: grid; gap: 6px; color: var(--ink); font-weight: 600; font-size: calc(15px * var(--fs)); }
.tool label small { color: var(--mute); font-weight: 400; }
.tool textarea { min-height: 92px; resize: vertical; }
.tool .btn { justify-self: start; }
.tool fieldset { margin: 0; padding: 0; border: 0; }
.tool legend { padding: 0; margin-bottom: 8px; color: var(--ink); font-weight: 600; font-size: calc(16px * var(--fs)); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts label { display: inline-flex; grid: none; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-weight: 500; cursor: pointer; transition: border-color .2s, background .2s; }
.opts input { width: 18px; min-height: 0; height: 18px; padding: 0; accent-color: var(--accent); }
.opts label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.quiz { display: grid; gap: 4px; }
.quiz fieldset { padding: 14px 0; border-top: 1px solid var(--line); }
.quiz fieldset:first-child { border-top: 0; padding-top: 0; }

.result { margin-top: 22px; padding-top: 22px; border-top: 2px dashed var(--line); animation: rise .5s var(--ease) both; }
.result h2 { margin: 0 0 10px; color: var(--ink); font: 800 calc(clamp(22px, 2.6vw, 28px) * var(--fs))/1.15 var(--display); letter-spacing: -.02em; }
.result h3 { margin: 18px 0 6px; color: var(--ink); font: 700 calc(18px * var(--fs))/1.25 var(--display); }
.result p, .result li { font-size: calc(16.5px * var(--fs)); }
.result ul { display: grid; gap: 8px; margin-top: 8px; }
.result li { position: relative; padding-left: 30px; }
.result li::before { content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.500 10.400l2.900 2.900 6.100-6.200' fill='none' stroke='%2314161D' stroke-width='2.200' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain; }
.result li.bad::before { background: #FBD9D3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6.500 6.500l7 7M13.500 6.500l-7 7' fill='none' stroke='%23A0261A' stroke-width='2.200' stroke-linecap='round'/%3E%3C/svg%3E") center / contain; }
.out { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); }
.out code { flex: 1; min-width: 0; color: var(--ink); font: 500 calc(15.5px * var(--fs))/1.4 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: calc(15px * var(--fs)); }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--bg); }
.qr { display: grid; justify-items: center; gap: 12px; width: fit-content; margin-top: 14px; padding: 18px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.qr svg, .qr img { width: 200px; height: 200px; }
.qr b { color: var(--ink); font: 700 calc(18px * var(--fs))/1.2 var(--display); }
.acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.score { display: flex; align-items: center; gap: 18px; margin-bottom: 8px; }
.dial { --v: 0; flex: none; display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--v) * 1%), var(--bg-2) 0); color: var(--ink); font: 800 calc(30px * var(--fs))/1 var(--display); }
.dial::before { content: ""; grid-area: 1 / 1; width: 78px; height: 78px; border-radius: 50%; background: var(--card); }
.dial span { grid-area: 1 / 1; }
.bars { display: grid; gap: 10px; margin-top: 12px; }
.bar { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr auto; align-items: center; gap: 12px; font-size: calc(15.5px * var(--fs)); }
.bar i { height: 12px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.bar i::after { content: ""; display: block; width: calc(var(--v) * 1%); height: 100%; border-radius: 99px; background: var(--accent); animation: grow .9s var(--ease) both; }
.bar.you i::after { background: var(--sun); }
@keyframes grow { from { width: 0; } }
.bar b { color: var(--ink); white-space: nowrap; }
.big { color: var(--ink); font: 800 calc(clamp(28px, 4vw, 40px) * var(--fs))/1.1 var(--display); letter-spacing: -.02em; }
.gprev { margin-top: 12px; padding: 16px 18px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); font-family: Arial, sans-serif; }
.gprev small { color: #4d5156; font-size: calc(13px * var(--fs)); }
.gprev b { display: block; margin: 3px 0; color: #1a0dab; font-size: calc(19px * var(--fs)); font-weight: 400; line-height: 1.3; }
.gprev p { color: #4d5156; font-size: calc(14px * var(--fs)); line-height: 1.5; }
.wprev { max-width: 330px; margin-top: 12px; border-radius: 12px; background: #D9FDD3; overflow: hidden; font-family: Arial, sans-serif; }
.wprev div { padding: 10px 12px; background: #c9efc3; }
.wprev b { display: block; color: #111; font-size: calc(15px * var(--fs)); }
.wprev p { color: #444; font-size: calc(13px * var(--fs)); line-height: 1.4; }
.wprev small { color: #667; font-size: calc(12px * var(--fs)); }
.count { color: var(--mute); font-size: calc(13.5px * var(--fs)); font-weight: 400; }
.count.over { color: #A0261A; font-weight: 600; }
.spin { display: inline-block; width: 18px; height: 18px; margin-right: 8px; border: 3px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; vertical-align: -3px; animation: spin 1s linear infinite; }

@media (max-width: 700px) {
  .lead { grid-template-columns: 1fr; }
  .tool .row2 { grid-template-columns: 1fr; }
  .bar { grid-template-columns: 1fr auto; }
  .bar i { grid-column: 1 / -1; grid-row: 2; }
  .article > p, .article > ul, .article > ol { font-size: calc(17px * var(--fs)); }
  .score { align-items: flex-start; }
}
@media print {
  .nav, .sheet, .foot, .lead, .more, .crumbs, .progress, .tool form, .fine, .qa, .article > *:not(.tool), [data-noprint] { display: none !important; }
  .tool { border: 0; box-shadow: none; padding: 0; }
  body { background: #fff; }
}
