:root {
    color-scheme: light;
    --paper: #f4f1e8;
    --paper-deep: #e9e4d6;
    --surface: #fffdf7;
    --surface-strong: #ffffff;
    --ink: #173b3f;
    --ink-soft: #4f6667;
    --line: #cec9bc;
    --line-strong: #173b3f;
    --mint: #a9dfd0;
    --mint-deep: #79cbb8;
    --coral: #ff7657;
    --coral-soft: #ffe0d7;
    --yellow: #f4cf64;
    --shadow: 0 18px 50px rgba(23, 59, 63, .10);
    --radius-lg: 24px;
    --radius-md: 16px;
    --shell: min(1180px, calc(100% - 40px));
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --paper: #10272a;
    --paper-deep: #0b1e20;
    --surface: #173236;
    --surface-strong: #1b3a3e;
    --ink: #eff8f3;
    --ink-soft: #b7cac6;
    --line: #365257;
    --line-strong: #d9ede5;
    --mint: #70c7b4;
    --mint-deep: #98ddcd;
    --coral: #ff8c70;
    --coral-soft: #4a2a27;
    --yellow: #e8c45c;
    --shadow: 0 22px 55px rgba(0, 0, 0, .24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    min-width: 320px;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 5%, rgba(169, 223, 208, .34), transparent 28rem),
        radial-gradient(circle at 92% 16%, rgba(255, 118, 87, .12), transparent 23rem),
        var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

button, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }

svg {
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.shell { width: var(--shell); margin-inline: auto; }
.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-link { position: fixed; z-index: 100; top: 10px; left: 10px; transform: translateY(-160%); padding: 9px 14px; border-radius: 8px; color: var(--surface); background: var(--ink); }
.skip-link:focus { transform: translateY(0); }

.site-header {
    position: relative;
    z-index: 10;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
    background: color-mix(in srgb, var(--paper) 82%, transparent);
    backdrop-filter: blur(16px);
}

.header-inner { min-height: 84px; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; text-decoration: none; }
.brand-mark { position: relative; width: 44px; height: 44px; display: grid; place-items: center; color: var(--surface); background: var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--mint); }
.brand-mark::after { content: ""; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border: 3px solid var(--paper); border-radius: 50%; background: var(--coral); }
.brand-mark svg { width: 27px; height: 27px; stroke-width: 2.4; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-family: Georgia, "Times New Roman", serif; font-size: 21px; letter-spacing: -.02em; }
.brand-copy small { margin-top: 4px; color: var(--ink-soft); font-size: 11px; letter-spacing: .16em; }

.main-nav { display: flex; align-items: center; gap: 7px; }
.main-nav a { position: relative; padding: 9px 13px; border-radius: 10px; color: var(--ink-soft); font-size: 14px; font-weight: 650; text-decoration: none; transition: color .2s, background .2s, transform .2s; }
.main-nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--mint) 25%, transparent); }
.main-nav a[aria-current="page"] { color: var(--ink); }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--coral); }

.icon-button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer; transition: transform .2s, border-color .2s, background .2s; }
.icon-button:hover { transform: translateY(-2px); border-color: var(--ink); background: var(--mint); }
.icon-button svg { width: 19px; height: 19px; }
.moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }

.tool-intro { display: grid; grid-template-columns: 1.25fr .75fr; gap: 80px; align-items: end; padding-top: 62px; padding-bottom: 34px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--ink-soft); font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px color-mix(in srgb, var(--coral) 18%, transparent); }
.tool-intro h1 { max-width: 720px; margin: 0; font-family: Georgia, "Songti SC", "STSong", serif; font-size: clamp(40px, 5vw, 68px); font-weight: 700; line-height: 1.05; letter-spacing: -.045em; }
.tool-intro h1 em { position: relative; color: var(--coral); font-style: italic; font-weight: 500; }
.tool-intro h1 em::after { content: ""; position: absolute; left: 2px; right: -4px; bottom: -5px; height: 8px; opacity: .75; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10'%3E%3Cpath d='M2 7 Q25 2 49 6 T98 4' fill='none' stroke='%23ff7657' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.tool-intro > p { max-width: 440px; margin: 0 0 5px; padding-left: 24px; border-left: 2px solid var(--mint-deep); color: var(--ink-soft); font-size: 15px; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(310px, .85fr); overflow: hidden; border: 1.5px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.workspace-main { padding: 28px; }
.workspace-side { border-left: 1px solid var(--line); background: color-mix(in srgb, var(--paper-deep) 42%, var(--surface)); }
.side-section { padding: 28px; }
.panel-heading { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.panel-heading > div { display: flex; align-items: center; gap: 11px; }
.panel-heading h2 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.step-number { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--ink); font: 700 10px/1 ui-monospace, monospace; }
.shortcut { color: var(--ink-soft); font-size: 11px; }
kbd { min-width: 20px; display: inline-block; padding: 2px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; color: var(--ink-soft); background: var(--paper); font: 600 10px/1.2 ui-monospace, monospace; text-align: center; }

.editor-wrap { overflow: hidden; border: 1.5px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-strong); transition: box-shadow .2s, transform .2s; }
.editor-wrap:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint) 45%, transparent); }
.editor-topline { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 14px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 76%, var(--surface)); }
.editor-topline span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.editor-topline span:first-child { background: var(--coral); }
.editor-topline span:nth-child(2) { background: var(--yellow); }
.editor-topline span:nth-child(3) { background: var(--mint-deep); }
.editor-topline b { margin-left: 6px; color: var(--ink-soft); font: 600 11px/1 ui-monospace, monospace; }

#url-input { width: 100%; min-height: 272px; display: block; resize: vertical; padding: 20px 21px; border: 0; outline: 0; color: var(--ink); background: transparent; font: 500 14px/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
#url-input::placeholder { color: color-mix(in srgb, var(--ink-soft) 52%, transparent); }
.editor-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; padding: 9px 11px; border-top: 1px solid var(--line); }
.text-button { padding: 7px 9px; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 7px; color: var(--ink-soft); background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.text-button:hover { color: var(--ink); background: var(--paper); }
.text-button svg { width: 15px; height: 15px; }
.text-button.danger-text:hover { color: var(--coral); background: var(--coral-soft); }
.field-help { margin: 10px 2px 0; color: var(--ink-soft); font-size: 12px; }
.field-help code { color: var(--ink); }

.primary-actions { display: grid; grid-template-columns: auto minmax(190px, .6fr); justify-content: end; gap: 10px; margin-top: 22px; }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 19px; border: 1.5px solid var(--line-strong); border-radius: 12px; font-size: 14px; font-weight: 800; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s, color .18s; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button svg { width: 19px; height: 19px; }
.button-primary { color: var(--surface); background: var(--ink); box-shadow: 4px 4px 0 var(--coral); }
.button-primary:hover { box-shadow: 2px 2px 0 var(--coral); }
[data-theme="dark"] .button-primary { color: var(--paper-deep); background: var(--mint-deep); }
.button-secondary { color: var(--ink); background: transparent; }
.button-secondary:hover { background: var(--mint); }
.button-ghost { min-height: 44px; border-color: var(--line); background: transparent; font-size: 12px; }
.button-ghost:hover { border-color: var(--ink); background: var(--surface); }
.button-cancel { margin-top: 9px; color: var(--coral); }
.button-cancel[hidden] { display: none; }
.button:disabled { cursor: not-allowed; opacity: .45; }
.full-width { width: 100%; }

.compact-heading { margin-bottom: 20px; }
.select-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink-soft); background: var(--surface); font-size: 12px; font-weight: 700; }
.select-label + .select-label { margin-top: 9px; }
.select-wrap { position: relative; }
.select-wrap select { min-width: 118px; appearance: none; padding: 6px 28px 6px 10px; border: 0; border-radius: 7px; outline: 0; color: var(--ink); background: var(--paper); font-size: 12px; font-weight: 800; cursor: pointer; }
.select-wrap svg { position: absolute; pointer-events: none; top: 50%; right: 8px; width: 14px; height: 14px; transform: translateY(-50%); }
.setting-note { margin: 9px 3px 0; color: var(--ink-soft); font-size: 10px; line-height: 1.5; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }
.stat-card { min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.stat-card span { color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.stat-card strong { font: 700 28px/1 Georgia, serif; }
.accent-card { background: var(--mint); }
.warning-card { background: var(--coral-soft); }
[data-theme="dark"] .accent-card strong, [data-theme="dark"] .warning-card strong { color: #173b3f; }
.progress-block { padding: 18px 0 20px; }
.progress-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; color: var(--ink-soft); font-size: 11px; }
.progress-label strong { color: var(--ink); }
.progress-track { height: 8px; overflow: hidden; border-radius: 10px; background: var(--line); }
.progress-track span { width: 0; height: 100%; display: block; border-radius: inherit; background: var(--coral); transition: width .35s ease; }
.privacy-note { display: flex; gap: 12px; padding: 20px 28px 23px; border-top: 1px solid var(--line); background: var(--ink); color: var(--paper); }
.privacy-note > svg { flex: 0 0 auto; width: 25px; height: 25px; color: var(--mint); }
.privacy-note strong { font-size: 12px; }
.privacy-note p { margin: 4px 0 0; opacity: .72; font-size: 11px; line-height: 1.55; }
[data-theme="dark"] .privacy-note { background: var(--paper-deep); }

.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding-top: 34px; padding-bottom: 80px; }
.trust-strip > div { position: relative; padding: 15px 28px 15px 65px; border-right: 1px solid var(--line); }
.trust-strip > div:first-child { padding-left: 52px; }
.trust-strip > div:last-child { border-right: 0; }
.trust-strip span { position: absolute; top: 18px; left: 25px; color: var(--coral); font: italic 700 13px/1 Georgia, serif; }
.trust-strip > div:first-child span { left: 8px; }
.trust-strip strong { display: block; font-size: 13px; }
.trust-strip p { margin: 4px 0 0; color: var(--ink-soft); font-size: 11px; }

.toast { position: fixed; z-index: 50; left: 50%; bottom: 26px; max-width: min(480px, calc(100% - 32px)); padding: 12px 17px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--surface); background: var(--ink); box-shadow: var(--shadow); font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Content pages */
.page-hero { padding-top: 70px; padding-bottom: 58px; }
.page-hero h1, .not-found h1 { max-width: 900px; margin: 0; font-family: Georgia, "Songti SC", "STSong", serif; font-size: clamp(44px, 6vw, 78px); line-height: 1.02; letter-spacing: -.05em; }
.page-hero h1 em, .not-found h1 em { color: var(--coral); font-style: italic; font-weight: 500; }
.page-hero > p { max-width: 590px; margin: 24px 0 0; color: var(--ink-soft); font-size: 16px; }

.content-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 74px; align-items: start; padding-bottom: 86px; }
.content-index { position: sticky; top: 28px; display: flex; flex-direction: column; gap: 3px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: color-mix(in srgb, var(--surface) 75%, transparent); }
.content-index span { margin-bottom: 8px; color: var(--coral); font: 800 9px/1.2 ui-monospace, monospace; letter-spacing: .16em; }
.content-index a { padding: 8px 9px; border-radius: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 700; text-decoration: none; }
.content-index a:hover { color: var(--ink); background: var(--mint); }

.faq-list { min-width: 0; }
.faq-group { scroll-margin-top: 25px; margin-bottom: 48px; }
.faq-group:last-child { margin-bottom: 0; }
.faq-group-title { display: flex; align-items: baseline; gap: 15px; margin-bottom: 13px; }
.faq-group-title span { color: var(--coral); font: italic 700 13px/1 Georgia, serif; }
.faq-group-title h2 { margin: 0; font-size: 18px; }
.faq-group details { border-top: 1px solid var(--line); background: transparent; }
.faq-group details:last-child { border-bottom: 1px solid var(--line); }
.faq-group summary { position: relative; padding: 20px 44px 20px 1px; list-style: none; font-size: 14px; font-weight: 780; cursor: pointer; }
.faq-group summary::-webkit-details-marker { display: none; }
.faq-group summary::before, .faq-group summary::after { content: ""; position: absolute; top: 50%; right: 8px; width: 13px; height: 1.5px; border-radius: 2px; background: var(--ink); transition: transform .2s; }
.faq-group summary::after { transform: rotate(90deg); }
.faq-group details[open] summary::after { transform: rotate(0); }
.faq-group details > div { padding: 0 44px 22px 1px; color: var(--ink-soft); font-size: 13px; }
.faq-group details p { max-width: 720px; margin: 0; }
.faq-group details ol { margin: 0; padding-left: 20px; }
.faq-group details li { margin-bottom: 6px; }
.tip-box { display: flex; align-items: center; gap: 12px; max-width: 650px; margin-top: 15px; padding: 11px 13px; border-radius: 9px; background: var(--mint); color: #173b3f; }
.tip-box strong { flex: 0 0 auto; padding: 2px 7px; border: 1px solid rgba(23, 59, 63, .4); border-radius: 5px; font-size: 10px; }
.tip-box span { font-size: 12px; }

.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 40px; margin-bottom: 80px; padding: 33px 38px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--mint); color: #173b3f; box-shadow: 7px 7px 0 var(--ink); }
.cta-band > div > span { font: 800 10px/1 ui-monospace, monospace; letter-spacing: .1em; }
.cta-band h2 { margin: 8px 0 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(23px, 3vw, 33px); line-height: 1.18; }
.cta-band .button { flex: 0 0 auto; color: #fffdf7; }

.contact-hero { display: grid; grid-template-columns: 1fr; }
.contact-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 15px; padding-bottom: 90px; }
.contact-card { position: relative; min-height: 270px; padding: 30px; overflow: hidden; border: 1.5px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); }
.contact-card-main { grid-row: span 2; min-height: 555px; display: flex; flex-direction: column; justify-content: flex-end; background: var(--mint); color: #173b3f; }
.contact-card-main::after { content: "@"; position: absolute; top: -56px; right: -15px; opacity: .12; font: italic 700 250px/.9 Georgia, serif; }
.contact-icon { position: absolute; z-index: 1; top: 30px; left: 30px; width: 56px; height: 56px; display: grid; place-items: center; border: 1.5px solid #173b3f; border-radius: 16px; background: #fffdf7; }
.contact-icon svg { width: 27px; height: 27px; }
.card-kicker { position: relative; z-index: 1; color: var(--coral); font: 800 10px/1.2 ui-monospace, monospace; letter-spacing: .14em; }
.contact-card-main .card-kicker { color: #173b3f; opacity: .65; }
.contact-card h2 { position: relative; z-index: 1; margin: 13px 0 10px; font-family: Georgia, "Songti SC", serif; font-size: 28px; line-height: 1.12; }
.contact-card-main h2 { font-size: clamp(36px, 4vw, 52px); }
.contact-card p { position: relative; z-index: 1; max-width: 510px; margin: 0; color: var(--ink-soft); font-size: 13px; }
.contact-card-main p { color: rgba(23, 59, 63, .75); }
.contact-address { position: relative; z-index: 1; align-self: flex-start; display: inline-flex; align-items: center; gap: 12px; margin-top: 31px; padding-bottom: 5px; border-bottom: 1.5px solid #173b3f; font: 800 clamp(15px, 2.5vw, 22px)/1.3 ui-monospace, monospace; text-decoration: none; }
.contact-address svg { width: 20px; height: 20px; transition: transform .2s; }
.contact-address:hover svg { transform: translateX(4px); }
.inline-link { display: inline-flex; gap: 7px; margin-top: 22px; color: var(--ink); font-size: 12px; font-weight: 800; text-decoration: none; }
.inline-link:hover { color: var(--coral); }
.inline-text-link { color: var(--ink); font-weight: 750; text-underline-offset: 3px; }
.inline-text-link:hover { color: var(--coral); }

.legal-hero { padding-bottom: 48px; }
.policy-date { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); background: color-mix(in srgb, var(--surface) 78%, transparent); font: 650 11px/1.2 ui-monospace, monospace; }
.policy-date strong { color: var(--ink); }
.legal-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 74px; align-items: start; padding-bottom: 90px; }
.legal-sidebar { position: sticky; top: 26px; }
.legal-sidebar .content-index { position: static; }
.legal-callout { margin-top: 13px; padding: 18px; border: 1px solid var(--line-strong); border-radius: 15px; color: #173b3f; background: var(--mint); box-shadow: 4px 4px 0 var(--ink); }
.legal-callout-coral { background: var(--coral-soft); }
.legal-callout strong { display: block; font-size: 12px; }
.legal-callout p { margin: 7px 0 0; font-size: 11px; line-height: 1.55; }
.legal-document { min-width: 0; max-width: 790px; }
.legal-document section { position: relative; scroll-margin-top: 30px; padding: 0 0 38px 52px; margin-bottom: 38px; border-bottom: 1px solid var(--line); }
.legal-document section:last-child { margin-bottom: 0; border-bottom: 0; }
.legal-number { position: absolute; top: 5px; left: 0; color: var(--coral); font: italic 700 13px/1 Georgia, serif; }
.legal-document h2 { margin: 0 0 15px; font-family: Georgia, serif; font-size: clamp(24px, 3vw, 34px); line-height: 1.15; letter-spacing: -.025em; }
.legal-document p, .legal-document li { color: var(--ink-soft); font-size: 14px; line-height: 1.78; }
.legal-document p { margin: 0 0 13px; }
.legal-document p:last-child { margin-bottom: 0; }
.legal-document ul { margin: 0 0 14px; padding-left: 20px; list-style: disc; }
.legal-document li { padding-left: 4px; margin-bottom: 7px; }
.legal-document strong { color: var(--ink); }
.legal-document a { color: var(--ink); font-weight: 750; text-underline-offset: 3px; }
.legal-document a:hover { color: var(--coral); }

.not-found { min-height: 640px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding-top: 70px; padding-bottom: 100px; }
.error-code { display: block; margin-bottom: 22px; color: var(--coral); font: italic 700 18px/1 Georgia, serif; letter-spacing: .1em; }
.not-found p { max-width: 540px; margin: 25px 0 30px; color: var(--ink-soft); }
.not-found .button { text-decoration: none; }

.site-footer { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--paper-deep) 48%, transparent); }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; padding-top: 38px; padding-bottom: 28px; }
.footer-brand { font: 700 18px/1 Georgia, serif; text-decoration: none; }
.footer-inner p { margin: 8px 0 0; color: var(--ink-soft); font-size: 12px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 20px; }
.footer-links a { color: var(--ink-soft); font-size: 12px; font-weight: 700; text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 16px; padding-bottom: 22px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 10px; letter-spacing: .06em; }

@media (max-width: 900px) {
    :root { --shell: min(100% - 28px, 720px); }
    .header-inner { min-height: 72px; }
    .brand-copy small { display: none; }
    .main-nav a { padding-inline: 9px; }
    .tool-intro { grid-template-columns: 1fr; gap: 24px; padding-top: 44px; }
    .tool-intro > p { max-width: 620px; }
    .workspace { grid-template-columns: 1fr; }
    .workspace-side { border-top: 1px solid var(--line); border-left: 0; }
    .trust-strip { padding-bottom: 58px; }
    .content-layout { grid-template-columns: 1fr; gap: 30px; }
    .content-index { position: static; display: grid; grid-template-columns: repeat(4, 1fr); }
    .content-index span { grid-column: 1 / -1; }
    .contact-grid { grid-template-columns: 1fr; }
    .contact-card-main { grid-row: auto; min-height: 480px; }
    .legal-layout { grid-template-columns: 1fr; gap: 34px; }
    .legal-sidebar { position: static; }
    .legal-sidebar .content-index { display: flex; overflow-x: auto; flex-direction: row; padding: 10px; }
    .legal-sidebar .content-index span { display: none; }
    .legal-sidebar .content-index a { flex: 0 0 auto; }
    .legal-callout { max-width: 520px; }
}

@media (max-width: 640px) {
    :root { --shell: calc(100% - 22px); --radius-lg: 18px; }
    .header-inner { gap: 11px; }
    .brand { margin-right: auto; }
    .brand-mark { width: 39px; height: 39px; border-radius: 12px; }
    .brand-copy { display: none; }
    .main-nav { gap: 0; }
    .main-nav a { padding: 7px 6px; font-size: 11px; white-space: nowrap; }
    .main-nav a[aria-current="page"]::after { left: 6px; right: 6px; }
    .icon-button { width: 38px; height: 38px; }
    .tool-intro { gap: 18px; padding-top: 34px; padding-bottom: 25px; }
    .tool-intro h1 { font-size: clamp(37px, 12vw, 52px); }
    .tool-intro > p { padding-left: 15px; font-size: 13px; }
    .workspace-main, .side-section { padding: 19px; }
    .shortcut { display: none; }
    #url-input { min-height: 230px; padding: 17px; font-size: 13px; }
    .editor-actions { justify-content: flex-start; }
    .editor-actions .danger-text { margin-left: auto; }
    .primary-actions { grid-template-columns: 1fr; }
    .button { width: 100%; }
    .privacy-note { padding: 18px 20px; }
    .trust-strip { grid-template-columns: 1fr; padding-top: 25px; }
    .trust-strip > div, .trust-strip > div:first-child { padding: 15px 15px 15px 55px; border-right: 0; border-bottom: 1px solid var(--line); }
    .trust-strip > div:last-child { border-bottom: 0; }
    .trust-strip span, .trust-strip > div:first-child span { left: 14px; }
    .footer-inner, .footer-bottom { flex-direction: column; }
    .footer-links { justify-content: flex-start; }
    .footer-bottom { gap: 5px; }
    .page-hero { padding-top: 42px; padding-bottom: 38px; }
    .page-hero h1, .not-found h1 { font-size: clamp(40px, 13vw, 58px); }
    .page-hero > p { font-size: 14px; }
    .content-layout { padding-bottom: 56px; }
    .content-index { display: flex; overflow-x: auto; flex-direction: row; padding: 10px; }
    .content-index span { display: none; }
    .content-index a { flex: 0 0 auto; }
    .faq-group { margin-bottom: 36px; }
    .faq-group details > div { padding-right: 18px; }
    .cta-band { align-items: stretch; flex-direction: column; margin-bottom: 55px; padding: 25px; }
    .cta-band .button { width: 100%; }
    .contact-grid { padding-bottom: 60px; }
    .contact-card { min-height: 240px; padding: 23px; }
    .contact-card-main { min-height: 430px; }
    .contact-icon { top: 23px; left: 23px; }
    .not-found { min-height: 560px; }
    .legal-hero { padding-bottom: 34px; }
    .legal-layout { padding-bottom: 60px; }
    .legal-document section { padding: 0 0 30px 38px; margin-bottom: 31px; }
    .legal-document h2 { font-size: 25px; }
    .legal-document p, .legal-document li { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
