/* Shared styling for the standalone legal documents in common/extra/
   (terms.html, privacy.html). These are loaded into the site modal as an
   iframe, so they carry no site CSS and must style themselves. */

:root {
    --brand: #B82D2D;
    --ink: #2b2b2b;
    --ink-strong: #1a1a1a;
    --muted: #6f6f6f;
    --rule: #e6e6e6;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    padding: 48px 56px 64px;
    background: #fff;
    color: var(--ink);
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.doc { max-width: 760px; margin: 0 auto; }

p { margin: 0 0 16px; }

strong, b { color: var(--ink-strong); font-weight: 600; }

a { color: var(--brand); }

/* --- Document header ------------------------------------------------ */

.doc-head {
    margin-bottom: 40px;
    padding-bottom: 28px;
    border-bottom: 3px solid var(--brand);
}

.doc-brand {
    margin: 0 0 6px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

h1 {
    margin: 0 0 10px;
    color: var(--ink-strong);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.01em;
}

.doc-scope {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

/* Date badge: explicit on terms, and the paragraph straight after the
   title on documents that have no dedicated header block. */
.doc-date,
.doc-plain h1 + p {
    display: inline-block;
    margin: 0;
    padding: 5px 12px;
    border-radius: 3px;
    background: #f4f4f4;
    color: var(--ink-strong);
    font-size: 12px;
    font-weight: 600;
}

.doc-plain h1 {
    margin-bottom: 18px;
    padding-bottom: 24px;
    border-bottom: 3px solid var(--brand);
}

.doc-plain h1 + p { margin-bottom: 36px; }

.doc-intro p {
    color: var(--ink-strong);
    font-size: 15.5px;
}

/* --- Sections -------------------------------------------------------- */

h2 {
    margin: 44px 0 14px;
    padding-top: 22px;
    border-top: 1px solid var(--rule);
    color: var(--ink-strong);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}

h2 .num { color: var(--brand); }

.doc-intro + h2 { margin-top: 36px; }

h3 {
    margin: 28px 0 12px;
    color: var(--ink-strong);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

/* --- Tables ----------------------------------------------------------- */

/* Wrapper keeps wide tables scrollable instead of breaking the layout. */
.doc-table {
    margin: 0 0 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.doc-table table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 13.5px;
    line-height: 1.55;
}

.doc-table th,
.doc-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--rule);
    text-align: left;
    vertical-align: top;
}

.doc-table thead th {
    border-bottom: 2px solid var(--brand);
    color: var(--ink-strong);
    font-weight: 700;
    white-space: nowrap;
}

.doc-table tbody tr:last-child td { border-bottom: none; }

.doc-table tbody tr:nth-child(even) { background: #fafafa; }

.doc-table td:first-child { color: var(--ink-strong); font-weight: 600; }

/* --- Lists ----------------------------------------------------------- */

ul { margin: 0 0 16px; padding: 0; list-style: none; }

li {
    position: relative;
    margin: 0 0 18px;
    padding-left: 18px;
}

li::before {
    content: "";
    position: absolute;
    top: .65em;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand);
}

li p { margin: 0 0 4px; }
li p:last-child { margin-bottom: 0; color: var(--ink); }
li p strong { font-size: 14px; }

/* --- Narrow screens --------------------------------------------------- */

@media (max-width: 640px) {
    body { padding: 32px 22px 48px; font-size: 14px; }
    h1 { font-size: 23px; }
    h2 { margin-top: 36px; font-size: 16px; }
    .doc-table table { min-width: 460px; font-size: 12.5px; }
    .doc-table th, .doc-table td { padding: 8px 10px; }
}
