/* Aelio — Legal document page (Terms of Service / Privacy)
   Readable long-form layout matching the Aelio brand. */

:root {
    --onyx: #282523;
    --gray: #66696B;
    --light-gray: #A0A0A0;
    --blue: #227EFF;
    --green: #69C366;
    --orange: #EC8D2D;
    --red: #E85545;
    --bg: #F5F3F0;
    --card: #FFFFFF;
    --rule: rgba(40, 37, 35, 0.10);
}

@font-face {
    font-family: 'aelio-sans';
    src: url('/static/fonts/aelio-sans.ttf') format('truetype');
    font-weight: 100 900;
    font-display: swap;
}

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

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

body {
    font-family: 'aelio-sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--onyx);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------------- Layout ---------------- */
.wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 56px 24px 96px;
}

/* ---------------- Header ---------------- */
.doc-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding-bottom: 28px;
    margin-bottom: 36px;
    border-bottom: 1px solid var(--rule);
}

.doc-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--onyx);
}

.doc-header .app-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.05);
}

.doc-header .brand-name {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.4px;
}

.doc-header h1 {
    font-size: clamp(30px, 5vw, 42px);
    font-weight: 600;
    letter-spacing: -1px;
    line-height: 1.12;
}

.doc-header .effective {
    font-size: 14px;
    color: var(--gray);
}

/* ---------------- Safety callout ---------------- */
.callout {
    display: flex;
    gap: 12px;
    background: rgba(232, 85, 69, 0.07);
    border: 1px solid rgba(232, 85, 69, 0.22);
    border-radius: 14px;
    padding: 16px 18px;
    margin: 0 0 36px;
}

.callout .mark {
    flex: 0 0 auto;
    font-weight: 700;
    color: var(--red);
}

.callout p {
    font-size: 15px;
    color: var(--onyx);
}

/* ---------------- Table of contents ---------------- */
.toc {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 44px;
}

.toc h2 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gray);
    margin-bottom: 12px;
    border: 0;
    padding: 0;
}

.toc ol {
    columns: 2;
    column-gap: 32px;
    padding-left: 18px;
    font-size: 14.5px;
}

.toc li { margin-bottom: 6px; break-inside: avoid; }

.toc a {
    color: var(--onyx);
    text-decoration: none;
}

.toc a:hover { color: var(--blue); }

/* ---------------- Body typography ---------------- */
section { margin-bottom: 36px; scroll-margin-top: 24px; }

h2 {
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 12px;
    padding-top: 8px;
}

h3 {
    font-size: 16.5px;
    font-weight: 600;
    margin: 20px 0 8px;
}

p { margin-bottom: 14px; font-size: 16px; }

ul, ol.list {
    margin: 0 0 14px 22px;
    font-size: 16px;
}

li { margin-bottom: 8px; }

strong { font-weight: 600; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.legal-emphasis {
    text-transform: uppercase;
    font-size: 14.5px;
    letter-spacing: 0.2px;
    background: rgba(40, 37, 35, 0.035);
    border-left: 3px solid var(--rule);
    padding: 14px 16px;
    border-radius: 8px;
    color: var(--onyx);
}

.placeholder {
    background: rgba(236, 141, 45, 0.14);
    border-bottom: 1px dashed var(--orange);
    padding: 0 3px;
    border-radius: 3px;
    font-style: normal;
}

/* ---------------- Footer ---------------- */
.doc-footer {
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid var(--rule);
    font-size: 14px;
    color: var(--gray);
}

.doc-footer a { color: var(--gray); text-decoration: underline; }
.doc-footer a:hover { color: var(--blue); }

/* ---------------- Responsive ---------------- */
@media (max-width: 600px) {
    .wrap { padding: 36px 20px 72px; }
    .toc ol { columns: 1; }
    p, ul, ol.list { font-size: 15.5px; }
}
