/* ==========================================================
   Uryth Legal & Account Pages
   Shared by: privacy-policy.html, terms-of-service.html, delete-account.html
   Palette source: PROJECT_SPECIFICATION.md Section 3 (UI Design Theme)
   "CRITICAL: Use the Indigo theme throughout. Do not use Teal, Blue, or
   any other primary color." Seed color #7F77DD, Material 3 ColorScheme.
   ========================================================== */

:root {
    --primary: #7F77DD;        /* Indigo — brand primary (spec Section 3) */
    --primary-dark: #5E56C4;
    --primary-light: #EDEBFC;  /* homepage hero blob, pills, ghost-button hover */
    --amber: #EF9F27;          /* spec "Expiring soon" amber, reused here for advisory notes */
    --amber-bg: #FFF8EC;
    --amber-border: #F3DDB0;

    --text: #2B2A38;                  /* Indigo-tinted near-black, consistent with a Material 3
                                          onSurface color derived from the Indigo seed */
    --secondary-text: #6B6980;
    --text-muted: var(--secondary-text); /* legacy alias, kept for older inline references */

    --border: #D4D2F5;         /* Indigo-tinted border, matches spec surfaces */
    --background: #FFFFFF;     /* spec "Surface" white — cards, tables, panels */
    --background-alt: #F8F8FE; /* spec "Page background" — Indigo-tinted off-white */
    --table-header: #F1EFFC;   /* light Indigo tint, distinct from both surface and page bg */

    --max-width: 960px;         /* long-form legal documents */
    --max-width-narrow: 640px;  /* short single-purpose pages (delete-account) */
    --radius: 10px;              /* buttons, pills, small controls */
    --radius-lg: 14px;           /* cards, TOC panel */
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 40px 20px;
    background: var(--background-alt);
    color: var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    line-height: 1.6;
}

.wrap {
    max-width: var(--max-width);
    margin: auto;
}

.wrap {
    max-width: var(--max-width-narrow);
    padding: 16px 4px 40px;
}

/* ==========================================================
   Brand mark (shared across every page, incl. the homepage header)
   ========================================================== */

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: block;
    object-fit: cover;
    flex-shrink: 0;
}

.brand-name {
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.01em;
}

/* ==========================================================
   Header
   ========================================================== */

.legal-header {
    text-align: center;
    margin-bottom: 32px;
}

.legal-header .brand {
    justify-content: center;
    margin-bottom: 28px;
}

h1 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.legal-header .subtitle,
.legal-header p {
    margin: 6px 0;
    color: var(--secondary-text);
}

.subtitle {
    color: var(--secondary-text);
    font-size: 16px;
    margin: 0 0 8px;
}

/* ==========================================================
   Cross-page navigation
   ========================================================== */

.legal-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 36px;
}

.legal-nav a {
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--background);
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.legal-nav a:hover {
    background: var(--primary);
    color: #ffffff;
}

.legal-nav a[aria-current="page"] {
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
}

/* ==========================================================
   Table of Contents
   ========================================================== */

.toc {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 40px 0;
}

.toc h2 {
    margin-top: 0;
}

.toc ol {
    margin: 0;
    padding-left: 24px;
}

.toc li {
    margin: 8px 0;
}

.toc a {
    color: var(--primary-dark);
    text-decoration: none;
}

.toc a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ==========================================================
   Sections (privacy-policy.html, terms-of-service.html)
   ========================================================== */

section {
    margin-bottom: 48px;
}

section h2 {
    color: var(--primary-dark);
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

section h3 {
    margin-top: 28px;
    color: var(--text);
}

section h4 {
    margin-top: 20px;
    color: var(--text);
}

p {
    margin: 14px 0;
}

ul,
ol {
    padding-left: 26px;
}

li {
    margin: 8px 0;
}

/* ==========================================================
   Links
   ========================================================== */

a {
    color: var(--primary-dark);
}

a:hover {
    color: var(--primary);
}

/* ==========================================================
   Tables
   ========================================================== */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    background: var(--background);
}

th {
    background: var(--table-header);
    text-align: left;
}

th,
td {
    border: 1px solid var(--border);
    padding: 12px;
    vertical-align: top;
}

/* ==========================================================
   Code
   ========================================================== */

code {
    background: var(--background-alt);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 2px 6px;
    font-size: 0.92em;
}

/* ==========================================================
   Cards (delete-account.html)
   ========================================================== */

.card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 28px 30px;
    margin-bottom: 20px;
}

.card h2 {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary-dark);
    margin: 0 0 16px;
    border-bottom: none;
    padding-bottom: 0;
}

.card ol {
    margin: 0;
    padding-left: 20px;
}

.card ol li {
    margin-bottom: 12px;
}

.card ol li:last-child {
    margin-bottom: 0;
}

.card p:first-child {
    margin-top: 0;
}

.card p:last-child {
    margin-bottom: 0;
}

/* ==========================================================
   Buttons
   ========================================================== */

.btn {
    display: inline-block;
    background: var(--primary);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    padding: 13px 26px;
    border-radius: var(--radius);
    margin-top: 18px;
    white-space: nowrap;
}

.btn:hover {
    background: var(--primary-dark);
    color: #ffffff;
}

.btn-small {
    padding: 9px 18px;
    font-size: 14px;
    margin-top: 0;
}

.btn-ghost {
    background: transparent;
    color: var(--primary-dark);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* ==========================================================
   Advisory note (delete-account.html)
   ========================================================== */

.note {
    display: flex;
    gap: 12px;
    background: var(--amber-bg);
    border: 1px solid var(--amber-border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    font-size: 14.5px;
    margin-bottom: 20px;
}

.note-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--amber);
    margin-top: 7px;
}

/* ==========================================================
   Fine print
   ========================================================== */

.fine {
    color: var(--secondary-text);
    font-size: 13.5px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ==========================================================
   Footer
   ========================================================== */

footer {
    max-width: 1120px;
    margin: 60px auto 0;
    padding: 0 20px 40px;
    text-align: center;
    color: var(--secondary-text);
    font-size: 0.95rem;
}

footer hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0 0 24px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 16px;
    font-size: 14px;
}

.footer-links a {
    text-decoration: none;
    color: var(--secondary-text);
}

.footer-links a:hover {
    color: var(--primary-dark);
}

/* ==========================================================
   Homepage (index.html) — hero, features, pricing, trust strip.
   Scoped resets first: privacy-policy.html/terms-of-service.html rely
   on the generic `section` / `section h2` rules above for long-form
   doc spacing, but the homepage's <section> elements each carry their
   own padding, so those generic rules are reset within .home-main.
   ========================================================== */

.home-main > section {
    margin-bottom: 0;
}

.home-main section h2 {
    border-bottom: none;
    padding-bottom: 0;
}

.home-main {
    max-width: 1120px;
    margin: auto;
    padding: 0 20px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(248, 248, 254, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1120px;
    margin: auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-nav {
    display: flex;
    gap: 24px;
    margin-left: auto;
}

.site-nav a {
    color: var(--secondary-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 14.5px;
}

.site-nav a:hover {
    color: var(--primary-dark);
}

.hero {
    position: relative;
    text-align: center;
    padding: 88px 0 56px;
    max-width: 720px;
    margin: 0 auto;
    overflow: hidden;
}

.hero-blob {
    position: absolute;
    top: -140px;
    left: 50%;
    transform: translateX(-50%);
    width: 640px;
    height: 420px;
    background: radial-gradient(closest-side, var(--primary-light), transparent);
    z-index: -1;
    pointer-events: none;
}

.pill {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 999px;
    margin-bottom: 20px;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text);
}

.hero-sub {
    color: var(--secondary-text);
    font-size: 17px;
    max-width: 560px;
    margin: 0 auto 32px;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.hero-fine {
    color: var(--secondary-text);
    font-size: 13.5px;
    margin: 0;
}

.categories {
    padding: 8px 0 64px;
}

.chip-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text);
}

.section-title {
    text-align: center;
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    color: var(--text);
}

.section-sub {
    text-align: center;
    color: var(--secondary-text);
    font-size: 16px;
    margin: 0 0 40px;
}

.features {
    padding: 40px 0 64px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-icon {
    font-size: 28px;
    margin-bottom: 14px;
}

.feature-card h3 {
    margin: 0 0 10px;
    font-size: 17px;
    color: var(--text);
}

.feature-card p {
    margin: 0;
    color: var(--secondary-text);
    font-size: 14.5px;
}

.badge-pro {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 999px;
    vertical-align: middle;
    margin-left: 4px;
}

.pricing {
    padding: 40px 0 64px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 860px;
    margin: auto;
}

.price-card {
    padding: 32px;
    position: relative;
}

.price-card h3 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary-text);
}

.price-card-pro {
    border: 2px solid var(--primary);
}

.price-card-pro h3 {
    color: var(--primary-dark);
}

.pro-tag {
    position: absolute;
    top: -12px;
    right: 24px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
}

.price {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.price-unit {
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary-text);
}

.price-note {
    color: var(--secondary-text);
    font-size: 13.5px;
    margin: 4px 0 20px;
}

.price-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.price-list li {
    margin: 0;
    padding: 8px 0 8px 22px;
    position: relative;
    font-size: 14.5px;
    color: var(--text);
    border-top: 1px solid var(--background-alt);
}

.price-list li:first-child {
    border-top: none;
}

.price-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

.pricing-fine {
    text-align: center;
    color: var(--secondary-text);
    font-size: 13.5px;
    max-width: 520px;
    margin: 28px auto 0;
}

.trust {
    padding: 0 0 64px;
}

.trust-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 960px;
    margin: auto;
}

.trust-item {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    font-size: 13.5px;
    color: var(--text);
}

.trust-icon {
    font-size: 22px;
    margin-bottom: 8px;
}

.closing-cta {
    text-align: center;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 56px 24px;
    margin: 0 0 64px;
}

.closing-cta h2 {
    margin: 0 0 10px;
    font-size: 1.7rem;
    letter-spacing: -0.02em;
}

.closing-cta p {
    color: var(--secondary-text);
    margin: 0 0 24px;
}

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 768px) {

    body {
        padding: 24px 16px;
    }

    h1 {
        font-size: 1.5rem;
    }

    table {
        display: block;
        overflow-x: auto;
    }

    .toc,
    .card {
        padding: 18px;
    }

}

@media (max-width: 860px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .trust-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .site-nav {
        display: none;
    }

    .hero {
        padding: 56px 0 40px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .trust-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   Print
   ========================================================== */

@media print {

    body {
        padding: 0;
        background: #ffffff;
    }

    .toc {
        page-break-after: always;
    }

    .legal-nav {
        display: none;
    }

    a {
        color: black;
        text-decoration: none;
    }

    section {
        page-break-inside: avoid;
    }

}
