:root {
    --bg: #f4f1ea;
    --surface: #fffdf8;
    --surface-strong: #f7f3ec;
    --border: #ddd3c4;
    --text: #1f2430;
    --muted: #5f6673;
    --brand: #184a45;
    --brand-soft: #d7ebe7;
    --accent: #a95b2a;
    --danger: #a33434;
    --danger-soft: #f9e0e0;
    --info-soft: #e4edf8;
    --shadow: 0 14px 38px rgba(31, 36, 48, 0.08);
    --radius: 18px;
    --radius-sm: 10px;
    --content-width: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(169, 91, 42, 0.12), transparent 28%),
        radial-gradient(circle at right 20%, rgba(24, 74, 69, 0.14), transparent 24%),
        linear-gradient(180deg, #f8f5ef 0%, var(--bg) 100%);
    min-height: 100vh;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    padding: 1.25rem 1.5rem 0;
}

.site-header__inner,
.site-main,
.site-footer__inner {
    width: min(calc(100% - 2rem), var(--content-width));
    margin: 0 auto;
}

.site-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(221, 211, 196, 0.9);
    border-radius: calc(var(--radius) + 4px);
    background: rgba(255, 253, 248, 0.78);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.site-brand {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.site-brand__title {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--brand);
}

.site-brand__accent {
    color: var(--brand);
    margin-left: 0.2rem;
}

.site-brand__tenant {
    color: var(--text);
    margin-left: 0.2rem;
}

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

.site-header__nav {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-left: auto;
    justify-content: flex-end;
}

.site-main {
    flex: 1;
    padding: 1.5rem 0 3rem;
}

.site-footer {
    padding: 0 1.5rem 1.5rem;
}

.site-footer__inner {
    color: var(--muted);
    font-size: 0.95rem;
}

.page-hero,
.panel,
.auth-card,
.card-grid__item,
.module-tile,
.status-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.page-hero {
    padding: 2.5rem;
    display: grid;
    gap: 2rem;
}

.page-hero--split {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
}

.eyebrow {
    margin: 0 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-title,
.page-title,
.section-title {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    line-height: 1.05;
}

.hero-title {
    font-size: clamp(2.2rem, 4vw, 4.4rem);
    max-width: 11ch;
}

.page-title {
    font-size: clamp(1.8rem, 3vw, 3rem);
}

.section-title {
    font-size: 1.25rem;
}

.lead,
.page-copy {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.page-copy--compact {
    max-width: 54rem;
}

.hero-list,
.inline-list,
.feature-list {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--muted);
    line-height: 1.7;
}

.hero-actions,
.inline-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    align-items: center;
}

.button,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.9rem;
    padding: 0.7rem 1.15rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.button-row {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    flex-wrap: wrap;
}

.button:hover,
button:hover,
input[type="submit"]:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.button--primary,
button,
input[type="submit"] {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 10px 24px rgba(24, 74, 69, 0.18);
    width: auto;
    justify-self: start;
}

.button--secondary {
    background: var(--surface-strong);
    color: var(--brand);
    border-color: var(--border);
}

.button--link {
    color: var(--brand);
    padding: 0;
    min-height: auto;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.panel,
.auth-card,
.status-panel {
    padding: 1.5rem;
}

.panel + .panel,
.stack > * + * {
    margin-top: 1rem;
}

.stack--spacious > * + * {
    margin-top: 1.5rem;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

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

.card-grid__item,
.module-tile {
    padding: 1.2rem;
}

.module-list {
    display: grid;
    gap: 1.5rem;
}

.module-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    padding: 1.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.module-row__body {
    min-width: 0;
}

.module-row__body h3,
.module-row__body h2 {
    margin: 0 0 0.35rem;
}

.module-row__action {
    flex-shrink: 0;
    margin-left: auto;
}

.module-row__action--fixed {
    width: 11rem;
}

.module-row--static {
    align-items: flex-start;
}

.module-tile__meta {
    margin: 0 0 0.5rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.generator-note {
    margin: 0;
    max-width: 46rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

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

.stat-chip,
.header-chip {
    border: 1px solid var(--border);
    background: rgba(255, 253, 248, 0.72);
    border-radius: 999px;
    color: var(--text);
}

.stat-chip {
    padding: 0.85rem 1rem;
    display: grid;
    gap: 0.2rem;
}

.stat-chip strong {
    font-size: 0.95rem;
}

.stat-chip span {
    color: var(--muted);
    font-size: 0.9rem;
}

.header-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
    padding: 0.7rem 1.15rem;
    font-size: 1rem;
    white-space: nowrap;
}

.panel--nested {
    margin-top: 1rem;
}

.auth-layout {
    max-width: 480px;
    margin: 3rem auto 0;
}

.auth-card {
    padding: 2rem;
}

.auth-card__brand {
    margin-bottom: 1.25rem;
}

.auth-card__title {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: 2rem;
}

.auth-card__subtitle {
    margin: 0.55rem 0 0;
    color: var(--muted);
}

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

form p {
    margin: 0;
    display: grid;
    gap: 0.4rem;
}

label {
    font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    font: inherit;
}

textarea {
    min-height: 140px;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(24, 74, 69, 0.18);
    border-color: var(--brand);
}

.form-help,
.helptext {
    color: var(--muted);
    font-size: 0.92rem;
}

.alert {
    padding: 0.95rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
}

.alert ul {
    margin: 0;
    padding-left: 1.15rem;
}

.alert-danger {
    background: var(--danger-soft);
    border-color: #efc3c3;
    color: var(--danger);
}

.alert-warning {
    background: #fff2df;
    border-color: #f0d2a8;
    color: #8c5a16;
}

.alert-info {
    background: var(--info-soft);
    border-color: #c9daef;
    color: #2a567a;
}

.code-chip,
code {
    font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
    background: var(--surface-strong);
    border-radius: 8px;
    padding: 0.12rem 0.35rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 0.88rem;
    font-weight: 700;
}

.muted {
    color: var(--muted);
}

.empty-state {
    padding: 1rem 0;
    color: var(--muted);
}

@media (max-width: 900px) {
    .page-hero--split,
    .two-column {
        grid-template-columns: 1fr;
    }

    .module-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .module-row__action {
        margin-left: 0;
    }

    .page-hero,
    .panel,
    .auth-card,
    .status-panel {
        padding: 1.4rem;
    }

    .site-header__inner {
        align-items: flex-start;
        flex-direction: column;
    }
}
