/* ==========================================================================
   Withdata shared design system  (v1, 2026-10-01)
   Extracted from the billsight/textmerger new-generation pages so every
   product page can share one stylesheet instead of a per-app copy.

   Sections: tokens · base · nav · header/hero · sections · buttons ·
             features · steps · faq · tables · notices · code · forms ·
             footer · responsive
   ========================================================================== */

:root {
    --color-primary: #2c5282;
    --color-primary-dark: #1a365d;
    --color-accent: #3182ce;
    --color-accent-dark: #2b6cb0;
    --color-success: #38a169;
    --color-success-dark: #2f855a;
    --color-ink: #2d3748;
    --color-muted: #4a5568;
    --color-bg: #f8f9fa;
    --color-surface: #fff;
    --color-surface-2: #f7fafc;
    --color-border: #e2e8f0;
    --color-danger: #c53030;

    --radius: 6px;
    --radius-lg: 8px;
    --maxw: 1200px;
    --shadow: 0 2px 8px rgba(0, 0, 0, .08);

    --font: Arial, 'Helvetica Neue', Helvetica, system-ui, sans-serif;
    --mono: Consolas, Monaco, 'Courier New', monospace;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    line-height: 1.6;
    color: var(--color-muted);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
img { max-width: 100%; height: auto; }
a { color: var(--color-accent); }
h1, h2, h3, h4 { color: var(--color-ink); line-height: 1.25; }

/* product sub-navigation */
.product-nav { background: var(--color-surface); border-bottom: 1px solid var(--color-border); }

.product-nav .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.4rem;
    padding-top: .75rem;
    padding-bottom: .75rem;
}

.product-nav a { color: var(--color-primary); text-decoration: none; font-size: .98rem; }
.product-nav a:hover { text-decoration: underline; }

.product-nav a.current {
    color: var(--color-primary-dark);
    font-weight: 700;
    border-bottom: 2px solid var(--color-primary);
}

.product-nav a.brand { margin-right: auto; font-weight: 700; color: #333; }

/* page header / hero */
header {
    background: var(--color-primary);
    color: #fff;
    padding: 2.5rem 0;
    text-align: center;
}

header h1 { color: #fff; font-size: 2.4rem; margin-bottom: .6rem; }
header p { font-size: 1.1rem; opacity: .92; max-width: 760px; margin: 0 auto; }

.hero { padding: 4rem 0; text-align: center; }
.hero h2 { font-size: 2rem; color: var(--color-ink); margin-bottom: 1.2rem; }
.hero p { font-size: 1.1rem; color: var(--color-muted); max-width: 800px; margin: 0 auto 2rem; }
.main-shot { width: 100%; max-width: 962px; }

/* content sections */
.section { padding: 3rem 0; background: var(--color-surface); }
.section.alt { background: var(--color-bg); }
.section-title { text-align: center; font-size: 2rem; color: var(--color-ink); margin-bottom: 2.5rem; }

.page h2 { font-size: 1.5rem; margin: 2rem 0 .8rem; }
.page h3 { font-size: 1.15rem; color: var(--color-primary); margin: 1.5rem 0 .5rem; }
.page p, .page ul, .page ol { margin-bottom: 1rem; }
.page ul, .page ol { padding-left: 1.4rem; }
.page li { margin-bottom: .35rem; }
.page .lead { font-size: 1.15rem; }
.page code {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: .1rem .35rem;
    font-family: var(--mono);
    font-size: .9em;
}

.breadcrumb { font-size: .95rem; color: var(--color-muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--color-accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* buttons */
.btn-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
    display: inline-block;
    background: var(--color-accent);
    color: #fff;
    padding: 12px 28px;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background .3s ease;
}

.btn:hover { background: var(--color-accent-dark); color: #fff; }
.btn-buy { background: var(--color-success); }
.btn-buy:hover { background: var(--color-success-dark); }
.btn-sm { padding: 8px 18px; font-size: .92rem; }

/* feature cards */
.features { padding: 4rem 0; background: var(--color-surface); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.feature-card { background: var(--color-surface-2); padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.feature-card h3 { color: var(--color-primary); margin-bottom: 1rem; font-size: 1.3rem; }
.feature-card p { color: var(--color-muted); }

/* steps */
.how-it-works { padding: 4rem 0; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.step-item { text-align: center; padding: 1.5rem; }
.step-num {
    display: inline-block;
    width: 40px; height: 40px; line-height: 40px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}
.step-item h3 { color: var(--color-ink); margin-bottom: .8rem; }
.step-item p { color: var(--color-muted); }

/* faq */
.faq { padding: 4rem 0; background: var(--color-surface); }
.faq-item { max-width: 800px; margin: 0 auto 1.5rem; padding: 1.2rem; border: 1px solid var(--color-border); border-radius: var(--radius); }
.faq-item h4 { color: var(--color-ink); font-size: 1.1rem; margin-bottom: .5rem; }
.faq-item p { color: var(--color-muted); }

/* tables */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; background: var(--color-surface); }
.data-table caption { caption-side: top; text-align: left; font-weight: 700; color: var(--color-ink); padding: .4rem 0 .8rem; }
.data-table th, .data-table td { border: 1px solid var(--color-border); padding: .6rem .75rem; text-align: left; vertical-align: middle; }
.data-table th { background: var(--color-primary); color: #fff; font-weight: 700; }
.data-table tr:nth-child(even) td { background: var(--color-surface-2); }
.data-table td.num, .data-table th.num { text-align: right; white-space: nowrap; }
.data-table .saved { color: var(--color-danger); font-weight: 700; }

/* notice */
.notice {
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-accent);
    background: var(--color-surface-2);
    padding: 1rem 1.2rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
}
.notice.risk { border-left-color: var(--color-success); color: #276749; }
.notice.risk img { vertical-align: middle; margin-right: .35rem; }

/* code blocks */
pre,
pre.code {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.2rem;
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-ink);
    overflow-x: auto;
}

/* forms */
.field { max-width: 680px; }
.field label { display: block; font-weight: 700; color: var(--color-ink); margin: 1.2rem 0 .4rem; }
.field label.radio { display: flex; gap: .5rem; align-items: center; font-weight: 400; margin: .3rem 0; }
.field input[type=text],
.field textarea {
    width: 100%;
    padding: .5rem .6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font: inherit;
    color: var(--color-ink);
}
.field input.inline { width: auto; min-width: 240px; }

/* footer */
footer { background: var(--color-ink); color: #fff; text-align: center; padding: 2rem 0; margin-top: auto; }
footer a { color: #cbd5e1; text-decoration: none; margin: 0 .5rem; }
footer a:hover { text-decoration: underline; }
footer p { margin-top: .6rem; color: #e2e8f0; }

@media (max-width: 640px) {
    header h1 { font-size: 1.8rem; }
    .section-title { font-size: 1.6rem; }
    .btn { padding: 10px 20px; }
}
