:root {
    --bg: #242121;
    --surface: #2d2d2d;
    --border: #3f3f46;
    --text: #e5e7eb;
    --heading: #ffffff;
    --muted: #9ca3af;
    --dim: #6b7280;
    --accent: #4ed6a2;
    --accent-soft: rgba(78, 214, 162, 0.08);
    --radius: 12px;
    color-scheme: dark;
}

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

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

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

main {
    flex: 1;
    padding: 48px 16px 64px;
}

a {
    color: var(--accent);
    text-underline-offset: 4px;
}

h1,
h2,
h3 {
    color: var(--heading);
    line-height: 1.25;
    margin: 0;
}

h1 {
    font-size: clamp(1.875rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

p {
    margin: 0;
}

.container {
    max-width: 48rem;
    margin: 0 auto;
}

.container--narrow {
    max-width: 42rem;
}

.container--wide {
    max-width: 56rem;
}

/* ---------- Header / footer ---------- */

.site-header,
.site-footer {
    padding: 0 16px;
    border-color: var(--border);
    border-style: solid;
    border-width: 0;
}

.site-header {
    border-bottom-width: 1px;
}

.site-footer {
    border-top-width: 1px;
    font-size: 0.875rem;
    color: var(--dim);
}

.site-header .container,
.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 24px;
    padding: 16px 0;
}

.site-footer .container {
    justify-content: space-between;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.875rem;
    color: var(--muted);
}

.breadcrumb li + li::before {
    content: "/";
    margin-right: 8px;
    color: var(--dim);
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--heading);
}

.breadcrumb [aria-current="page"] {
    color: var(--heading);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--heading);
    text-decoration: underline;
}

/* ---------- Page header ---------- */

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.eyebrow {
    margin-bottom: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
}

.lead {
    max-width: 36rem;
    margin: 16px auto 0;
    color: var(--muted);
}

.updated {
    margin-top: 16px;
    font-size: 0.875rem;
    color: var(--dim);
}

/* ---------- Store buttons ---------- */

.store-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid #4b5563;
    border-radius: 8px;
    background: var(--surface);
    color: var(--heading);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.15s;
}

.btn:hover {
    border-color: var(--accent);
}

.btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ---------- Cards ---------- */

.grid {
    display: grid;
    gap: 16px;
}

@media (min-width: 640px) {
    .grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid--2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.card h2 {
    font-size: 1rem;
    color: var(--accent);
}

.card p {
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--muted);
}

a.card {
    display: block;
    padding: 24px;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s;
}

a.card:hover {
    border-color: var(--accent);
}

a.card h2 {
    font-size: 1.25rem;
}

.card .tagline {
    margin-top: 4px;
    font-weight: 500;
    color: #d1d5db;
}

.card .more {
    display: inline-block;
    margin-top: 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent);
}

a.card:hover .more {
    text-decoration: underline;
}

.link-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
}

.link-row a {
    color: #d1d5db;
    text-decoration: none;
}

.link-row a:hover {
    color: var(--heading);
    text-decoration: underline;
}

/* ---------- Legal documents ---------- */

.doc {
    padding: 24px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
    .doc {
        padding: 32px;
    }
}

.doc .page-header {
    margin-bottom: 32px;
}

.doc .subtitle {
    margin-top: 4px;
    color: var(--muted);
}

.doc .intro {
    margin-bottom: 32px;
    font-size: 0.875rem;
    color: var(--muted);
}

.doc section {
    padding-bottom: 32px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.doc section:last-of-type {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.doc section p {
    margin-top: 12px;
}

/* Màn hẹp mà justify thì giữa các chữ hở rất to. */
@media (min-width: 768px) {
    .doc section p {
        text-align: justify;
    }
}

.doc--accent-headings section h2 {
    color: var(--accent);
}

.contact {
    margin-top: 32px;
    padding: 20px;
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    background: var(--accent-soft);
}

@media (min-width: 768px) {
    .contact {
        padding: 24px;
    }
}

.contact p {
    margin-top: 8px;
    font-size: 0.875rem;
    color: #d1d5db;
}

.contact a {
    display: inline-block;
    margin-top: 12px;
    font-weight: 500;
    text-decoration: none;
    word-break: break-all;
}

.contact a:hover {
    text-decoration: underline;
}

/* ---------- Support ---------- */

.support-box {
    text-align: center;
    padding: 24px;
}

.support-box p {
    margin-top: 0;
}

.support-box .email {
    display: inline-block;
    margin-top: 4px;
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    word-break: break-all;
}

.support-box .email:hover {
    text-decoration: underline;
}

.support-box .hint {
    margin-top: 12px;
    color: var(--dim);
}

.faq {
    margin-top: 40px;
}

.faq > h2 {
    font-size: 1.25rem;
    margin-bottom: 24px;
}

.faq-item {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: 0;
}

.faq-item h3 {
    font-size: 1rem;
    font-weight: 500;
}

.faq-item p {
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--muted);
}

/* ---------- Misc ---------- */

.center {
    text-align: center;
}

.center .btn {
    margin-top: 32px;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
