/* countries.ling-gov.org — official register theme
   Navy/gold, serif masthead, restrained motion. Adapted from linglin.art's
   ling.gov palette (kept: --ink/--deep/--sky/--gold/--gold-dark), with the
   festive gradient/flag-watermark background, pill-shaped nav, and pink
   hover state removed in favor of a flatter, more formal register. */

@font-face {
    font-family: "Libre Baskerville";
    src: url("/static/fonts/LibreBaskerville-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: "Libre Baskerville";
    src: url("/static/fonts/LibreBaskerville-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
}

:root {
    --ink: #1a2450;
    --deep: #274a9f;
    --sky: #3b66cc;
    --gold: #f2c644;
    --gold-dark: #c49a2b;
    --leaf: #2f8b57;
    --rose: #c6535a;
    --mist: #f4f6fb;
    --line: rgba(26, 36, 80, 0.14);
    --text: #1d2440;
    --dim: #5a6488;
    --panel: #ffffff;
    --radius: 6px;
    --radius-sm: 4px;
    --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--mist);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.5;
}

a { color: var(--deep); }
a:hover { color: var(--sky); }

/* ── masthead ── */
header {
    background: var(--ink);
    border-bottom: 3px solid var(--gold-dark);
}
.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.9rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    flex-wrap: wrap;
}
.brand {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.35rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.01em;
}
.brand span {
    display: block;
    font-family: var(--sans);
    font-weight: 400;
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
    margin-top: 0.1rem;
}
header nav { display: flex; gap: 0.3rem; margin-left: 0.5rem; }
header nav a {
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    font-size: 0.92rem;
    padding: 0.4rem 0.1rem;
    border-bottom: 2px solid transparent;
}
header nav a:hover, header nav a.active {
    color: #fff;
    border-bottom-color: var(--gold);
}
.langsel { display: flex; gap: 0.5rem; align-items: center; margin-left: auto; }
.lang-opt {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.78rem;
    padding: 0.15rem 0.3rem;
}
.lang-opt:hover { color: #fff; }
.lang-opt.on { color: var(--gold); font-weight: 700; }

.official-strip {
    background: var(--deep);
    color: rgba(255,255,255,0.88);
    font-size: 0.78rem;
    text-align: center;
    padding: 0.3rem;
    letter-spacing: 0.02em;
}

/* ── layout ── */
main { flex: 1; max-width: 1100px; margin: 0 auto; padding: 2rem 1.25rem; width: 100%; }
main h1, main h2, main h3 { font-family: var(--serif); color: var(--ink); }
main h1 { font-size: 1.9rem; margin-bottom: 0.3rem; }

footer {
    background: var(--ink);
    color: rgba(255,255,255,0.65);
    font-size: 0.82rem;
    text-align: center;
    padding: 1.1rem;
}
footer a { color: rgba(255,255,255,0.85); }

/* ── panels / cards ── */
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
}
.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
}

/* ── forms ── */
.auth-box { max-width: 460px; margin: 1rem auto; }
.form { display: flex; flex-direction: column; gap: 0.9rem; margin: 1rem 0; }
.form label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.88rem; color: var(--dim); }
.form input, .form textarea, .form select {
    font: inherit;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
}
.form input:focus, .form textarea:focus, .form select:focus {
    outline: 2px solid var(--sky);
    border-color: var(--sky);
}
.form button, button.primary {
    font: inherit;
    background: var(--deep);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.1rem;
    cursor: pointer;
    font-weight: 600;
}
.form button:hover, button.primary:hover { background: var(--ink); }
button.secondary {
    font: inherit;
    background: #fff;
    color: var(--deep);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.1rem;
    cursor: pointer;
}

.error {
    background: #fdf1f1;
    border: 1px solid var(--rose);
    color: #7a2a2f;
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.9rem;
    margin-bottom: 1rem;
}
.muted { color: var(--dim); font-size: 0.88rem; }
.qrbox { display: flex; justify-content: center; margin: 1rem 0; }
.secret code {
    display: block;
    background: var(--mist);
    padding: 0.5rem 0.7rem;
    border-radius: var(--radius-sm);
    word-break: break-all;
    font-size: 0.85rem;
}

/* ── status badges (semantic use only: valid/invalid, approved/denied) ── */
.badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}
.badge.valid, .badge.approved, .badge.issued { background: #eaf6ee; color: var(--leaf); border: 1px solid var(--leaf); }
.badge.invalid, .badge.denied, .badge.revoked { background: #fbeced; color: var(--rose); border: 1px solid var(--rose); }
.badge.pending { background: #fdf6e3; color: var(--gold-dark); border: 1px solid var(--gold-dark); }

table { width: 100%; border-collapse: collapse; }
table th, table td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
table th { color: var(--dim); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }

.hero { text-align: center; padding: 2.5rem 0 1.5rem; }
.hero h1 { font-size: 2.1rem; }
.hero p { color: var(--dim); max-width: 640px; margin: 0.6rem auto 0; }
