:root {
    --ag-bg: #f5f8fc;
    --ag-bg-soft: #eef5fb;
    --ag-card: #ffffff;
    --ag-text: #1f2933;
    --ag-heading: #16355d;
    --ag-muted: #64748b;
    --ag-border: #d9e6f3;
    --ag-accent: #29619b;
    --ag-accent-dark: #1f4d7d;
    --ag-accent-soft: #eaf3fb;
    --ag-accent-light: #4f83bd;
    --ag-green: #91b35f;
    --ag-ok: #067647;
    --ag-warn: #b54708;
    --ag-urgent: #b42318;
    --ag-danger-bg: #fff3f0;
    --ag-shadow: 0 22px 50px rgba(22, 53, 93, .10);
    --ag-radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ag-text);
    background:
        radial-gradient(circle at top left, rgba(41,97,155,.12), transparent 34rem),
        linear-gradient(180deg, #ffffff 0%, var(--ag-bg) 48%, #ffffff 100%);
    line-height: 1.55;
    font-size: 16px;
}
a { color: inherit; }

.site-header {
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid rgba(217,230,243,.95);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
}
.site-header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 800;
    color: var(--ag-heading);
    letter-spacing: -.02em;
}
.brand-logo {
    display: block;
    width: 255px;
    max-width: min(255px, 58vw);
    height: auto;
}
.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--ag-accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    box-shadow: 0 10px 24px rgba(41,97,155,.22);
}
.brand-subline {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--ag-muted);
    margin-top: -2px;
    letter-spacing: 0;
}
.nav {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    color: var(--ag-muted);
    font-size: 15px;
    font-weight: 700;
}
.nav a { text-decoration: none; }
.nav a:hover { color: var(--ag-accent); }

.wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 48px 20px 34px;
}
.demo-wrap { max-width: 960px; }
.card {
    background: var(--ag-card);
    border: 1px solid var(--ag-border);
    border-radius: var(--ag-radius);
    padding: 30px;
    box-shadow: var(--ag-shadow);
    margin-bottom: 18px;
}
.hero-card {
    position: relative;
    overflow: hidden;
}
.hero-card::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ag-accent-soft), rgba(145,179,95,.18));
    right: -135px;
    top: -135px;
    z-index: 0;
}
.hero-card > * { position: relative; z-index: 1; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--ag-accent-soft);
    color: var(--ag-accent-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .01em;
}
h1, h2, h3 {
    color: var(--ag-heading);
    line-height: 1.18;
    letter-spacing: -.03em;
}
h1 { font-size: clamp(32px, 4.2vw, 52px); margin: 0 0 14px; }
h2 { font-size: 24px; margin: 0 0 12px; }
h3 { font-size: 18px; margin: 20px 0 10px; }
p { color: var(--ag-muted); margin-top: 0; }
.lead { font-size: 18px; max-width: 780px; }

.feature-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 22px 0 4px;
}
.feature {
    background: #f8fbff;
    border: 1px solid var(--ag-border);
    border-radius: 16px;
    padding: 14px;
    font-weight: 800;
    color: var(--ag-heading);
}
.feature span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ag-muted);
    margin-top: 4px;
}

label { display: block; margin: 18px 0 7px; font-weight: 800; color: var(--ag-heading); }
input, select {
    width: 100%;
    border: 1px solid var(--ag-border);
    border-radius: 14px;
    padding: 14px 15px;
    font-size: 17px;
    background: #fff;
    color: var(--ag-text);
    transition: border-color .18s ease, box-shadow .18s ease;
}
input:focus, select:focus {
    outline: none;
    border-color: var(--ag-accent);
    box-shadow: 0 0 0 4px rgba(41,97,155,.16);
}
.row { display: grid; grid-template-columns: 1fr 2fr; gap: 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; }
.check input { width: auto; margin-top: 5px; transform: scale(1.15); }
.small { font-size: 14px; color: var(--ag-muted); }
.hidden { display: none; }

.button, .button-link, button {
    background: var(--ag-accent);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 14px 22px;
    font-size: 16px;
    line-height: 1.1;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 12px 28px rgba(41,97,155,.24);
}
.button:hover, .button-link:hover, button:hover { background: var(--ag-accent-dark); }
.button:disabled { opacity: .55; cursor: not-allowed; }
button.secondary, .button-link.secondary {
    background: #eef5fb;
    color: var(--ag-heading);
    box-shadow: none;
}
button.secondary:hover, .button-link.secondary:hover { background: #dcebf8; }

.errors {
    background: var(--ag-danger-bg);
    border: 1px solid #ffb4a8;
    color: var(--ag-urgent);
    border-radius: 16px;
    padding: 14px 16px;
    margin: 0 0 18px;
    font-weight: 700;
}
.success {
    background: #eaf3fb;
    border: 1px solid #bfd7ef;
    border-radius: 18px;
    padding: 20px;
    margin: 22px 0 0;
}
.countdown { font-size: 44px; font-weight: 900; color: var(--ag-accent); letter-spacing: -.04em; }

.page-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}
.page-head h1 { font-size: clamp(30px, 3.2vw, 42px); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.topline { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 13px;
    font-weight: 900;
    font-size: 14px;
    background: #edf2f7;
    color: #243b53;
    white-space: nowrap;
}
.badge.ok { background: #ecfdf3; color: var(--ag-ok); }
.badge.warn { background: #fff7ed; color: var(--ag-warn); }
.badge.urgent { background: #fff3f0; color: var(--ag-urgent); }
.badge.pending { background: #eef2ff; color: #3730a3; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.item { background: #f8fbff; border: 1px solid var(--ag-border); border-radius: 15px; padding: 13px; }
.label { color: var(--ag-muted); font-size: 13px; margin-bottom: 4px; }
.value { font-weight: 800; word-break: break-word; }
.summary { white-space: pre-wrap; background: #f8fbff; border: 1px solid var(--ag-border); border-radius: 15px; padding: 16px; min-height: 68px; }
.transcript { white-space: pre-wrap; background: #16232e; color: #eef5fb; border-radius: 15px; padding: 17px; min-height: 140px; overflow: auto; font-family: Consolas, Monaco, monospace; font-size: 14px; }
.muted { color: var(--ag-muted); }
.notice { background: #fffdf0; border: 1px solid #f5d565; color: #5c3d00; border-radius: 15px; padding: 13px 15px; margin-top: 12px; }
.wait { display: flex; gap: 10px; align-items: center; color: var(--ag-muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ag-accent); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%{opacity:.25; transform:scale(.9)} 50%{opacity:1; transform:scale(1.1)} 100%{opacity:.25; transform:scale(.9)} }

.site-footer {
    border-top: 1px solid var(--ag-border);
    background: #fff;
    margin-top: 36px;
}
.site-footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    flex-wrap: wrap;
    color: var(--ag-muted);
    font-size: 14px;
}
.footer { color: var(--ag-muted); font-size: 13px; margin-top: 10px; }

@media (max-width: 760px) {
    .site-header-inner { display: block; }
    .brand-logo { width: 220px; max-width: 72vw; }
    .nav { justify-content: flex-start; margin-top: 12px; gap: 12px; }
    .wrap { padding: 28px 16px; }
    .card { padding: 22px; border-radius: 18px; }
    .row, .grid, .feature-strip { grid-template-columns: 1fr; }
    .page-head, .topline { display: block; }
    .actions { justify-content: flex-start; margin-top: 14px; }
}

@media print {
    body { background: #fff; }
    .site-header, .site-footer, .actions, .footer, .wait { display: none !important; }
    .wrap { padding: 0; }
    .card { box-shadow: none; break-inside: avoid; }
    .transcript { background: #fff; color: #111; border: 1px solid #ccc; }
}
