/* Submitle design system. Colors live in tokens so light and dark stay in sync. */

:root {
    color-scheme: light;
    --bg: #fafafc;
    --surface: #ffffff;
    --surface-2: #f3f3f8;
    --text: #0b0f33;
    --text-2: #50546e;
    --text-3: #6d7088;
    --line: #e4e4ee;
    --line-strong: #cfcfde;
    --brand: #4f46e5;
    --brand-hover: #4338ca;
    --brand-text: #4338ca;
    --brand-soft: #eeedfd;
    --on-brand: #ffffff;
    --solid: #0b0f33;
    --solid-hover: #23284f;
    --on-solid: #ffffff;
    --danger: #b4233c;
    --danger-soft: #fdeef0;
    --success: #0f7a55;
    --success-soft: #e4f6ef;
    --glow: rgba(79, 70, 229, .13);
    --grid: rgba(11, 15, 51, .055);
    --shadow-sm: 0 1px 2px rgba(11, 15, 51, .05);
    --shadow-md: 0 1px 2px rgba(11, 15, 51, .04), 0 10px 28px -12px rgba(11, 15, 51, .16);
    --shadow-lg: 0 24px 64px -16px rgba(11, 15, 51, .32);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --width: 1120px;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0a0b16;
    --surface: #12131f;
    --surface-2: #1b1c2b;
    --text: #f2f2f9;
    --text-2: #aeb0c6;
    --text-3: #8d90a9;
    --line: #25263a;
    --line-strong: #383a54;
    --brand: #6d64f5;
    --brand-hover: #8279f8;
    --brand-text: #a9a4fb;
    --brand-soft: #1f1e42;
    --on-brand: #ffffff;
    --solid: #f2f2f9;
    --solid-hover: #d9d9e8;
    --on-solid: #0b0f33;
    --danger: #ff8a9b;
    --danger-soft: #35161e;
    --success: #5ad6a8;
    --success-soft: #10291f;
    --glow: rgba(109, 100, 245, .2);
    --grid: rgba(255, 255, 255, .045);
    --shadow-sm: none;
    --shadow-md: 0 12px 30px -14px rgba(0, 0, 0, .7);
    --shadow-lg: 0 28px 70px -16px rgba(0, 0, 0, .8);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }

body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
ul, ol { padding: 0; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.icon { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
}

.container { width: 100%; max-width: var(--width); margin-inline: auto; padding-inline: 24px; }
.container-narrow { max-width: 760px; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(170%) blur(14px);
    -webkit-backdrop-filter: saturate(170%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.site-header .container { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 19px; font-weight: 700; letter-spacing: -.03em; }
.brand-mark {
    width: 30px; height: 30px; border-radius: 9px;
    display: grid; place-items: center;
    background: #fff; color: #000;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    font-size: 21px; font-weight: 800; line-height: 1;
}

.site-nav { display: flex; align-items: center; gap: 8px; }
.icon-btn {
    width: 38px; height: 38px; display: grid; place-items: center;
    background: none; border: 1px solid transparent; border-radius: 50%;
    color: var(--text-2); font-size: 18px; cursor: pointer;
    transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 40px; padding: 8px 16px;
    border: 1px solid transparent; border-radius: 999px;
    font-size: 14px; font-weight: 550; line-height: 1.2; letter-spacing: -.005em;
    text-decoration: none; white-space: nowrap; cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn .icon { font-size: 16px; }
.btn-solid { background: var(--solid); color: var(--on-solid); }
.btn-solid:hover { background: var(--solid-hover); }
.btn-brand { background: var(--brand); color: var(--on-brand); }
.btn-brand:hover { background: var(--brand-hover); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-lg { min-height: 52px; padding: 12px 26px; font-size: 16px; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13px; }

/* Page scaffolding */
main { flex: 1; padding-bottom: 72px; }

.hero { position: relative; isolation: isolate; text-align: center; padding: 72px 0 40px; }
.hero::before {
    content: ""; position: absolute; inset: 0 0 -60px; z-index: -1;
    background:
        radial-gradient(60% 75% at 50% 0%, var(--glow), transparent 72%),
        linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 44px 44px,
        linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 44px 44px;
    -webkit-mask-image: radial-gradient(70% 90% at 50% 0%, #000 25%, transparent 78%);
    mask-image: radial-gradient(70% 90% at 50% 0%, #000 25%, transparent 78%);
    pointer-events: none;
}
.hero h1 {
    max-width: 16ch; margin-inline: auto;
    font-size: clamp(38px, 6.4vw, 64px);
    font-weight: 700; line-height: 1.04; letter-spacing: -.042em;
    text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--brand-text); }
.hero-sub { max-width: 54ch; margin: 18px auto 0; color: var(--text-2); font-size: 18px; text-wrap: pretty; }

.page-head { padding: 56px 0 28px; }
.page-head.center { text-align: center; }
.page-head h1 { font-size: clamp(30px, 4.6vw, 44px); font-weight: 700; line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.page-head p { margin-top: 10px; color: var(--text-2); font-size: 17px; max-width: 60ch; text-wrap: pretty; }
.page-head.center p { margin-inline: auto; }

/* Search */
.search { position: relative; max-width: 720px; margin: 30px auto 0; }
.search .icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--text-3); pointer-events: none; }
.search input {
    width: 100%; height: 60px; padding: 0 118px 0 54px;
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px;
    box-shadow: var(--shadow-md); font-size: 17px; outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--glow), var(--shadow-md); }
.search input::placeholder { color: var(--text-3); opacity: 1; }
.search .btn { position: absolute; right: 8px; top: 8px; bottom: 8px; min-height: 0; padding-inline: 20px; }

/* Listing grid */
.results-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 24px 0 16px; }
.results-bar h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.results-bar a { flex: none; font-size: 14px; color: var(--text-2); }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.site-card {
    min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 20px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: border-color .18s, box-shadow .18s, transform .18s;
}
.grid .site-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }

.site-card-top { display: flex; align-items: flex-start; gap: 14px; }
.favicon {
    width: 44px; height: 44px; padding: 8px; flex: none;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
}
.site-card-head { min-width: 0; flex: 1; }
.site-card h3 {
    font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -.018em;
    overflow-wrap: anywhere;
}
.site-domain {
    display: block; margin-top: 3px; font-family: var(--mono); font-size: 12.5px; color: var(--text-3);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-desc { color: var(--text-2); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.grid .site-desc { flex: 1; }

.site-card-foot {
    margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding-top: 14px; border-top: 1px solid var(--line);
}
.site-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }

.visits { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.visits .icon { font-size: 15px; }

mark { background: var(--brand-soft); color: inherit; border-radius: 4px; padding: 0 2px; }

.empty {
    max-width: 480px; margin: 24px auto 0; padding: 48px 28px; text-align: center;
    background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg);
}
.empty h2 { font-size: 21px; letter-spacing: -.02em; }
.empty p { margin: 6px 0 20px; color: var(--text-2); }

/* Generic panel */
.panel {
    padding: 24px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.panel + .panel, .site-card + .panel { margin-top: 16px; }
.panel-title { font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -.02em; overflow-wrap: anywhere; }
.eyebrow { font-size: 13px; font-weight: 550; color: var(--text-3); margin-bottom: 12px; }

/* Submit */
.submit-panel { max-width: 620px; margin: 0 auto; padding: 28px; box-shadow: var(--shadow-md); }
.field-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 550; }
.url-input {
    width: 100%; height: 54px; padding: 0 18px;
    background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    font-family: var(--mono); font-size: 15px; outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.url-input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--glow); }
.url-input::placeholder { color: var(--text-3); opacity: 1; }
.form-error {
    display: block; margin-bottom: 14px; padding: 10px 14px;
    background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500;
}
.form-error::first-letter { text-transform: uppercase; }
.form-note { margin-top: 12px; color: var(--text-3); font-size: 13.5px; }
.form-note a { color: var(--brand-text); }
.submit-panel .btn { width: 100%; margin-top: 18px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; list-style: none; max-width: 620px; margin: 20px auto 0; }
.steps li { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; line-height: 1.3; }
.step-num {
    width: 26px; height: 26px; flex: none; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand-text); border-radius: 50%;
    font-size: 13px; font-weight: 600;
}

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.split .panel { margin: 0; }
.split p { margin-top: 8px; color: var(--text-2); font-size: 15px; line-height: 1.65; }
.tile {
    width: 42px; height: 42px; flex: none; display: grid; place-items: center; margin-bottom: 16px;
    background: var(--brand-soft); color: var(--brand-text); border-radius: 12px; font-size: 21px;
}

/* Preview / checkout */
.checkout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: 20px; }
.checkout-listing { min-width: 0; }
.price-panel { position: sticky; top: 84px; padding: 28px; box-shadow: var(--shadow-md); }
.price { display: flex; align-items: baseline; gap: 8px; }
.price strong { font-size: 52px; font-weight: 700; line-height: 1; letter-spacing: -.045em; }
.price span { color: var(--text-2); font-size: 15px; }
.benefits { list-style: none; display: grid; gap: 18px; margin: 24px 0; padding-top: 24px; border-top: 1px solid var(--line); }
.benefits li { display: flex; gap: 12px; }
.benefits .check {
    width: 24px; height: 24px; flex: none; margin-top: 1px; display: grid; place-items: center;
    background: var(--success-soft); color: var(--success); border-radius: 50%; font-size: 14px;
}
.benefits .check .icon { stroke-width: 3; }
.benefits h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; }
.benefits p { margin-top: 2px; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.price-panel .btn { width: 100%; }
.price-foot { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; color: var(--text-3); font-size: 13px; }

/* Share */
.share-layout { max-width: 760px; margin: 0 auto; }
.share-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.share-btn {
    min-width: 0; display: flex; align-items: center; gap: 10px; padding: 11px 13px;
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; text-align: left; cursor: pointer;
    transition: border-color .15s, background-color .15s;
}
.share-btn:hover { border-color: var(--line-strong); background: var(--surface-2); }
.share-btn img { width: 22px; height: 22px; flex: none; border-radius: 5px; }
.share-btn .x-logo { padding: 3px; background: #fff; border-radius: 5px; }
.share-btn .icon { width: 22px; height: 22px; padding: 2px; color: var(--brand-text); }

/* Centered messages */
.notice { max-width: 560px; margin: 56px auto 0; padding: 44px 32px; text-align: center; box-shadow: var(--shadow-md); }
.notice .tile { width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 50%; font-size: 26px; }
.notice .tile.ok { background: var(--success-soft); color: var(--success); }
.notice h1 { font-size: clamp(26px, 4vw, 34px); font-weight: 700; line-height: 1.12; letter-spacing: -.03em; text-wrap: balance; }
.notice p { margin: 12px 0 24px; color: var(--text-2); text-wrap: pretty; }
.notice-code { font-family: var(--mono); font-size: 13px; color: var(--text-3); margin-bottom: 10px; }

/* FAQ */
.faq-list { display: grid; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s; }
.faq-item:hover, .faq-item[open] { border-color: var(--line-strong); }
.faq-item summary {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px 20px; font-weight: 550; letter-spacing: -.01em; cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: ""; width: 9px; height: 9px; flex: none; margin-right: 3px;
    border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3);
    transform: translateY(-2px) rotate(45deg); transition: transform .18s;
}
.faq-item[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq-item p { padding: 0 20px 18px; color: var(--text-2); }

/* Legal pages */
.prose-section { padding: 28px 0; border-top: 1px solid var(--line); }
.prose-section h3 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 10px; }
.prose-section h4 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; }
.prose-section p { color: var(--text-2); margin-top: 10px; }
.prose-section h3 + p { margin-top: 0; }
.prose-section ul { margin-top: 10px; padding-left: 20px; color: var(--text-2); }
.prose-section li { margin-top: 5px; padding-left: 2px; }
.prose-section li::marker { color: var(--text-3); }
.prose-section a { color: var(--brand-text); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.contact-card { margin: 0 !important; text-decoration: none; display: block; transition: border-color .15s, box-shadow .15s; }
a.contact-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.contact-card span { display: block; color: var(--text-3); font-size: 14px; }
.contact-card strong { display: block; margin-top: 2px; font-size: 18px; font-weight: 600; letter-spacing: -.015em; overflow-wrap: anywhere; }
.map-panel { margin-top: 16px !important; padding: 0; overflow: hidden; }
.map-panel .map-head { padding: 20px 24px; }
.map-panel iframe { width: 100%; height: 340px; border: 0; }

/* AI summary dialog */
.ai-dialog {
    width: min(640px, calc(100vw - 32px)); max-height: min(80dvh, 720px);
    margin: auto; padding: 0;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.ai-dialog[open] { animation: dialog-in .2s ease-out; }
.ai-dialog::backdrop { background: rgba(6, 8, 28, .55); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 14px 24px; border-bottom: 1px solid var(--line); }
.ai-head h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.ai-head h2 .icon { color: var(--brand-text); font-size: 18px; }
.ai-body { padding: 22px 24px 26px; color: var(--text-2); }
.ai-body ul { list-style: none; display: grid; gap: 12px; }
.ai-body li { position: relative; padding-left: 20px; line-height: 1.5; animation: rise .3s ease-out backwards; }
.ai-body li::before { content: ""; position: absolute; left: 2px; top: .58em; width: 6px; height: 6px; background: var(--brand); border-radius: 50%; }
.ai-body .ai-error { color: var(--danger); }
.ai-note { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12.5px; }
.skeleton { display: grid; gap: 14px; }
.skeleton span { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skeleton span:nth-child(2n) { width: 82%; }
.skeleton span:nth-child(3n) { width: 91%; }

@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); color: var(--text-3); font-size: 14px; }
.site-footer .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding-block: 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

/* Responsive */
@media (max-width: 860px) {
    .checkout { grid-template-columns: minmax(0, 1fr); }
    .price-panel { position: static; }
    .split { grid-template-columns: minmax(0, 1fr); margin-top: 40px; }
}

@media (max-width: 720px) {
    .grid { grid-template-columns: minmax(0, 1fr); }
    .hero { padding: 48px 0 28px; }
    .hero-sub { font-size: 16px; }
    .page-head { padding: 40px 0 24px; }
    .share-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
    .container { padding-inline: 16px; }
    .site-header .container { height: 58px; }
    .search input { height: 54px; padding-right: 20px; padding-left: 50px; font-size: 16px; }
    .search .btn { display: none; }
    .contact-grid { grid-template-columns: minmax(0, 1fr); }
    .steps { grid-template-columns: minmax(0, 1fr); }
    .panel, .submit-panel, .price-panel { padding: 20px; }
    .site-card-foot { flex-wrap: wrap; }
    .notice { margin-top: 32px; padding: 32px 20px; }
    .site-footer .container { flex-direction: column; align-items: center; }
}

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