:root {
    color-scheme: light;
    --bg: #f4efe6;
    --panel: rgba(255, 252, 247, 0.92);
    --panel-strong: rgba(255, 252, 247, 0.97);
    --ink: #111111;
    --muted: #61594f;
    --accent: #9c2f17;
    --accent-2: #1d5c63;
    --border: rgba(17, 17, 17, 0.1);
    --shadow: 0 18px 48px rgba(76, 49, 25, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(156, 47, 23, 0.18), transparent 34%),
        radial-gradient(circle at bottom right, rgba(29, 92, 99, 0.16), transparent 30%),
        var(--bg);
    color: var(--ink);
}

a {
    color: inherit;
}

.site-frame {
    min-height: 100vh;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    padding: 0;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 252, 247, 0.9);
    backdrop-filter: blur(18px);
    box-shadow: 0 6px 24px rgba(76, 49, 25, 0.08);
}

.site-header__inner {
    width: min(980px, calc(100vw - 2rem));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
}

.site-brand {
    display: grid;
    gap: 0.1rem;
    text-decoration: none;
    min-width: 0;
}

.site-brand__title {
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-2);
}

.site-brand__subtitle {
    font-size: 0.84rem;
    color: var(--muted);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex: 1;
}

.site-nav__link,
.github-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.5rem;
    padding: 0.65rem 0.95rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    color: var(--muted);
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible,
.github-link:hover,
.github-link:focus-visible {
    background: rgba(29, 92, 99, 0.1);
    color: var(--accent-2);
    transform: translateY(-1px);
}

.site-nav__link.is-active {
    background: rgba(29, 92, 99, 0.12);
    color: var(--accent-2);
}

.github-link {
    padding-inline: 0.8rem;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.5);
}

.github-link svg {
    inline-size: 1.1rem;
    block-size: 1.1rem;
    flex: 0 0 auto;
}

.github-link__label {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.site-main {
    padding: 6.25rem 1rem 3rem;
}

.shell {
    width: min(720px, calc(100vw - 2rem));
    margin: 1rem auto 0;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--panel);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-2);
}

.brand-lockup {
    display: grid;
    gap: 0.2rem;
}

.brand-line {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.trust-band {
    display: grid;
    gap: 0.25rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(29, 92, 99, 0.16);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(29, 92, 99, 0.09), rgba(156, 47, 23, 0.08));
}

.trust-band__label,
.trust-band__body {
    margin: 0;
}

.trust-band__label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-2);
}

.trust-band__body {
    color: var(--ink);
    font-size: 0.98rem;
}

h1 {
    margin: 0.4rem 0 0.5rem;
    font-size: clamp(2.2rem, 6vw, 3.9rem);
    line-height: 0.95;
}

h2 {
    margin: 0;
    font-size: 1.2rem;
}

.lede {
    margin: 0;
    max-width: 50ch;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.55;
}

.shell--static {
    margin-top: 6rem;
}

.stack {
    display: grid;
    gap: 1.25rem;
}

.stack--compact {
    gap: 0.65rem;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.field label,
.toggle {
    font-size: 0.95rem;
    font-weight: 600;
}

.field textarea,
.field select,
.field input,
.output-block textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.65);
    color: var(--ink);
    padding: 0.95rem 1rem;
    font: inherit;
    resize: vertical;
}

.field textarea,
.output-block textarea,
.secret-output {
    min-height: 11rem;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.52);
}

.toggle-row input {
    inline-size: 1.15rem;
    block-size: 1.15rem;
}

.actions,
.output-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

button {
    appearance: none;
    border: none;
    border-radius: 999px;
    padding: 0.9rem 1.25rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 160ms ease, opacity 160ms ease;
}

button:hover {
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.55;
    cursor: wait;
    transform: none;
}

.button-primary {
    background: linear-gradient(135deg, var(--accent), #c75726);
    color: #fff8f1;
}

.button-secondary {
    background: rgba(29, 92, 99, 0.12);
    color: var(--accent-2);
}

.button-danger {
    background: rgba(156, 47, 23, 0.12);
    color: var(--accent);
}

.helper,
.meta,
.warning,
.status-line,
.content-section p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.warning {
    color: var(--accent);
}

.status-line[data-tone="error"] {
    color: var(--accent);
}

.status-line[data-tone="success"] {
    color: var(--accent-2);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.06);
    font-size: 0.85rem;
    text-transform: capitalize;
}

.info-card,
.result-card {
    padding: 1.15rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.56);
}

.output-block {
    display: grid;
    gap: 0.65rem;
}

.output-block textarea {
    min-height: 5.8rem;
}

.secret-output {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fffdf9;
    padding: 1rem;
    margin: 0;
}

.meta-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.meta-grid strong {
    display: block;
    margin-bottom: 0.2rem;
}

.content-section {
    padding-top: 0.35rem;
}

.how-it-works .content-section,
.legal-copy .content-section {
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(17, 17, 17, 0.06);
}

.how-it-works .content-section:last-child,
.legal-copy .content-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border);
}

.footer-brand {
    color: var(--muted);
    font-size: 0.92rem;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-nav a {
    color: var(--accent-2);
    text-decoration: none;
    font-weight: 600;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
    text-decoration: underline;
}

@media (max-width: 720px) {
    .site-header__inner {
        gap: 0.65rem;
        padding: 0.7rem 0.8rem;
    }

    .site-brand__subtitle {
        font-size: 0.78rem;
    }

    .site-nav {
        gap: 0.3rem;
    }

    .site-nav__link,
    .github-link {
        padding: 0.55rem 0.7rem;
        font-size: 0.92rem;
    }

    .shell {
        padding: 1.45rem;
    }
}

@media (max-width: 640px) {
    .site-header {
        border-bottom-width: 1px;
    }

    .site-header__inner {
        width: calc(100vw - 1rem);
        flex-wrap: wrap;
        justify-content: flex-start;
        padding-inline: 0.5rem;
    }

    .site-brand {
        flex: 1 1 auto;
    }

    .site-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        padding-top: 0.15rem;
        overflow-x: auto;
    }

    .site-main {
        padding: 6.75rem 0.5rem 2rem;
    }

    .shell {
        width: calc(100vw - 1rem);
        margin-top: 0.75rem;
        padding: 1.25rem;
        border-radius: 20px;
    }

    h1 {
        font-size: clamp(2rem, 12vw, 3rem);
    }
}
