/* ==========================================================================
   CONCRETETHERM — site styles
   Brand navy from the existing site, the cube logo's orange as the accent,
   Inter throughout. Everything is plain CSS: no framework, no build step.
   ========================================================================== */
:root {
    --navy:      #0A3367;
    --navy-900:  #061F40;
    --navy-700:  #0E3E7A;
    --navy-500:  #2C6BB5;
    --navy-100:  #DCE6F3;
    --navy-050:  #EEF3FA;
    --accent:    #F26B1D;
    --accent-600:#D95511;

    --bg:        #FFFFFF;
    --bg-soft:   #F4F6FA;
    --text:      #16202E;
    --text-2:    #45536A;
    --text-3:    #6B778C;
    --border:    #E2E7EF;

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 20px;
    --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow-2: 0 10px 30px -12px rgba(10, 51, 103, 0.25);
    --shadow-3: 0 24px 60px -20px rgba(10, 51, 103, 0.35);

    --container: 1180px;
    --header-h: 72px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
/* A display rule on a class beats the browser's [hidden] rule; keep hidden elements hidden. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-500); text-decoration: none; }
a:hover { color: var(--navy); }
h1, h2, h3 { color: var(--navy); line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.2rem, 4.8vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; color: var(--text-2); }
:focus-visible { outline: 3px solid var(--navy-500); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; z-index: 200; }
.skip-link:focus { left: 8px; }

/* --- Header ---------------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--navy); font-weight: 800; letter-spacing: 0.06em; font-size: 1.05rem; }
.brand img { width: 36px; height: 36px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; align-items: center; gap: 4px; }
.site-nav a {
    display: block; padding: 8px 12px; border-radius: var(--r-sm);
    color: var(--text-2); font-size: 0.93rem; font-weight: 550; white-space: nowrap;
}
.site-nav a:hover { color: var(--navy); background: var(--navy-050); }
.site-nav a.active { color: var(--navy); background: var(--navy-050); }

.has-menu { position: relative; display: flex; align-items: center; }
.has-menu > a { padding-right: 4px; }
.submenu-toggle {
    border: none; background: transparent; color: var(--text-3); cursor: pointer;
    padding: 8px 8px 8px 2px; display: grid; place-items: center;
}
.submenu {
    position: absolute; top: calc(100% + 6px); left: 0; min-width: 250px;
    background: #fff; border: 1px solid var(--border); border-radius: var(--r-md);
    box-shadow: var(--shadow-2); padding: 6px;
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity .15s, transform .15s, visibility .15s;
}
.has-menu:hover .submenu, .has-menu:focus-within .submenu, .has-menu.open .submenu {
    opacity: 1; visibility: visible; transform: none;
}

.nav-toggle { display: none; border: none; background: transparent; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Buttons --------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px; border-radius: 999px; font-weight: 650; font-size: 0.95rem;
    border: 1px solid transparent; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -8px rgba(242, 107, 29, 0.7); }
.btn-primary:hover { background: var(--accent-600); color: #fff; transform: translateY(-1px); }
.btn-light { background: rgba(255,255,255,0.14); color: #fff; border-color: rgba(255,255,255,0.45); backdrop-filter: blur(6px); }
.btn-light:hover { background: rgba(255,255,255,0.24); color: #fff; }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--navy-100); }
.btn-outline:hover { border-color: var(--navy-500); color: var(--navy); }
.btn svg { width: 16px; height: 16px; }

/* --- Hero ------------------------------------------------------------------ */
.hero {
    position: relative; isolation: isolate; color: #fff;
    min-height: min(60vh, 560px); display: flex; align-items: center;
    padding: 64px 0;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; object-fit: cover; object-position: 78% 85%; width: 100%; height: 100%; }
.hero::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(100deg, rgba(6, 31, 64, 0.92) 0%, rgba(6, 31, 64, 0.7) 45%, rgba(6, 31, 64, 0.15) 100%);
}
.hero h1 { color: #fff; max-width: 14ch; }
.hero .eyebrow { color: #FFB28A; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 32px; }
.hero-tags span {
    padding: 6px 14px; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
    background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.3);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.page-hero {
    position: relative; isolation: isolate; color: #fff; padding: 88px 0 72px;
    background: var(--navy-900);
}
.page-hero .hero-bg { opacity: 0.35; }
.page-hero::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(6,31,64,0.4), rgba(6,31,64,0.95));
}
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); }
.page-hero p { color: rgba(255,255,255,0.85); max-width: 70ch; font-size: 1.08rem; }
.breadcrumb { font-size: 0.88rem; margin-bottom: 14px; color: rgba(255,255,255,0.7); }
.breadcrumb a { color: #fff; }

.eyebrow {
    display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}

/* --- Sections -------------------------------------------------------------- */
.section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); }
.section-navy { background: var(--navy); }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-navy p, .section-navy li { color: rgba(255,255,255,0.82); }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.split-media img, .split-media .video {
    border-radius: var(--r-lg); box-shadow: var(--shadow-3);
}
.split-media img { width: 100%; background: #fff; }

.points { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 12px; }
.points li { position: relative; padding-left: 30px; color: var(--text-2); }
.points li::before {
    content: ''; position: absolute; left: 0; top: 0.55em; width: 14px; height: 14px; border-radius: 4px;
    background: linear-gradient(135deg, var(--accent), #FFB28A);
}
.section-navy .points li { color: rgba(255,255,255,0.85); }
.section-navy .points li::before { background: linear-gradient(135deg, #FFB28A, var(--accent)); }

.callout {
    border-left: 4px solid var(--accent); background: #fff; padding: 16px 20px;
    border-radius: 0 var(--r-md) var(--r-md) 0; box-shadow: var(--shadow-1);
    color: var(--navy); font-weight: 600;
}
.section-navy .callout { background: rgba(255,255,255,0.08); color: #fff; }

blockquote.definition {
    margin: 0 0 1.2em; padding: 20px 24px; border-radius: var(--r-md);
    background: var(--navy-050); color: var(--navy); font-size: 1.05rem; font-style: italic;
}
blockquote.definition cite { display: block; margin-top: 10px; font-style: normal; font-size: 0.88rem; color: var(--text-3); }

/* --- Video (click to load, so pages stay fast) ----------------------------- */
.video {
    position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; background: #000;
    border-radius: var(--r-lg);
}
.video iframe, .video img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video button {
    position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer; background: transparent;
    display: grid; place-items: center;
}
.video button::after {
    content: ''; width: 76px; height: 76px; border-radius: 50%;
    background: rgba(242, 107, 29, 0.95) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='white'/%3E%3C/svg%3E") no-repeat 55% 50% / 34px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35); transition: transform .15s;
}
.video button:hover::after { transform: scale(1.08); }
.video-wide { max-width: 960px; margin: 0 auto; }

/* --- Cards ----------------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.card {
    display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
    border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1);
    transition: transform .2s, box-shadow .2s, border-color .2s; color: inherit;
}
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--navy-100); color: inherit; }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--navy-050); overflow: hidden; }
/* Any picture, tall or wide, fits inside the frame without stretching the card. */
.card-media img {
    position: absolute; inset: 24px; width: calc(100% - 48px); height: calc(100% - 48px);
    object-fit: contain;
}
/* A single tool shown across the full width: picture beside its text. */
.card-wide { flex-direction: row; }
.card-wide .card-media { flex: 0 0 42%; aspect-ratio: auto; min-height: 240px; }
.card-wide .card-body { justify-content: center; padding: 32px 36px; }
@media (max-width: 700px) {
    .card-wide { flex-direction: column; }
    .card-wide .card-media { aspect-ratio: 4 / 3; min-height: 0; }
}
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; }
.card-body p { margin: 0; font-size: 0.95rem; }
.card-kicker { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.card-link { margin-top: auto; padding-top: 12px; font-weight: 650; color: var(--navy-500); }
.card-link::after { content: ' →'; }

.group-title { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; }
.group-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.cards + .group-title { margin-top: 56px; }

/* --- Tool pages ------------------------------------------------------------ */
.tool-frame {
    width: 100%; min-height: 1100px; border: 1px solid var(--border); border-radius: var(--r-lg);
    background: #fff; box-shadow: var(--shadow-2);
}
.tool-frame[data-autoheight] { display: block; min-height: 600px; height: 1100px; }
.notice {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--r-md);
    background: #FFF6EE; border: 1px solid #FFD9BF; color: #7A3B0C; font-size: 0.93rem; margin-bottom: 24px;
}
.notice strong { color: #5E2B06; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.feature {
    padding: 24px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--border);
}
.feature h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature p { font-size: 0.95rem; margin: 0; }
.feature-icon {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px;
    background: var(--navy-050); color: var(--navy);
}
.feature-icon svg { width: 22px; height: 22px; }

.launch-panel {
    display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
    padding: 48px; border-radius: 28px; color: #fff;
    background: radial-gradient(120% 140% at 100% 0%, #1B4F92 0%, var(--navy) 45%, var(--navy-900) 100%);
    box-shadow: var(--shadow-3);
}
.launch-panel h2 { color: #fff; }
.launch-panel p { color: rgba(255,255,255,0.82); }
.launch-panel img { border-radius: var(--r-md); }
.beta-badge {
    display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 800;
    letter-spacing: 0.1em; background: var(--accent); color: #fff; margin-bottom: 14px;
}

/* --- About ------------------------------------------------------------------ */
.profile { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: start; }
.profile-photo img { border-radius: var(--r-lg); box-shadow: var(--shadow-3); }
.profile-links { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.profile-links a {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
    border: 1px solid var(--border); font-weight: 600; font-size: 0.9rem; color: var(--navy); background: #fff;
}
.profile-links a:hover { border-color: var(--navy-500); }
.profile-links img, .profile-links svg { width: 18px; height: 18px; }
.role { color: var(--accent); font-weight: 700; margin-top: -8px; }

.pubs { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: pub; }
.pubs li {
    counter-increment: pub; position: relative; padding: 18px 20px 18px 64px;
    background: #fff; border: 1px solid var(--border); border-radius: var(--r-md);
}
.pubs li::before {
    content: counter(pub); position: absolute; left: 18px; top: 18px; width: 30px; height: 30px;
    border-radius: 50%; background: var(--navy-050); color: var(--navy); font-weight: 700; font-size: 0.85rem;
    display: grid; place-items: center;
}
.pubs a { font-weight: 650; color: var(--navy); }
.pubs a:hover { color: var(--navy-500); }
.pubs .meta { display: block; font-size: 0.9rem; color: var(--text-3); margin-top: 4px; }

/* --- Contact ---------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: start; }
.form-frame { width: 100%; min-height: 900px; border: 0; border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-2); }

/* --- Footer ----------------------------------------------------------------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.75); padding: 56px 0 28px; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand strong { color: #fff; letter-spacing: 0.06em; }
.footer-brand p { color: rgba(255,255,255,0.6); margin: 4px 0 0; font-size: 0.92rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; }
.footer-links a { color: rgba(255,255,255,0.8); font-size: 0.93rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { padding-top: 20px; font-size: 0.85rem; color: rgba(255,255,255,0.5); }

/* --- Reveal on scroll (only when motion is welcome) ------------------------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
    .reveal.visible { opacity: 1; transform: none; }
}

/* --- Responsive ------------------------------------------------------------- */
@media (max-width: 1080px) {
    .nav-toggle { display: block; }
    .site-nav {
        /* The header's blur makes it the frame for this fixed panel, so "bottom: 0"
           stopped at the header's own bottom edge and cut the menu to one line.
           An explicit height fills the screen below the header instead. */
        position: fixed; top: var(--header-h); left: 0; right: 0;
        height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); background: #fff;
        padding: 16px 24px 40px; overflow-y: auto; display: none; border-top: 1px solid var(--border);
    }
    .site-nav.open { display: block; }
    .site-nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
    .site-nav a { font-size: 1.05rem; padding: 12px 14px; }
    .has-menu { flex-wrap: wrap; }
    .has-menu > a { flex: 1; }
    .submenu {
        position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0;
        padding: 0 0 6px 16px; width: 100%; display: none;
    }
    .has-menu.open .submenu { display: block; }
    .has-menu:hover .submenu { display: none; }
    .has-menu.open:hover .submenu { display: block; }
}
@media (max-width: 900px) {
    body { font-size: 16px; }
    .section { padding: 64px 0; }
    .split, .launch-panel, .profile, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
    .split.reverse > :first-child { order: 0; }
    .launch-panel { padding: 32px 24px; }
    .profile-photo { max-width: 320px; }
    .hero { min-height: 0; padding: 72px 0; }
    .hero::before { background: linear-gradient(180deg, rgba(6,31,64,0.75), rgba(6,31,64,0.92)); }
}
@media (max-width: 520px) {
    .container { padding: 0 16px; }
    .brand span { font-size: 0.95rem; }
}

/* ==========================================================================
   Accounts: header menu, sign-in pages, account page, contact form, admin
   ========================================================================== */
.muted { color: var(--text-3); font-size: 0.9em; }
.section-tight { padding: 48px 0 96px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Header */
.nav-account { position: relative; display: flex; align-items: center; margin-left: 8px; }
.btn-nav { padding: 8px 18px; font-size: 0.9rem; background: var(--navy); color: #fff; }
.btn-nav:hover { background: var(--navy-700); color: #fff; }
.avatar {
    display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--navy-500), var(--navy)); color: #fff;
    font-weight: 700; font-size: 0.85rem; letter-spacing: 0.02em;
}
.avatar-lg { width: 72px; height: 72px; font-size: 1.5rem; box-shadow: var(--shadow-2); }
.avatar-btn { border: 0; background: transparent; padding: 2px; border-radius: 50%; cursor: pointer; }
.avatar-btn:hover .avatar, .avatar-btn[aria-expanded="true"] .avatar { box-shadow: 0 0 0 3px var(--navy-100); }
.account-menu {
    position: absolute; right: 0; top: calc(100% + 10px); width: 260px; z-index: 120;
    background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-2); padding: 6px;
}
.account-menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; display: grid; }
.account-menu-head strong { color: var(--navy); }
.account-menu-head span { color: var(--text-3); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; }
.account-menu a, .account-menu button {
    display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: var(--r-sm);
    font: inherit; font-size: 0.93rem; color: var(--text-2); background: none; border: 0; cursor: pointer;
}
.account-menu a:hover, .account-menu button:hover { background: var(--navy-050); color: var(--navy); }
.account-menu .signout { color: #B42318; }

/* Buttons */
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-danger { background: #B42318; color: #fff; }
.btn-danger:hover { background: #912018; color: #fff; }
.btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--navy-500); cursor: pointer; text-decoration: underline; }

/* Forms */
.form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: 6px; }
.field > span { font-size: 0.85rem; font-weight: 600; color: var(--text-2); }
.field > span em { font-style: normal; font-weight: 400; color: var(--text-3); margin-left: 4px; }
.field small { color: var(--text-3); font-size: 0.8rem; }
.field input, .field select, .field textarea, .table-filter {
    width: 100%; font: inherit; font-size: 0.95rem; color: var(--text); background: #fff;
    border: 1px solid #CFD6DF; border-radius: 10px; padding: 11px 13px; transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus, .table-filter:focus {
    outline: none; border-color: var(--navy-500); box-shadow: 0 0 0 3px rgba(44, 107, 181, 0.18);
}
.field input:disabled { background: var(--bg-soft); color: var(--text-3); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--text-2); cursor: pointer; }
.check input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--navy); flex-shrink: 0; }
.form-error { color: #B42318; font-size: 0.9rem; font-weight: 500; }
.form-error:empty { display: none; }
.form-actions { display: flex; align-items: center; gap: 14px; }
.form-ok { color: #067647; font-weight: 600; font-size: 0.9rem; }
.form-inline { grid-template-columns: 1fr auto; align-items: end; }
.form-inline .form-error { grid-column: 1 / -1; }
.form-row-between { display: flex; justify-content: flex-end; font-size: 0.9rem; margin-top: -6px; }
.form-done { text-align: center; padding: 24px 8px; }
.form-done h3 { margin-bottom: 6px; }

/* Sign-in pages */
.auth-shell {
    min-height: calc(100vh - var(--header-h) - 140px); display: grid; place-items: center; padding: 64px 16px;
    background: radial-gradient(90% 70% at 50% 0%, var(--navy-050), #fff 70%);
}
.auth-card {
    width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--border); border-radius: 24px;
    padding: 40px 36px; box-shadow: var(--shadow-3);
}
.auth-card-wide { max-width: 640px; }
.auth-card h1 { font-size: 1.8rem; margin-bottom: 6px; }
.auth-sub { margin-bottom: 26px; }
.auth-foot { text-align: center; margin: 22px 0 0; font-size: 0.93rem; }
.auth-center { text-align: center; }
.auth-icon {
    width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 18px;
    background: var(--navy-050); color: var(--navy);
}
.auth-icon svg { width: 28px; height: 28px; }

/* Account page */
.account-hero { background: var(--navy-900); color: #fff; padding: 48px 0; }
.account-hero h1 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.4rem); margin: 0 0 4px; }
.account-hero p { color: rgba(255,255,255,0.75); margin: 0; }
.account-hero-inner { display: flex; align-items: center; gap: 22px; }
.account-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.account-nav { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 2px; }
.account-nav a { padding: 10px 14px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 550; font-size: 0.95rem; }
.account-nav a:hover { background: var(--navy-050); color: var(--navy); }
.account-nav a.active { background: var(--navy-050); color: var(--navy); box-shadow: inset 3px 0 0 var(--accent); }
.account-panels { display: grid; gap: 24px; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-1); scroll-margin-top: calc(var(--header-h) + 24px); }
.panel-head { margin-bottom: 20px; }
.panel-head h2 { font-size: 1.3rem; margin-bottom: 4px; }
.panel-head p { margin: 0; font-size: 0.95rem; }
.panel-danger { border-color: #FECDCA; }
.panel-danger h2 { color: #912018; }
.beta-status {
    display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center;
    padding: 16px 18px; border-radius: var(--r-md); margin-bottom: 20px; border: 1px solid;
}
.beta-status strong, .beta-status span { grid-column: 1; }
.beta-status span { font-size: 0.93rem; }
.beta-status .btn { grid-column: 2; grid-row: 1 / span 2; }
.beta-ok { background: #ECFDF3; border-color: #ABEFC6; color: #067647; }
.beta-warn { background: #FFFAEB; border-color: #FEDF89; color: #93370D; }
.beta-info { background: var(--navy-050); border-color: var(--navy-100); color: var(--navy); }
.beta-muted { background: var(--bg-soft); border-color: var(--border); color: var(--text-2); }
#redeem-form { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--border); }

/* Contact */
.contact-topics { display: grid; gap: 18px; margin-top: 8px; }
.contact-topic { display: flex; gap: 14px; align-items: flex-start; }
.contact-topic .feature-icon { flex-shrink: 0; margin: 0; }
.contact-topic h3 { font-size: 1rem; margin: 0 0 2px; }
.contact-topic p { margin: 0; font-size: 0.93rem; }

/* Admin */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 18px; }
.stat span { display: block; font-size: 0.82rem; color: var(--text-3); font-weight: 600; }
.stat strong { font-size: 1.7rem; color: var(--navy); }
.notice-inline { grid-column: 1 / -1; margin: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tab {
    border: 0; background: none; font: inherit; font-weight: 600; color: var(--text-3); padding: 12px 16px;
    border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
}
.tab:hover { color: var(--navy); }
.tab.active { color: var(--navy); border-bottom-color: var(--accent); }
.tab-panel { display: grid; gap: 14px; }
.table-filter { max-width: 420px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3);
            background: var(--bg-soft); padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-2); }
.table tr:last-child td { border-bottom: 0; }
.row-off td { opacity: 0.55; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.tag {
    display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
    background: var(--navy-050); color: var(--navy); margin: 2px 4px 0 0;
}
.tag-ok { background: #ECFDF3; color: #067647; }
.tag-warn { background: #FFFAEB; color: #93370D; }
.request-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 22px; }
.request-card > div:first-child { display: grid; gap: 2px; }
.message-card { padding: 20px 22px; }
.message-card.handled { opacity: 0.6; }
.message-head, .message-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.message-body { white-space: pre-wrap; margin: 12px 0; color: var(--text); }
code { font-family: ui-monospace, Consolas, monospace; background: var(--navy-050); color: var(--navy); padding: 2px 6px; border-radius: 6px; }

/* Toasts */
.toast-box { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: grid; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.toast {
    background: var(--navy-900); color: #fff; padding: 14px 18px; border-radius: var(--r-md); box-shadow: var(--shadow-3);
    font-size: 0.93rem; transition: opacity .3s, transform .3s;
}
.toast-ok { background: #067647; }
.toast-error { background: #B42318; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* Legal / plain text pages */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.3rem; margin-top: 32px; }

@media (max-width: 1080px) {
    .nav-account { margin-left: auto; margin-right: 8px; }
}
@media (max-width: 900px) {
    .account-grid { grid-template-columns: 1fr; }
    .account-nav { position: static; display: flex; overflow-x: auto; }
    .form-grid, .form-grid-4 { grid-template-columns: 1fr; }
    .request-card { flex-direction: column; align-items: flex-start; }
    .auth-card { padding: 32px 22px; }
}

/* Latest publications (home page) */
.pub-list { max-width: 900px; margin: 0 auto; display: grid; gap: 14px; }
.pub-updated { text-align: center; color: var(--text-3); font-size: 0.9rem; margin: -8px 0 6px; }
.pub-item {
    display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 22px 24px;
    background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-1, 0 1px 2px rgba(10,51,103,.06));
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.pub-item:hover { border-color: var(--navy-100); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.pub-num {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    background: var(--navy-050); color: var(--navy); font-weight: 800; font-size: 1.05rem;
}
.pub-item h3 { font-size: 1.08rem; line-height: 1.4; margin: 0 0 6px; }
.pub-item h3 a { color: var(--navy); }
.pub-item h3 a:hover { color: var(--accent); }
.pub-meta { font-size: 0.88rem; color: var(--text-2); margin: 0 0 8px; }
.pub-meta strong { color: var(--text); font-weight: 600; }
.pub-summary { font-size: 0.93rem; color: var(--text-2); margin: 0; }
.pub-more { justify-self: center; margin-top: 6px; }
.pub-status { text-align: center; color: var(--text-3); }
@media (max-width: 600px) {
    .pub-item { grid-template-columns: 1fr; padding: 18px; gap: 10px; }
    .pub-num { width: 36px; height: 36px; font-size: 0.95rem; }
}
.prose ul { padding-left: 1.2em; margin: 0 0 16px; }
.prose li { margin: 0 0 10px; color: var(--text-2); }
.prose li strong { color: var(--text); }
#tools { scroll-margin-top: var(--header-h); }
/* Admin: replying to a contact message */
.reply-form { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.reply-form[hidden] { display: none !important; }
.reply-form textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; resize: vertical; }
.reply-form .row-actions { justify-content: flex-end; }
.message-reply { margin: 4px 0 10px; padding: 10px 14px; background: var(--navy-050); border-left: 3px solid var(--navy-500); border-radius: 8px; }
.message-reply p { margin: 4px 0 0; white-space: pre-wrap; }
