/* Psville — utility look: cool grey ground, white working surfaces, one blue accent, warm orange only for "attention" (hover-to-edit, popular badges). */
:root {
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #F1F3F6;
  --ink: #15171C;
  --muted: #555C6A;
  --line: #E3E6EB;
  --line-strong: #CDD2DA;
  --accent: #025BF1;
  --accent-hover: #0149C4;
  --accent-ink: #FFFFFF;
  --accent-soft: #E6EFFE;
  --accent-text: #0042B8;
  --warm: #E8590C;
  --warm-soft: #FDEBDD;
  --warm-text: #8A3A0A;
  --ok: #1D7048;
  --ok-soft: #E3F4EA;
  --danger: #B42318;
  --danger-soft: #FDECEA;
  --stage: #E7EAEE;
  --ad-bg: #EEF0F3;
  --shadow: 0 1px 2px rgba(20, 23, 28, 0.08), 0 6px 20px rgba(20, 23, 28, 0.06);
  --font-display: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1115; --surface: #171A20; --surface-2: #1F232B; --ink: #E9EBEF; --muted: #A6ACB8;
    --line: #2A2F38; --line-strong: #3B414D; --accent: #7397F5; --accent-hover: #8EAAF7; --accent-ink: #0B1020;
    --accent-soft: #1C2847; --accent-text: #AFC3FA; --warm: #F28A4B; --warm-soft: #3A2416; --warm-text: #F6B48A;
    --ok: #57C994; --ok-soft: #12301F; --danger: #F97066; --danger-soft: #3A1714; --stage: #0B0D11; --ad-bg: #1A1E25;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1115; --surface: #171A20; --surface-2: #1F232B; --ink: #E9EBEF; --muted: #A6ACB8;
  --line: #2A2F38; --line-strong: #3B414D; --accent: #7397F5; --accent-hover: #8EAAF7; --accent-ink: #0B1020;
  --accent-soft: #1C2847; --accent-text: #AFC3FA; --warm: #F28A4B; --warm-soft: #3A2416; --warm-text: #F6B48A;
  --ok: #57C994; --ok-soft: #12301F; --danger: #F97066; --danger-soft: #3A1714; --stage: #0B0D11; --ad-bg: #1A1E25;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--font-body); }
img, canvas, svg { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--accent-text); }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--surface); padding: 10px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 12px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); }
.brand-name { font: 800 21px/1 var(--font-display); letter-spacing: -0.015em; }
.brand-logo { width: 34px; height: 34px; display: block; object-fit: contain; }
.chip-links { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface, #fff); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.chip-link:hover { border-color: var(--accent); color: var(--accent-text); }
.content section + section { margin-top: 36px; }
.main-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.main-nav a:hover { background: var(--surface-2); }
.header-end { display: flex; align-items: center; gap: 8px; }
.privacy-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 600; }

.header-end { flex-wrap: wrap; justify-content: flex-end; }
.theme-btn > span { display: none; }
.theme-btn[data-mode="light"] .i-light, .theme-btn[data-mode="dark"] .i-dark, .theme-btn[data-mode="system"] .i-system { display: grid; place-items: center; }
.auth-tabs { align-self: flex-start; }
.btn-google { width: 100%; }
.or-line { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font: 600 15px/1 var(--font-body); cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; border-radius: 12px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn-icon { width: 44px; padding: 0; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-text); text-decoration: underline; cursor: pointer; }

/* Hero + dropzone */
.hero { padding-block: 56px 28px; text-align: center; }
.hero .wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.hero h1 { font-weight: 800; font-size: clamp(32px, 5vw, 54px); line-height: 1.07; letter-spacing: -0.025em; max-width: 820px; }
.lead { font-size: 18px; color: var(--muted); max-width: 640px; }
.dropzone { width: 100%; max-width: 760px; margin-top: 10px; padding: 36px 20px; border: 2px dashed var(--line-strong); border-radius: 18px; background: var(--surface); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; transition: border-color .15s, background-color .15s; }
.dropzone.is-drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.dropzone-title { font: 700 20px/1.3 var(--font-display); }
.dropzone-hint { font-size: 13px; color: var(--muted); }
.dropzone-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.chooser { width: 100%; max-width: 760px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }

/* Ads — every slot reserves its height so pages don't jump (CLS) */
.ad-slot { display: flex; align-items: center; justify-content: center; margin-inline: auto; width: 100%; overflow: hidden; }
.ad-slot[data-size="leaderboard"] { max-width: 970px; min-height: 100px; }
.ad-slot[data-size="rect"] { max-width: 336px; min-height: 280px; }
.ad-slot[data-size="wide"] { max-width: 970px; min-height: 250px; }
.ad-slot.is-placeholder { border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--ad-bg); color: var(--muted); font-size: 13px; letter-spacing: .02em; }
.ad-band { padding-block: 16px; }

/* Tool grid */
.section { padding-block: 40px 8px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 18px; }
.section-head h2 { font-weight: 800; font-size: 28px; }
.section-head span { font-size: 14px; color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tool-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.tool-card:hover { border-color: var(--accent); box-shadow: var(--shadow); color: var(--ink); }
.tool-card.is-featured { border: 2px solid var(--accent); padding: 17px; }
.tool-card.is-soon { background: transparent; border-style: dashed; }
.tool-card.is-soon .tool-icon { background: var(--surface-2); color: var(--muted); }
.tool-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tool-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); flex: none; }
.tool-card.is-featured .tool-icon { background: var(--accent); color: var(--accent-ink); }
.tool-title { font: 700 17px/1.3 var(--font-display); }
.tool-desc { font-size: 14px; line-height: 1.5; color: var(--muted); }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-warm { background: var(--warm-soft); color: var(--warm-text); }
.badge-blue { background: var(--accent-soft); color: var(--accent-text); }
.badge-soon { background: var(--surface-2); color: var(--muted); }

.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.trust-item { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.trust-item h3 { font-size: 17px; }
.trust-item p { font-size: 14px; color: var(--muted); }

/* Footer */
.site-footer { margin-top: 56px; background: var(--surface); border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-block: 20px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 2px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--muted); text-decoration: none; font-size: 14px; }
.site-footer a:hover { color: var(--ink); }
.site-footer small { font-size: 14px; color: var(--muted); }

/* Tool page */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.tool-head { padding-block: 28px 18px; }
.tool-head .wrap { display: flex; flex-direction: column; gap: 10px; }
.tool-head h1 { font-weight: 800; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
.tool-head .lead { font-size: 17px; }
.workspace { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.workspace .dropzone { max-width: none; margin: 0; }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.file-row.is-dragging { opacity: .5; }
.file-row.is-over { border-color: var(--accent); }
.file-thumb { width: 52px; height: 52px; flex: none; border-radius: 8px; background: var(--surface-2); object-fit: cover; display: grid; place-items: center; color: var(--muted); }
.file-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-sub { font-size: 13px; color: var(--muted); }
.file-actions { display: flex; gap: 2px; flex: none; }
.drag-handle { cursor: grab; color: var(--muted); display: grid; place-items: center; width: 28px; height: 44px; flex: none; }
.options { display: flex; flex-wrap: wrap; gap: 14px 24px; padding-top: 4px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .field-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.select, .input { min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font: 500 15px var(--font-body); }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.segmented button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 500 14px var(--font-body); cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(20, 23, 28, .12); }
.action-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.action-bar .status { font-size: 14px; color: var(--muted); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.notice-error { background: var(--danger-soft); color: var(--danger); }
.notice-ok { background: var(--ok-soft); color: var(--ok); }
.notice-info { background: var(--accent-soft); color: var(--accent-text); }

.content { padding-block: 40px 0; }
.content .wrap-narrow { display: flex; flex-direction: column; gap: 36px; }
.content h2 { font-size: 24px; font-weight: 800; margin-bottom: 12px; }
.content p { color: var(--muted); max-width: 68ch; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; color: var(--muted); }
.steps li::before { content: counter(s); flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font: 700 14px var(--font-display); }
.steps strong { color: var(--ink); }
.faq { display: flex; flex-direction: column; gap: 8px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style-position: inside; min-height: 44px; }
.faq details p { padding: 0 16px 16px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }

/* Toast + modal */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 14px; box-shadow: var(--shadow); }
dialog.sheet { border: 0; padding: 0; border-radius: 18px; width: min(460px, calc(100% - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog.sheet::backdrop { background: rgba(15, 17, 21, .5); }
.sheet-body { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.sheet-body h2 { font-size: 22px; font-weight: 800; }
.sheet-body p { color: var(--muted); font-size: 15px; }
.perks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.perks li { display: flex; gap: 8px; align-items: center; }
.perks svg { color: var(--accent); flex: none; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.fine { font-size: 12px; color: var(--muted); }

/* Policy pages */
.policy { padding-block: 32px 0; }
.policy .wrap-narrow { display: flex; flex-direction: column; gap: 18px; }
.policy h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.policy h2 { font-size: 20px; font-weight: 800; margin-top: 12px; }
.policy p, .policy li { color: var(--muted); max-width: 70ch; }
.policy ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.region-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.template-note { padding: 12px 14px; border-radius: 12px; background: var(--warm-soft); color: var(--warm-text); font-size: 14px; }

@media (max-width: 640px) {
  .privacy-pill { display: none; }
  .main-nav a { padding: 0 10px; font-size: 14px; }
  .site-header .wrap { padding-block: 6px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
