:root {
    --adg-theme-bg: #f4f7fb;
    --adg-theme-surface: #ffffff;
    --adg-theme-ink: #162033;
    --adg-theme-muted: #64748b;
    --adg-theme-border: #dce3ed;
    --adg-theme-accent: #4f46e5;
    --adg-theme-shadow: 0 18px 50px rgba(15, 23, 42, .08);
    --adg-theme-radius: 24px;
}

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

html { min-height: 100%; scroll-behavior: smooth; }

body {
    min-width: 320px;
    min-height: 100%;
    margin: 0;
    background: var(--adg-theme-bg);
    color: var(--adg-theme-ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

body, button, input, select, textarea { -webkit-font-smoothing: antialiased; }

a { color: var(--adg-theme-accent); }
a:hover { color: #3730a3; }
button, a { touch-action: manipulation; }
img { display: block; max-width: 100%; height: auto; }

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.adg-skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--adg-theme-ink);
    color: #fff;
    transform: translateY(-150%);
}
.adg-skip-link:focus { transform: translateY(0); }

.adg-site-header {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid var(--adg-theme-border);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.adg-site-header__inner,
.adg-site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}
.adg-site-header__inner { min-height: 72px; }
.adg-site-brand,
.custom-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--adg-theme-ink);
    text-decoration: none;
}
.adg-site-brand > span:last-child { display: grid; line-height: 1.1; }
.adg-site-brand strong { font-size: 15px; font-weight: 900; }
.adg-site-brand small { margin-top: 3px; color: var(--adg-theme-muted); font-size: 10px; font-weight: 700; }
.adg-site-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: var(--adg-theme-accent);
    color: #fff;
    font-size: 22px;
    line-height: 1;
}
.custom-logo { max-height: 52px; width: auto; }
.adg-site-nav { display: block; }
.adg-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.adg-menu a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 12px;
    color: var(--adg-theme-muted);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}
.adg-menu a:hover,
.adg-menu .current-menu-item > a { background: #eef2ff; color: var(--adg-theme-accent); }
.adg-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--adg-theme-border);
    border-radius: 13px;
    background: var(--adg-theme-surface);
    color: var(--adg-theme-ink);
    font-size: 20px;
}

.adg-site-main {
    min-height: calc(100dvh - 130px);
    padding: 32px 20px 56px;
}
.adg-app-stage { display: grid; place-items: center; min-height: calc(100dvh - 130px); }
.adg-app-stage > .adg-app { width: min(100%, 520px); }
.adg-content-card {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: clamp(22px, 5vw, 42px);
    border: 1px solid var(--adg-theme-border);
    border-radius: var(--adg-theme-radius);
    background: var(--adg-theme-surface);
    box-shadow: var(--adg-theme-shadow);
}
.adg-content-card__header { margin-bottom: 24px; }
.adg-content-card h1,
.adg-post-card h2 { margin: 0; color: var(--adg-theme-ink); line-height: 1.15; }
.adg-content-card h1 { font-size: clamp(28px, 5vw, 44px); }
.adg-post-list { display: grid; gap: 14px; }
.adg-post-card { padding: 18px 0; border-bottom: 1px solid var(--adg-theme-border); }
.adg-post-card:last-child { border-bottom: 0; }
.adg-post-card h2 { font-size: 21px; }
.adg-post-card h2 a { color: inherit; text-decoration: none; }
.adg-post-card h2 a:hover { color: var(--adg-theme-accent); }
.adg-eyebrow { margin: 0 0 7px; color: var(--adg-theme-accent); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.adg-entry-content > :first-child { margin-top: 0; }
.adg-entry-content > :last-child { margin-bottom: 0; }
.adg-action-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 13px;
    background: var(--adg-theme-accent);
    color: #fff;
    font-weight: 850;
    text-decoration: none;
}
.adg-action-link:hover { background: #3730a3; color: #fff; }

.adg-site-footer { border-top: 1px solid var(--adg-theme-border); background: var(--adg-theme-surface); }
.adg-site-footer__inner { min-height: 58px; color: var(--adg-theme-muted); font-size: 11px; font-weight: 700; }
.adg-site-footer p { margin: 0; }

/* The app is the product surface: give it the whole viewport on mobile. */
.adg-app-surface .adg-site-header,
.adg-app-surface .adg-site-footer { display: none; }
.adg-app-surface .adg-site-main { min-height: 100dvh; padding: 0; }
.adg-app-surface .adg-app-stage { min-height: 100dvh; }

@media (max-width: 680px) {
    .adg-site-header__inner,
    .adg-site-footer__inner { width: min(100% - 28px, 1120px); }
    .adg-menu-toggle { display: grid; place-items: center; }
    .adg-site-nav {
        position: absolute;
        top: calc(100% + 8px);
        right: 14px;
        left: 14px;
        display: none;
        padding: 8px;
        border: 1px solid var(--adg-theme-border);
        border-radius: 16px;
        background: var(--adg-theme-surface);
        box-shadow: var(--adg-theme-shadow);
    }
    .adg-site-nav.is-open { display: block; }
    .adg-menu { display: grid; gap: 2px; }
    .adg-menu a { display: flex; width: 100%; }
    .adg-site-main { padding: 22px 14px 40px; }
    .adg-app-stage { min-height: calc(100dvh - 40px); }
    .adg-site-footer__inner { flex-direction: column; justify-content: center; gap: 2px; padding: 12px 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; }
}
