/* Favicon checker and generator: tool-specific styles layered on top of style.css.
   Uses the v2 tokens (light first, dark via [data-theme="dark"]). */

/* Intro card variants */
.scan-card.tool-intro { grid-template-columns: minmax(0, 1fr); }
.scan-card .tool-notes { margin-top: 14px; }
.scan-card .tool-notes a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.tool-intro-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: center; }

/* Generator hero: plain, centered, the whole block accepts a dropped file */
.start-hero { text-align: center; padding: 40px 24px 30px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: background .2s, box-shadow .2s; }
.start-hero.over { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent) inset; }
.start-hero h1 { font-size: clamp(34px, 4.6vw, 52px); letter-spacing: -.8px; line-height: 1.05; }
.start-hero .lede { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); margin: 12px auto 26px; max-width: 60ch; }
.big-btn { display: inline-flex; align-items: center; justify-content: center; min-width: min(240px, 100%); padding: 13px 28px; border-radius: 12px; background: var(--btn); color: var(--btn-ink); font-size: 16px; font-weight: 600; cursor: pointer; transition: background .2s, transform .2s; }
.big-btn:hover { background: var(--btn-hover); transform: translateY(-2px); }
.big-btn:focus-within { outline: 3px solid var(--accent); outline-offset: 4px; }
.big-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-hint { font-size: 14px; color: var(--muted); margin-top: 14px; }
.switch-link { display: inline-block; margin-top: 10px; font-size: 13.5px; font-weight: 500; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.switch-link:hover { color: var(--ink-strong); }
.big-input { display: block; width: min(220px, 100%); margin: 0 auto; font-family: var(--font-heading), var(--fallback); font-size: 44px; text-align: center; letter-spacing: 4px; padding: 10px 16px; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--card); color: var(--ink-strong); }
.big-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.start-notes { font-size: 12.5px; color: var(--muted-2); margin-top: 22px; }
.start-notes a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.path-field { margin-top: 12px; }

/* Checker results */
.results { display: flex; flex-direction: column; gap: 16px; }
.check-summary .card-head { margin-bottom: 0; flex-wrap: wrap; }
.check-summary .card-head p { font-size: 13.5px; color: var(--muted); }
.check-best { width: 44px; height: 44px; border-radius: 12px; background: var(--card-2); padding: 5px; object-fit: contain; border: 1px solid var(--line); flex-shrink: 0; }
.check-best.none { display: grid; place-items: center; color: var(--muted-2); font-size: 18px; }
.check-summary .score-meta { margin-top: 16px; }
.results .insight > p { margin-top: 10px; }
.table-wrap { overflow-x: auto; }
.ico-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ico-table th { text-align: left; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted-2); padding: 8px 10px; border-bottom: 1px solid var(--line); font-weight: 700; }
.ico-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink); }
.ico-table tr:last-child td { border-bottom: 0; }
.ico-table small { color: var(--muted); }
.ico-table .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; overflow-wrap: anywhere; }
.ico-cell { width: 44px; }
.ico-cell img { width: 32px; height: 32px; object-fit: contain; background: var(--card-2); border-radius: 8px; padding: 2px; }
.ico-missing { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--bad-soft); color: var(--bad); font-weight: 700; }

/* "What we look for" cards */
.what-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.what-grid .card { grid-column: span 2; }
.what-grid .card:nth-child(-n+2) { grid-column: span 3; }
.what-grid .card { padding: 18px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.what-grid .tile { margin-bottom: 12px; }
.what-grid b { display: block; font-size: 15px; color: var(--ink-strong); margin-bottom: 4px; font-weight: 600; }

/* CTA card */
.cta-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cta-card > div { flex: 1; min-width: 200px; }
.cta-card h2 { font-size: 22px; letter-spacing: -.3px; }
.cta-card p { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* Generator layout */
.tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tool-panel { padding: 22px 24px; }
.tool-preview { display: grid; gap: 16px; }
.preview-label { display: block; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted-2); font-weight: 700; margin-bottom: 12px; }

/* Steps and mode cards */
.step-label { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink-strong); margin: 22px 0 12px; }
.step-label:first-child { margin-top: 0; }
.step-label > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--tile); color: var(--tile-ink); font-size: 12px; font-weight: 700; flex-shrink: 0; }
.step-label em { font-style: normal; font-weight: 400; font-size: 12.5px; color: var(--muted-2); margin-left: auto; text-align: right; }
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 4px; }
.mode-card { position: relative; display: flex; align-items: flex-start; gap: 12px; text-align: left; padding: 14px 14px 14px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card-2); color: var(--ink); transition: border-color .2s, background .2s, transform .2s; }
.mode-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.mode-card.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.mode-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--tile-ink); flex-shrink: 0; }
.mode-icon svg { width: 18px; height: 18px; }
.mode-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mode-text b { font-size: 14px; font-weight: 600; color: var(--ink-strong); }
.mode-text small { font-size: 12px; line-height: 1.45; color: var(--muted); }
.mode-check { position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--btn); color: var(--btn-ink); opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s; }
.mode-card.active .mode-check { opacity: 1; transform: scale(1); }

/* Fields */
.tool-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; padding: 16px 0; border-top: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.field > span:first-child { font-weight: 500; color: var(--ink); }
.field > span:first-child small { font-weight: 400; color: var(--muted-2); }
.field input[type="text"], .field select { font-size: 15px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card-2); color: var(--ink); }
.field input[type="text"]:focus-visible, .field select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input[type="range"] { width: 100%; accent-color: var(--accent); }
.field output { font-size: 12px; color: var(--muted-2); }
.field-wide, .field-file, .field-radios { grid-column: 1 / -1; }
.field-help { font-size: 12px; line-height: 1.5; color: var(--muted-2); }
.field-help code, .guide-col code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; background: var(--accent-soft); padding: .05em .4em; border-radius: 4px; color: var(--ink); }
.color-wrap { display: flex; align-items: center; gap: 10px; }
.color-wrap input[type="color"] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card-2); cursor: pointer; }
.color-wrap input:disabled { opacity: .4; }
.color-wrap code { font-size: 12px; }
.check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 2px; }
.check input { accent-color: var(--accent); }
.field-file { cursor: pointer; }
.field-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop { display: block; border: 1px dashed var(--line-strong); border-radius: 14px; padding: 22px; text-align: center; font-size: 13px; color: var(--muted); background: var(--card-2); transition: border-color .2s, background .2s; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.field-radios { border: 0; padding: 0; margin: 0; }
.field-radios legend { font-weight: 500; color: var(--ink); font-size: 13px; padding: 0; margin-bottom: 8px; }
.radio { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card-2); cursor: pointer; margin-bottom: 8px; transition: border-color .2s, background .2s; }
.radio:hover { border-color: var(--line-strong); }
.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio input { margin: 3px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.radio span { display: flex; flex-direction: column; gap: 2px; }
.radio b { font-size: 13.5px; font-weight: 600; color: var(--ink-strong); }
.radio small { font-size: 12px; line-height: 1.45; color: var(--muted); }

.manifest-box { border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; margin-top: 16px; background: var(--card-2); }
.manifest-box summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; }
.manifest-box summary::-webkit-details-marker { display: none; }
.manifest-box summary em { font-style: normal; font-size: 12px; color: var(--muted-2); flex: 1; min-width: 200px; }
.manifest-box summary::after { content: '+'; font-size: 18px; color: var(--muted-2); margin-left: auto; }
.manifest-box[open] summary::after { content: '-'; }
.manifest-box .tool-fields { border-top: 1px solid var(--line); }
.manifest-box .footnote { margin-bottom: 14px; }

.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.download-what { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.download-what li { padding-left: 14px; position: relative; }
.download-what li::before { content: ''; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.download-what b { color: var(--ink); font-weight: 600; }

/* Browser tab mock */
.tab-mock { background: #dee1e6; border-radius: 12px 12px 0 0; padding: 8px 8px 0; display: flex; gap: 4px; align-items: flex-end; }
.tab-mock-tab { display: flex; align-items: center; gap: 8px; background: #fff; color: #202124; border-radius: 8px 8px 0 0; padding: 9px 12px; font-size: 13px; min-width: 200px; }
.tab-mock-tab.dim { opacity: .55; min-width: 150px; }
.tab-mock-tab i { margin-left: auto; font-style: normal; opacity: .6; }
.tab-mock-tab canvas { width: 16px; height: 16px; flex-shrink: 0; }
.tab-dot { width: 14px; height: 14px; border-radius: 50%; background: currentColor; opacity: .3; }
:root[data-theme="dark"] .tab-mock { background: #202124; }
:root[data-theme="dark"] .tab-mock-tab { background: #35363a; color: #e8eaed; }

/* Size grid */
.preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.preview-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 10px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px; text-align: center; font-size: 11.5px; color: var(--muted); line-height: 1.35; min-height: 150px; }
#pv-32 { width: 32px; height: 32px; } #pv-48 { width: 48px; height: 48px; }
#pv-180 { width: 72px; height: 72px; border-radius: 16px; }
#pv-192 { width: 72px; height: 72px; border-radius: 50%; }

/* Phone mocks */
.phone-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.phone { background: #f2f2f7; border: 6px solid #1c1c1e; border-radius: 26px; padding: 10px 12px 14px; color: #1c1c1e; min-height: 236px; box-shadow: 0 16px 36px rgba(28,34,40,.15); }
.phone-status { display: flex; justify-content: space-between; font-size: 9px; font-weight: 600; opacity: .8; margin: 0 4px 12px; }
.phone-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 6px; }
.app { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 8.5px; text-align: center; }
.app span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app i, .app canvas { width: 40px; height: 40px; border-radius: 10px; display: block; }
.app.dim i { background: linear-gradient(145deg, #d9d9de, #bfbfc6); }
.app.dim span { opacity: .55; }
.app canvas { box-shadow: 0 4px 10px rgba(0,0,0,.25); }
.phone-dock { margin-top: 14px; display: flex; justify-content: space-around; background: rgba(0,0,0,.08); border-radius: 14px; padding: 8px; }
.phone-dock i { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(145deg, #d9d9de, #bfbfc6); }
.phone-browser { display: flex; flex-direction: column; }
.m-urlbar { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 7px 12px; font-size: 11px; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.m-urlbar canvas { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; }
.m-urlbar i { margin-left: auto; font-style: normal; opacity: .6; }
.m-page { flex: 1; padding: 14px 6px 8px; }
.m-page b { display: block; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.m-page i { display: block; height: 6px; border-radius: 4px; background: rgba(0,0,0,.1); margin: 6px 0; }
.m-page i.short { width: 60%; }
.m-tabs { display: flex; gap: 6px; border-top: 1px solid rgba(0,0,0,.1); padding-top: 8px; }
.m-tabs span { display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; background: rgba(0,0,0,.06); border-radius: 8px; padding: 6px 8px; }
.m-tabs span.dim { opacity: .5; }
.m-tabs canvas { width: 14px; height: 14px; border-radius: 3px; }
.preview-note { font-size: 11.5px; color: var(--muted-2); margin: 12px 0 0; line-height: 1.5; }
:root[data-theme="dark"] .phone { background: #0f1216; border-color: #2a2f36; color: #fff; box-shadow: 0 16px 36px rgba(0,0,0,.35); }
:root[data-theme="dark"] .app.dim i, :root[data-theme="dark"] .phone-dock i { background: linear-gradient(145deg, #3a4048, #262b31); }
:root[data-theme="dark"] .phone-dock { background: rgba(255,255,255,.08); }
:root[data-theme="dark"] .m-urlbar { background: #2b3138; box-shadow: none; }
:root[data-theme="dark"] .m-page i { background: rgba(255,255,255,.12); }
:root[data-theme="dark"] .m-tabs { border-top-color: rgba(255,255,255,.1); }
:root[data-theme="dark"] .m-tabs span { background: rgba(255,255,255,.1); }

/* Android previews */
.android-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.and-col b { display: block; font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.and-home, .and-splash, .and-switch { border-radius: 14px; height: 160px; overflow: hidden; border: 1px solid var(--line); }
.and-home { background: linear-gradient(160deg, #3a4bb5, #5b3de0); display: grid; grid-template-columns: 1fr 1fr; gap: 12px 8px; padding: 18px 14px; align-content: start; color: #fff; }
.and-home .app.dim i { background: rgba(255,255,255,.28); }
.and-home .app.dim span { opacity: .85; }
.and-home .app i, .and-home .app canvas, .and-icon-wrap { width: 40px; height: 40px; border-radius: 50%; }
.and-icon-wrap { display: grid; place-items: center; overflow: hidden; }
.and-icon-wrap canvas { width: 40px; height: 40px; }
.and-splash { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; position: relative; background: #fff; }
.and-splash canvas { width: 48px; height: 48px; }
.and-splash span { position: absolute; bottom: 10px; font-size: 10px; font-weight: 500; }
.and-status { position: absolute; top: 6px; left: 10px; font-size: 8px; font-weight: 600; color: #1c1c1e; opacity: .7; }
.and-status.light { color: #fff; }
.and-switch { position: relative; background: #3c3f44; padding: 24px 12px 0; }
.and-card { background: #fff; border-radius: 12px 12px 0 0; height: 100%; overflow: hidden; box-shadow: 0 -6px 20px rgba(0,0,0,.3); }
.and-card-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 10px; font-weight: 600; }
.and-card-bar canvas { width: 20px; height: 20px; border-radius: 50%; }
.and-card-body { padding: 12px 10px; }
.and-card-body i { display: block; height: 6px; border-radius: 3px; background: #e5e7eb; margin-bottom: 8px; }
.and-card-body i:last-child { width: 60%; }

/* Google result mock (always light, like Google) */
.serp-mock { background: #fff; border: 1px solid #e3e3e3; border-radius: 14px; padding: 14px 16px; color: #1f1f1f; font-family: Arial, Helvetica, sans-serif; }
.serp-top { display: flex; align-items: center; gap: 14px; }
.g-logo { width: 74px; height: 24px; flex-shrink: 0; }
.serp-search { flex: 1; display: flex; align-items: center; gap: 8px; border: 1px solid #dfe1e5; border-radius: 999px; padding: 7px 14px; font-size: 13px; color: #1f1f1f; box-shadow: 0 1px 4px rgba(32,33,36,.12); }
.serp-search svg { margin-left: auto; width: 16px; height: 16px; color: #4285F4; }
.serp-tabs { display: flex; gap: 16px; font-size: 11.5px; color: #5f6368; border-bottom: 1px solid #e3e3e3; margin: 12px 0 14px; }
.serp-tabs span { padding-bottom: 8px; }
.serp-tabs .on { color: #1a0dab; border-bottom: 3px solid #1a0dab; font-weight: 600; }
.serp-site { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.serp-fav { width: 26px; height: 26px; border-radius: 50%; background: #f1f3f4; border: 1px solid #e3e3e3; display: grid; place-items: center; overflow: hidden; }
.serp-fav canvas { width: 18px; height: 18px; }
.serp-site b { display: block; font-size: 13.5px; font-weight: 400; color: #202124; }
.serp-site small { font-size: 11.5px; color: #4d5156; }
.serp-title { display: block; font-size: 17px; color: #1a0dab; margin: 2px 0 4px; line-height: 1.3; }
.serp-snippet { font-size: 12.5px; line-height: 1.55; color: #4d5156; margin: 0; }

/* Guide cards */
.guide-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.guide-col { font-size: 14px; color: var(--muted); }
.guide-col h3 { font-size: 20px; margin-top: 12px; margin-bottom: 8px; }
.guide-col ol { padding-left: 20px; margin: 0; }
.guide-col li { margin: 6px 0; line-height: 1.6; }
.guide-col b { color: var(--ink); font-weight: 600; }
.snippet { background: #1c2228; color: #e8ff75; border-radius: 12px; padding: 14px 16px; font-size: 12.5px; line-height: 1.6; overflow-x: auto; margin: 12px 0; white-space: pre; font-family: ui-monospace, Menlo, Consolas, monospace; }
:root[data-theme="dark"] .snippet { background: #000; border: 1px solid var(--line); }

@media (max-width: 1000px) { .what-grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 900px) { .tool, .guide-cols { grid-template-columns: 1fr; } .tool-intro-row { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .what-grid { grid-template-columns: 1fr; } .what-grid .card, .what-grid .card:nth-child(-n+2) { grid-column: span 1; } }
@media (max-width: 600px) { .tool-fields { grid-template-columns: 1fr; } .preview-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .mode-cards { grid-template-columns: 1fr; } .step-label em { display: none; } }
@media (max-width: 520px) { .android-row { grid-template-columns: 1fr; } .and-home, .and-splash, .and-switch { height: 140px; } }
@media (max-width: 480px) { .phone-row { grid-template-columns: 1fr; } .serp-top { flex-wrap: wrap; } .serp-tabs { gap: 10px; } .tool-panel { padding: 18px; } }
