/* App Idea Checker, shared styles for both layouts (a/ and c/), the contact page and the privacy page.
   Up Coast Builders tokens (docs/design.md): white ground, ink #332912, muted #665c49, border #e2e2e2, primary green #257244,
   lime #9dde49, yellow #f9ee6e, mint #96d6ac (tints only, as the band colour), grey #f5f5f5. No gradients, no cream, no stock art. */
:root {
  --surface: #ffffff; --ink: #332912; --muted: #665c49; --border: #e2e2e2;
  --primary: #257244; --primary-hover: #1d5c37; --lime: #9dde49; --yellow: #f9ee6e; --mint: #96d6ac;
  --panel: #f5f5f5; --band: #edf7f0; --r: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--surface); color: var(--ink); font: 400 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sr, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3 { margin: 0; color: var(--ink); line-height: 1.2; }
p { margin: 0 0 16px; }

/* header */
.hdr { border-bottom: 1px solid var(--border); background: var(--surface); }
.hdr-in { max-width: 1200px; margin: 0 auto; padding: 8px 24px; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); min-width: 0; min-height: 44px; }
.brand img { height: 40px; width: auto; display: block; }
.brand .sep { width: 1px; height: 24px; background: var(--border); }
.brand .name { font-weight: 600; font-size: 18px; white-space: nowrap; }
.nav { display: flex; gap: 24px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; display: inline-flex; align-items: center; min-height: 44px; }
.nav a:hover { color: var(--primary); text-decoration: underline; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 24px; border-radius: var(--r); font: 600 16px/1.25 Inter, system-ui, sans-serif; text-align: center; text-decoration: none; cursor: pointer; border: 1px solid transparent; text-wrap: balance; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.secondary { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn.secondary:hover { background: #f0f8f3; }
.btn.sm { min-height: 44px; padding: 8px 16px; font-size: 14px; white-space: nowrap; flex: none; }
.btn.big { min-height: 60px; font-size: 18px; padding: 8px 40px; margin-top: 8px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: var(--primary); margin: 0 0 8px; }
.eyebrow.dark { color: var(--muted); }
.cap { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0; }
.hint { font-size: 14px; color: var(--muted); margin: 0; }
.star { color: #9a6a00; }

/* bands: full width, the colour changes from band to band */
.band { width: 100%; }
.band-in { max-width: 1200px; margin: 0 auto; padding: 48px 24px; }
.band.grey { background: var(--panel); }
.band.white { background: var(--surface); }

/* hero */
.hero { background: var(--band); }
.hero-in { max-width: 1200px; margin: 0 auto; padding: 32px 24px 40px; }
.hero h1 { font-size: 48px; letter-spacing: -0.02em; font-weight: 800; margin-bottom: 16px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 48px; align-items: start; }
.hero-left, .hero-right { min-width: 0; }
.hero-right { padding-top: 32px; }
.sub { font-size: 18px; line-height: 1.5; max-width: 560px; }
.inputcard { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 24px; display: grid; gap: 8px; box-shadow: 0 1px 3px rgba(51, 41, 18, 0.08); }
.inputcard label { font-weight: 700; font-size: 18px; }
.inputcard textarea { width: 100%; min-height: 96px; padding: 12px 16px; border: 1px solid #b8b3a8; border-radius: var(--r); background: #fff; font: 400 16px/1.5 Inter, system-ui, sans-serif; color: var(--ink); resize: vertical; }
.inputcard textarea::placeholder { color: var(--muted); }
.inputcard .btn { width: 100%; min-height: 52px; font-size: 17px; }
.trust { font-size: 14px; color: var(--muted); margin: 0; text-align: center; }
.chiprow { margin-top: 16px; }
.chiprow p { font-size: 15px; margin: 0 0 8px; font-weight: 500; }
.exchips { display: flex; flex-wrap: wrap; gap: 8px; }
.exchip { min-height: 44px; padding: 8px 16px; border: 1px solid var(--primary); background: #fff; color: var(--primary); border-radius: 999px; font: 600 15px Inter, system-ui, sans-serif; cursor: pointer; }
.exchip:hover { background: #f0f8f3; }
.see { font-size: 24px; font-weight: 700; margin-bottom: 16px; }
.excard { background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--lime); border-radius: 16px; padding: 24px; box-shadow: 0 1px 3px rgba(51, 41, 18, 0.08); }
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink); background: var(--yellow); padding: 2px 8px; border-radius: 4px; margin: 0 0 8px; }
.exhead { display: flex; gap: 24px; align-items: center; margin-bottom: 16px; }
.exhead h3 { font-size: 22px; font-weight: 700; margin: 4px 0 8px; }
.sim { font-size: 16px; margin: 0 0 8px; } .sim b { font-size: 20px; }
.fine { font-size: 14px; color: var(--muted); margin: 16px 0 0; }

/* the score ring: the page script sets the colour and the amount (checker.js writes the conic-gradient on #scoreCircle) */
.ring { --s: 120px; width: var(--s); height: var(--s); flex: none; border-radius: 50%; position: relative; display: grid; place-items: center; background: conic-gradient(var(--c, var(--primary)) calc(var(--p, 0) * 1%), var(--border) 0); }
.ring::before { content: ""; position: absolute; inset: calc(var(--s) * 0.1); background: #fff; border-radius: 50%; }
.ring span { position: relative; font-size: calc(var(--s) * 0.34); font-weight: 800; letter-spacing: -0.02em; }
.ring-sample { --p: 72; --c: #c27c00; }

/* app rows (the sample result and the small result card) */
.apps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.app { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.app img { border-radius: 10px; display: block; background: var(--panel); }
.app .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app .rt { font-size: 14px; color: var(--muted); white-space: nowrap; }

/* hero after a search: compact */
body[data-state="result"] .hero .sub, body[data-state="result"] .chiprow, body[data-state="result"] .hero-right { display: none; }
body[data-state="result"] .hero-grid { grid-template-columns: minmax(0, 1fr); }
body[data-state="result"] .hero h1 { font-size: 36px; }
body[data-state="result"] .inputcard { max-width: 760px; }
body[data-state="result"] .inputcard textarea { min-height: 72px; }
body[data-state="result"] .inputcard .btn { max-width: 320px; }
body[data-state="result"] .hero-in { padding-bottom: 24px; }
.error { display: none; background: #fde3d7; color: #7a2d0c; border-radius: var(--r); padding: 8px 16px; margin: 16px 0; }
.loader { display: none; margin: 24px 0; color: var(--muted); }
.spinner { display: inline-block; width: 24px; height: 24px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
#idea.shake { animation: shake 0.45s ease; border-color: #c54b3c; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* the result band is shown only while a result is on screen */
.band-result { display: none; }
.band-result:has(#results[style*="display: block"]) { display: block; }
.realres { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
.rr-main { min-width: 0; }
.rr-side { display: grid; gap: 16px; align-content: start; }
.rcard { display: none; background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--lime); border-radius: 16px; padding: 24px; box-shadow: 0 1px 3px rgba(51, 41, 18, 0.08); min-width: 0; }
.r-top { display: flex; gap: 24px; align-items: center; margin-bottom: 24px; }
.r-top h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.01em; margin: 4px 0 8px; }
.adv { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.adv h3 { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.adv p { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.stats > div { background: var(--panel); border-radius: var(--r); padding: 8px 16px; display: grid; }
.stats b { font-size: 20px; line-height: 1.4; }
.stats span { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.chipline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.niche-debug:empty { display: none; }
.niche-debug-label { margin-right: 4px; }
.niche-keyword { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; background: #fff; border: 1px solid var(--border); border-radius: 999px; color: var(--ink); font: 500 14px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.niche-keyword:hover { background: var(--panel); }
.niche-keyword-x { font-style: normal; color: var(--muted); font-size: 16px; }
.niche-group-sep { color: var(--muted); font-weight: 600; }
.niche-group-empty { font-style: italic; padding: 0 4px; }
.niche-restore { margin-left: 4px; }
.disc { background: var(--panel); border-left: 4px solid var(--yellow); border-radius: 0 var(--r) var(--r) 0; padding: 8px 16px; font-size: 14px; line-height: 1.5; margin: 0 0 24px; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.list-head h2, #broaderHeading { font-size: 16px; font-weight: 600; line-height: 1.3; }
.note { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 0 0 16px; }
.results-note:empty { display: none; }
.skip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--panel); padding: 8px 16px; border-radius: var(--r); margin-bottom: 16px; font-size: 14px; color: var(--muted); }
.skip input { flex: 1 1 160px; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r); font: 400 14px Inter, system-ui, sans-serif; color: var(--ink); background: #fff; }
.tbl { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
thead th { text-align: left; background: var(--panel); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 8px 12px; }
tbody td { padding: 8px 12px; border-top: 1px solid var(--border); vertical-align: middle; }
.col-icon { width: 64px; } .col-rating { width: 80px; } .col-reviews { width: 88px; } .col-price { width: 72px; } .col-updated { width: 108px; } .col-dismiss { width: 56px; text-align: center; }
.app-icon-small { display: block; width: 40px; height: 40px; border-radius: 9px; object-fit: cover; background: var(--panel); }
.app-name-link { display: flex; align-items: center; min-height: 44px; font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; line-height: 1.4; }
.app-name-link:hover { color: var(--primary); text-decoration: underline; }
.app-developer { display: block; font-size: 12px; color: var(--muted); margin-top: -8px; }
.app-meta-mobile { display: none; }
.dismiss-btn { width: 44px; min-width: 44px; height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; border-radius: 8px; cursor: pointer; }
.dismiss-btn:hover { background: var(--panel); color: var(--ink); }
.app-row { transition: opacity 0.2s; }
.dismissing { opacity: 0; }
.empty-direct { text-align: center; padding: 24px 16px; color: var(--muted); font-size: 14px; }
#broaderSection { display: none; margin-top: 16px; }
.broader-toggle { width: 100%; background: #fff; border: 1px solid var(--border); border-radius: var(--r); font: 600 16px Inter, system-ui, sans-serif; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 8px 16px; text-align: left; }
.broader-toggle:hover .show { text-decoration: underline; }
#broaderBody { padding: 16px 0 0; }
#broaderBody[hidden] { display: none; }
#broaderBody .note { margin-top: 0; }
.show { color: var(--primary); font-weight: 600; font-size: 14px; }
.link-btn { background: none; border: 0; padding: 0 8px; min-height: 44px; font: inherit; font-weight: 600; color: var(--primary); text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--primary-hover); }
.expand-link, .restore-link { text-align: center; margin: 8px 0 0; font-size: 14px; min-height: 8px; }
.restore-link { color: var(--muted); }
.undo-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 16px; padding: 4px 4px 4px 16px; background: #fff; border: 1px solid var(--primary); border-radius: var(--r); font-size: 14px; max-width: 100%; }
.undo-bar[hidden] { display: none; }
.undo-text { min-width: 0; flex: 1 1 auto; display: flex; gap: 4px; white-space: nowrap; overflow: hidden; }
.undo-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.undo-btn { flex: none; min-height: 44px; padding: 8px 24px; border-radius: var(--r); border: 0; background: var(--primary); color: #fff; font: 600 14px Inter, system-ui, sans-serif; cursor: pointer; }
.undo-btn:hover { background: var(--primary-hover); }
#resultsListHeading:focus { outline: none; }

/* the Problem Brief form (in a card on both layouts) */
.brief { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 24px; min-width: 0; }
.brief h3.briefhead { font-size: 20px; margin-bottom: 16px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.f { display: grid; gap: 4px; align-content: start; }
.f.full { grid-column: 1 / -1; }
.f label, .lab { font-weight: 600; font-size: 14px; }
.brief textarea { width: 100%; min-height: 64px; align-self: start; padding: 8px 12px; border: 1px solid #cfcac0; border-radius: var(--r); background: #fff; color: var(--ink); font: 400 14px/1.5 Inter, system-ui, sans-serif; resize: vertical; }
.grp { font-size: 18px; font-weight: 600; padding-bottom: 8px; border-bottom: 2px solid var(--primary); margin: 24px 0 16px; }
.amap { display: grid; grid-template-columns: 136px minmax(0, 1fr) 136px; grid-template-areas: ". top ." "left grid right" ". bottom ."; gap: 8px; align-items: center; margin-top: 8px; }
.ax { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; white-space: nowrap; }
.ax.top { grid-area: top; } .ax.bottom { grid-area: bottom; } .ax.left { grid-area: left; } .ax.right { grid-area: right; }
.quads { grid-area: grid; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quads textarea { min-height: 88px; }
.dl { margin-top: 24px; }

/* cards beside the brief and under the result */
.card { border: 1px solid var(--border); border-radius: var(--r); padding: 16px; display: grid; gap: 8px; background: #fff; min-width: 0; }
.card h3 { font-size: 18px; line-height: 1.3; font-weight: 600; }
.card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.card .price { font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.card .btn { width: 100%; font-size: 15px; padding: 8px; }
.card.course { border-top: 4px solid var(--lime); }
.btn.go { width: 100%; min-height: 52px; font-size: 17px; }
/* offer cards: eyebrow, heading, sentence, button, small line; the free-guide card carries the author note */
.card .eyebrow { margin: 0; font-size: 12px; color: var(--muted); }
.card p.under { font-size: 13px; text-align: center; margin-top: -2px; }
.card.free .btn { min-height: 52px; font-size: 16px; }
.card.free { border-top: 4px solid var(--lime); }
.author { display: flex; gap: 12px; align-items: flex-start; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.author img { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: block; }
.author p { font-size: 13px; line-height: 1.45; margin: 0 0 4px; }
.author p.who { font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.briefintro { font-size: 16px; line-height: 1.55; margin: 0 0 20px; max-width: 760px; }
.nextcard { gap: 12px; padding: 20px; }
.nextcard h3 { font-size: 22px; }
.nextcard .btn { margin-top: 4px; }
[data-course-slot]:empty { display: none; }

/* why I built this */
.why-band { background: var(--surface); }
body[data-state="result"] .why-band, body[data-step="2"] .why-band, body[data-step="3"] .why-band { background: var(--band); }
.why-in { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; align-items: center; max-width: 1000px; }
.portrait { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; object-position: 50% 24%; display: block; border: 4px solid var(--lime); }
.why-in h2 { font-size: 32px; font-weight: 700; margin-bottom: 16px; }
.why-in p { max-width: 680px; font-size: 18px; }
.why-in p:last-child { margin-bottom: 0; }

/* the no-AI note: shown after a search */
.note-band .band-in > h2 { font-size: 28px; margin-bottom: 24px; }
.note-band .cols { columns: 2; column-gap: 48px; }
.note-band .cols p { break-inside: avoid; margin-bottom: 16px; }

/* FAQ in a centred column */
.faq-in { max-width: 760px; margin: 0 auto; padding: 48px 24px; }
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 40px 16px 0; font-weight: 600; position: relative; min-height: 56px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 8px; top: 12px; font-size: 22px; color: var(--primary); }
.faq details[open] summary::after { content: "\2212"; }
.faq .a { padding-bottom: 8px; }
.faq-band { border-top: 1px solid var(--border); }

/* footer */
.foot { padding: 32px 0 24px; }
.foot-in { max-width: 1200px; margin: 0 auto; padding: 0 24px; font-size: 14px; color: var(--muted); }
.foot p { margin: 0 0 8px; }
.fl { display: flex; gap: 24px; margin: 0; }
.fl a { color: var(--ink); display: inline-flex; align-items: center; min-height: 44px; }
.fl { flex-wrap: wrap; column-gap: 24px; row-gap: 0; }
.fl .link-btn { color: var(--ink); font-weight: 400; padding: 0; }

/* the consent choice (assets/consent.js): fixed to the foot of the window until answered; both answers the same size */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--surface); border-top: 1px solid var(--border); padding: 14px 24px; }
.consent-in { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.consent p { margin: 0; flex: 1 1 320px; font-size: 14px; color: var(--ink); }
.consent-btns { display: flex; gap: 12px; }

/* content pages (contact, privacy) */
.content { max-width: 720px; margin: 0 auto; padding: 32px 24px 16px; }
.content h1 { font-size: 30px; line-height: 1.25; margin-bottom: 16px; }
.content h2 { font-size: 20px; margin: 32px 0 8px; }
.content h3 { font-size: 16px; margin: 24px 0 8px; }
.content ul { padding-left: 24px; margin: 0 0 16px; }
.content p a, .content li a { display: inline; padding-block: 13px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }   /* stays in the sentence; the padding only makes the tap area 44px tall */
.lede { font-size: 18px; color: var(--muted); }
.last-updated { color: var(--muted); font-size: 14px; }
.foot-content { max-width: 720px; margin: 0 auto; padding: 16px 24px 24px; }
.foot-content .foot-in { max-width: none; padding: 0; }

/* print route: a print-only copy of the Problem Brief, used when the PDF font cannot draw the text */
.print-brief { display: none; }
@media print {
  @page { size: letter; margin: 0.65in 0.75in 0.9in; @bottom-left { content: "Made with the App Idea Checker from Up Coast Builders  \00B7  upcoastbuilders.ca"; font: 7.5pt Inter, sans-serif; color: #665c49; border-top: 0.5pt solid #c9c9c9; padding-top: 6pt; vertical-align: top; width: 6.2in; } @bottom-right { content: counter(page) " / " counter(pages); vertical-align: top; padding-top: 6pt; font: 7.5pt Inter, sans-serif; color: #665c49; } }
  html, body { background: #fff !important; font-size: 11pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body > *:not(#printBrief) { display: none !important; }
  .print-brief { display: block; color: #332912; line-height: 1.45; }
  .pb-logo { display: block; width: 128pt; height: auto; margin: 0 0 14pt -4pt; }
  .pb-lime { width: 44pt; height: 4pt; background: #9dde49; margin: 0 0 14pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-brief h1 { font-size: 24pt; margin: 0 0 10pt; letter-spacing: -0.01em; line-height: 1.15; }
  .pb-intro { color: #665c49; font-size: 10.5pt; margin: 0 0 6pt; }
  .pb-field { break-inside: avoid; margin: 0 0 4pt; }
  .pb-field h2 { font-size: 11.5pt; margin: 18pt 0 4pt; letter-spacing: 0; break-after: avoid; }
  .pb-group { font-size: 14pt; margin: 24pt 0 6pt; padding-bottom: 4pt; border-bottom: 1.5pt solid #257244; break-after: avoid; letter-spacing: 0; }
  .pb-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 15pt; }
  .pb-rule { height: 21pt; border-bottom: 1px solid #c9c9c9; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pb-map { display: grid; grid-template-columns: 80pt 1fr 80pt; grid-template-areas: ". top ." "left grid right" ". bottom ."; gap: 6pt; align-items: center; margin-top: 6pt; }
  .pb-ax { font-weight: 700; font-size: 9.5pt; color: #665c49; text-align: center; white-space: pre-line; }
  .pb-top { grid-area: top; } .pb-bottom { grid-area: bottom; } .pb-left { grid-area: left; } .pb-right { grid-area: right; }
  .pb-quads { grid-area: grid; display: grid; grid-template-columns: 1fr 1fr; gap: 6pt; }
  .pb-quad { min-height: 104pt; background: #fff; border: 0.8pt solid #c9c9c9; border-radius: 4pt; padding: 7pt; white-space: pre-wrap; overflow-wrap: anywhere; }
  .pb-next { break-inside: avoid; margin-top: 20pt; padding-top: 8pt; border-top: 0.5pt solid #c9c9c9; font-size: 8pt; color: #665c49; }
  .pb-next p { margin: 0 0 3pt; }
  .pb-next b { color: #332912; }
  .pb-next a { color: #257244; text-decoration: underline; }
}

/* phone */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-right { padding-top: 0; }
  .why-in { grid-template-columns: 120px minmax(0, 1fr); gap: 24px; }
  .portrait { width: 120px; height: 120px; }
}
@media (max-width: 640px) {
  .hdr-in { padding: 4px 16px; }
  .brand img { height: 32px; } .brand .name { font-size: 15px; } .brand { gap: 8px; }
  .nav { display: none; }
  .band-in { padding: 32px 16px; }
  .hero-in { padding: 16px 16px 24px; }
  .hero h1 { font-size: 30px; margin-bottom: 8px; } body[data-state="result"] .hero h1 { font-size: 28px; }
  .sub { font-size: 16px; margin-bottom: 8px; }
  .inputcard { padding: 16px; } .inputcard textarea { min-height: 80px; } .inputcard label { font-size: 16px; }
  .excard { padding: 16px; } .exhead { gap: 16px; } .exhead h3 { font-size: 18px; }
  .exhead .ring { --s: 96px; }
  .app { grid-template-columns: 40px minmax(0, 1fr); row-gap: 0; } .app .nm { white-space: normal; font-size: 15px; } .app .rt { grid-column: 2; } .app img { width: 40px; height: 40px; }
  .rcard { padding: 16px; }
  .r-top { flex-direction: column; align-items: flex-start; gap: 16px; } .r-top .ring { --s: 96px; } .r-top h2 { font-size: 22px; }
  .adv, .stats { grid-template-columns: 1fr; gap: 16px; } .stats { gap: 8px; }
  .list-head { flex-wrap: wrap; }
  thead { display: none; }
  .col-rating, .col-reviews, .col-price, .col-updated { display: none; }
  .col-icon { width: 48px; } tbody td { padding: 8px; }
  .app-meta-mobile { display: flex; flex-wrap: wrap; gap: 0 16px; font-size: 12px; color: var(--muted); } .app-meta-mobile span { white-space: nowrap; }
  .brief { padding: 16px; }
  .fields { grid-template-columns: 1fr; }
  .amap { grid-template-columns: 1fr 1fr; grid-template-areas: "top top" "left right" "grid grid" "bottom bottom"; }
  .ax.left { text-align: left; } .ax.right { text-align: right; }
  .dl { width: 100%; }
  .why-in { grid-template-columns: 1fr; } .why-in p { font-size: 16px; } .why-in h2 { font-size: 26px; }
  .note-band .cols { columns: 1; }
  .faq-in { padding: 32px 16px; }
  .foot-in { padding: 0 16px; }
}
@media (pointer: coarse) { .niche-keyword { min-height: 44px; } }
@media (max-width: 480px) { .niche-keyword { min-height: 44px; } }
