/* =========================================================
   TERMS — Full-page legal document layout
   ========================================================= */

body.terms-page {
    background: var(--bg);
}

/* ---------- HERO ---------- */
.terms-hero {
    padding: 140px 24px 40px;
    background: linear-gradient(180deg, #fdfbf7 0%, #fff4e8 100%);
    border-bottom: 1px solid var(--border);
}

.terms-hero .section-inner {
    max-width: 860px;
    margin: 0 auto;
}

.terms-h1 {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    margin: 12px 0 16px;
    line-height: 1.1;
}

.terms-sub {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 640px;
}

.terms-meta {
    margin-top: 24px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-muted);
}
.terms-meta strong { color: var(--text); }

/* ---------- MAIN ---------- */
.terms-main {
    padding: 40px 24px 120px;
    background: var(--bg);
}

.terms-main .section-inner {
    max-width: 860px;
    margin: 0 auto;
}

.terms-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 80px 0;
    color: var(--text-muted);
}

.terms-body {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 44px 48px;
    box-shadow: var(--shadow-sm);
    color: var(--text);
    font-size: 14.5px;
    line-height: 1.75;
}
.terms-body h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0 0 8px;
}
.terms-body h2 {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin: 36px 0 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.terms-body h2:first-of-type {
    border-top: none;
    padding-top: 0;
}
.terms-body h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 24px 0 10px;
}
.terms-body p {
    margin: 0 0 14px;
}
.terms-body ul {
    margin: 0 0 14px;
    padding-left: 22px;
}
.terms-body li {
    margin-bottom: 6px;
}
.terms-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 32px 0;
}
.terms-body strong { font-weight: 600; }
.terms-body em { font-style: italic; }
.terms-body a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}
.terms-body code {
    background: var(--surface-2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.terms-body blockquote {
    margin: 16px 0;
    padding: 12px 18px;
    border-left: 3px solid var(--primary);
    background: var(--primary-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.terms-body blockquote p { margin: 6px 0; }

/* ---------- ACCEPT BAR ---------- */
.terms-accept-bar {
    position: sticky;
    bottom: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 32px rgba(16,24,40,0.10);
    padding: 22px 0;
    z-index: 20;
}

.terms-accept-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px;
}

.terms-accept-text {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.terms-accept-text strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.terms-accept-text span {
    font-size: 13px;
    color: var(--text-muted);
}

.terms-accept-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 16px;
    color: var(--text);
}
.terms-accept-label input[type=checkbox] {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.terms-accept-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.terms-accept-actions .btn-hero {
    min-width: 160px;
}

/* ---------- ACCEPTED NOTICE ---------- */
.terms-accepted-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    margin-bottom: 22px;
    background: var(--success-soft);
    border: 1px solid rgba(5,150,105,.3);
    border-radius: var(--radius-sm);
    color: var(--success);
    font-size: 13.5px;
    line-height: 1.5;
}
.terms-accepted-notice svg { flex-shrink: 0; color: var(--success); }
.terms-accepted-notice strong { font-weight: 700; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 720px) {
    .terms-hero { padding: 110px 18px 32px; }
    .terms-h1 { font-size: 30px; }
    .terms-sub { font-size: 15px; }
    .terms-main { padding: 24px 14px 100px; }
    .terms-body { padding: 28px 22px; }
    .terms-body h1 { font-size: 22px; }
    .terms-body h2 { font-size: 17px; }
    .terms-accept-bar { padding: 18px 0; }
    .terms-accept-inner { padding: 0 18px; }
    .terms-accept-actions { flex-direction: column; }
    .terms-accept-actions .btn-hero { width: 100%; min-width: 0; }
}

/* =========================================================
   MOTION — terms page (interaction only, no entrances)
   ========================================================= */
:root {
    --mo-fast: .14s;
    --mo-ease: cubic-bezier(.2, .7, .2, 1);
}
.terms-body a {
    transition: color var(--mo-fast) ease, opacity var(--mo-fast) ease;
}
.terms-body a:hover { color: var(--primary); opacity: .9; }
.terms-body table tbody tr { transition: background var(--mo-fast) ease; }
.terms-body table tbody tr:hover { background: var(--surface-2); }
.terms-accept-inner a { transition: color var(--mo-fast) ease; }

@media (prefers-reduced-motion: reduce) {
    .terms-body a, .terms-body table tbody tr, .terms-accept-inner a {
        transition: none !important;
    }
}