:root {
  --bg: #f5f5f5;
  --ink: #2d3142;
  --muted: #4f5d75;
  --soft: #7a8399;
  --hairline: rgba(45,49,66,.14);
  --accent: #eb6c36;
  --font-sans: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, Consolas, Menlo, monospace;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.5;
    /* opacity only: a transform here would make <body> the containing block for every
       position:fixed element (bottom sheets, overlays). No fill-mode, so nothing lingers. */
    animation: fadeIn 250ms ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Shared Nav */
#site-nav-container {
    position: sticky;
    top: 0;
    height: 56px;
    background: rgba(245, 245, 245, 0.95);
    backdrop-filter: blur(8px);
    z-index: 1000;
    border-bottom: 1px solid var(--hairline);
    display: flex;
    align-items: center;
    padding: 0 24px;
    justify-content: space-between;
}
.site-nav {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
}
.nav-brand {
    font-weight: 600;
    font-size: 16px;
}
.nav-links {
    display: flex;
    gap: 24px;
}
.nav-links a {
    text-decoration: none;
    color: var(--soft);
    font-weight: 500;
}
.nav-links a:hover, .nav-links a:focus {
    color: var(--ink);
}
.nav-links a.active {
    color: var(--accent);
}
.nav-pill {
    font-size: 12px;
    background: rgba(0,0,0,0.05);
    padding: 4px 10px;
    border-radius: 12px;
    color: var(--muted);
    font-weight: 500;
}

@media (max-width: 760px) {
    #site-nav-container {
        padding: 0 12px;
    }
    .nav-brand {
        display: none;
    }
    .nav-links {
        width: 100%;
        justify-content: space-around;
        gap: 0;
    }
    .nav-pill {
        display: none;
    }
}

.page-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Overview specific */
.hero-section {
    margin-bottom: 40px;
}
.hero-section h1 {
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.3;
    margin-bottom: 24px;
}
.hero-svg-container {
    position: relative;
    background: white;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 40px;
}
#replay-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: var(--bg);
    border: 1px solid var(--hairline);
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: var(--ink);
}
.content-section p {
    margin-bottom: 16px;
}
.outcomes-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 32px 0;
}
.outcome-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--hairline);
}
.outcome-card svg {
    margin-bottom: 12px;
}
details {
    background: white;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    margin-bottom: 32px;
}
summary {
    padding: 16px;
    cursor: pointer;
    font-weight: 600;
}
.details-content {
    padding: 0 16px 16px;
}

.status-line {
    font-size: 12px;
    color: var(--soft);
    margin-top: 40px;
}
.cta {
    margin-top: 40px;
    text-align: center;
}
.btn-cta {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}
.btn-cta:hover {
    background: #d65c26;
}

/* Dimensions specific */
.dimensions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 32px;
}
.dim-card {
    background: white;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    outline: none;
    position: relative;
    color: var(--ink);
    transition: transform 0.2s, box-shadow 0.2s;
}
.dim-card:hover, .dim-card:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-color: var(--accent);
}
.dim-icon-wrapper {
    margin-bottom: 16px;
    color: var(--accent);
    height: 50px;
    width: 50px;
}
.dim-code {
    font-family: var(--font-mono);
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 8px;
    font-size: 14px;
}
.dim-info h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
}
.dim-info p {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
}
.footnote {
    margin-top: 40px;
    font-size: 13px;
    color: var(--soft);
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--hairline);
}

/* Slide Panel */
.panel-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 2000;
}
.panel-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.slide-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 100vw;
    height: 100%;
    background: white;
    box-shadow: -4px 0 12px rgba(0,0,0,0.1);
    z-index: 2001;
    transition: right 0.3s ease-out;
    padding: 40px 24px;
    box-sizing: border-box;
}
.slide-panel.active {
    right: 0;
}
.panel-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--soft);
}
.panel-info h3 {
    margin-top: 0;
    color: var(--accent);
}
.panel-info p {
    color: var(--muted);
    font-size: 15px;
}
.panel-detail {
    margin-top: 24px;
    font-size: 15px;
    line-height: 1.6;
}
@media (max-width: 760px) {
    .slide-panel {
        top: auto;
        bottom: -100%;
        right: 0;
        width: 100%;
        height: auto;
        min-height: 30vh;
        max-height: 80vh;
        border-radius: 16px 16px 0 0;
        transition: bottom 0.3s ease-out;
        padding: 48px 24px 40px;
    }
    .slide-panel.active {
        bottom: 0;
        right: 0;
    }
}

footer { padding: 32px 24px; text-align: center; color: var(--soft); font-size: 12px; }

/* View Transitions */
@view-transition {
    navigation: auto;
}
