:root {
    --bg: #eef3ef;
    --bg-deep: #dce6df;
    --panel: rgba(255, 255, 255, 0.84);
    --panel-strong: #ffffff;
    --panel-soft: rgba(245, 249, 246, 0.8);
    --line: rgba(41, 52, 75, 0.12);
    --line-strong: rgba(41, 52, 75, 0.2);
    --text: #212d43;
    --muted: #5c667d;
    --accent: #24b84a;
    --accent-strong: #178f37;
    --accent-soft: rgba(36, 184, 74, 0.13);
    --accent-glow: rgba(36, 184, 74, 0.24);
    --highlight: #2d3750;
    --highlight-soft: rgba(45, 55, 80, 0.12);
    --success: #1b8e44;
    --danger: #bf4d40;
    --warning: #8f6e2c;
    --shadow: 0 24px 60px rgba(17, 40, 48, 0.12);
    --shadow-soft: 0 14px 34px rgba(17, 40, 48, 0.08);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --font-body: "Aptos", "Segoe UI", "Trebuchet MS", sans-serif;
    --font-display: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--text);
    background:
        radial-gradient(circle at 10% 18%, rgba(36, 184, 74, 0.14), transparent 26%),
        radial-gradient(circle at 88% 12%, rgba(45, 55, 80, 0.11), transparent 22%),
        radial-gradient(circle at 74% 84%, rgba(36, 184, 74, 0.1), transparent 20%),
        linear-gradient(165deg, #f8fbf8 0%, #eef3ef 48%, #e7eeea 100%);
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 78%);
    opacity: 0.25;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.background-orb {
    position: fixed;
    z-index: 0;
    filter: blur(18px);
    opacity: 0.8;
    pointer-events: none;
    animation: orbFloat 10s ease-in-out infinite alternate;
}

.orb-one {
    top: 4%;
    left: -70px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(36, 184, 74, 0.3), transparent 70%);
}

.orb-two {
    right: -80px;
    bottom: 4%;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(45, 55, 80, 0.22), transparent 70%);
    animation-duration: 13s;
}

.site-shell {
    position: relative;
    z-index: 1;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 56px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding: 18px 24px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(242, 248, 249, 0.78));
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.brand-copy {
    display: grid;
    gap: 4px;
}

.brand strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.brand small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.brand-logo-wrap {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    padding: 8px;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(238, 244, 239, 0.8));
    border: 1px solid rgba(41, 52, 75, 0.08);
    box-shadow: 0 18px 34px rgba(41, 52, 75, 0.14);
}

.brand-logo {
    display: block;
    width: 100%;
    height: auto;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.topnav a,
.nav-button {
    padding: 11px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--muted);
    background: transparent;
    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease;
}

.topnav a:hover,
.nav-button:hover {
    transform: translateY(-1px);
    background: var(--accent-soft);
    border-color: rgba(36, 184, 74, 0.22);
    color: var(--highlight);
}

.topnav .is-active {
    background: linear-gradient(135deg, rgba(36, 184, 74, 0.14), rgba(45, 55, 80, 0.08));
    border-color: rgba(36, 184, 74, 0.24);
    color: var(--highlight);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.button-link,
.button,
.button-secondary,
.button-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 13px 20px;
    border: none;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease;
}

.button-link,
.button {
    background: linear-gradient(135deg, #178f37 0%, #24b84a 52%, #52cf73 100%);
    color: #fff;
    box-shadow: 0 18px 34px rgba(36, 184, 74, 0.24);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.7);
    color: var(--highlight);
    border: 1px solid rgba(45, 55, 80, 0.12);
    box-shadow: var(--shadow-soft);
}

.button-danger {
    background: rgba(190, 74, 55, 0.08);
    color: var(--danger);
    border: 1px solid rgba(190, 74, 55, 0.16);
}

.button:hover,
.button-link:hover,
.button-secondary:hover,
.button-danger:hover {
    transform: translateY(-2px);
}

.button:hover,
.button-link:hover {
    box-shadow: 0 20px 36px rgba(36, 184, 74, 0.28);
}

.inline-form {
    display: inline-flex;
}

.page-shell {
    padding-top: 26px;
}

.page-shell > * {
    animation: fadeUp 0.45s ease both;
}

.page-shell > *:nth-child(2) {
    animation-delay: 0.04s;
}

.page-shell > *:nth-child(3) {
    animation-delay: 0.08s;
}

.flash {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}

.flash-success {
    background: rgba(24, 121, 78, 0.1);
    border-color: rgba(24, 121, 78, 0.16);
}

.flash-error {
    background: rgba(190, 74, 55, 0.09);
    border-color: rgba(190, 74, 55, 0.16);
}

.hero,
.card,
.table-card,
.contract-card,
.split-panel {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero {
    position: relative;
    display: grid;
    gap: 26px;
    padding: 42px;
    margin-bottom: 24px;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -6% -26% 46%;
    height: 280px;
    background: radial-gradient(circle, rgba(36, 184, 74, 0.12), transparent 70%);
    pointer-events: none;
}

.hero-brand-intro {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.hero-lockup {
    display: block;
    width: min(320px, 100%);
    height: auto;
    filter: drop-shadow(0 16px 28px rgba(41, 52, 75, 0.14));
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 28px;
    align-items: stretch;
}

.hero h1,
.card h2,
.split-panel h2,
.contract-body h2 {
    margin: 0 0 12px;
    font-family: var(--font-display);
    line-height: 1;
    letter-spacing: -0.03em;
}

.hero h1 {
    font-size: clamp(2.8rem, 5vw, 4.6rem);
    max-width: 11ch;
}

.hero-landing h1 {
    max-width: 18ch;
    font-size: clamp(2.15rem, 4.2vw, 3.8rem);
    line-height: 1.04;
}

.hero-landing p {
    max-width: 62ch;
    font-size: clamp(1rem, 1.4vw, 1.15rem);
}

.hero p,
.card p,
.muted,
.footer p {
    color: var(--muted);
    line-height: 1.65;
}

.cta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.stat-grid,
.info-grid,
.two-column,
.action-row {
    display: grid;
    gap: 16px;
}

.stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 8px;
}

.info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.table-card,
.contract-card,
.split-panel {
    padding: 30px;
    margin-bottom: 24px;
}

.legal-card {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

.legal-card h1 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.legal-card h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin: 32px 0 10px;
    letter-spacing: -0.01em;
}

.legal-card h3 {
    font-size: 1.05rem;
    margin: 22px 0 8px;
}

.legal-card p,
.legal-card li {
    color: var(--text);
    line-height: 1.7;
}

.legal-card ul {
    padding-left: 22px;
    display: grid;
    gap: 8px;
    margin: 10px 0;
}

.legal-card table {
    margin: 14px 0 20px;
}

.legal-card code {
    background: rgba(41, 52, 75, 0.08);
    padding: 2px 6px;
    border-radius: 6px;
}

.metric {
    position: relative;
    padding: 20px;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(247, 251, 252, 0.72));
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

.metric::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 64px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--highlight));
    border-radius: 999px;
}

.metric strong {
    display: block;
    font-size: 1.6rem;
    margin-bottom: 4px;
    letter-spacing: -0.03em;
}

.label {
    display: block;
    font-size: 0.79rem;
    color: var(--muted);
    margin-bottom: 8px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.detail-value {
    font-size: 1.02rem;
    font-weight: 600;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group.full {
    grid-column: 1 / -1;
}

label {
    font-weight: 700;
    font-size: 0.95rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(26, 60, 72, 0.14);
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
    box-shadow: inset 0 1px 2px rgba(16, 35, 43, 0.03);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: rgba(36, 184, 74, 0.28);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(36, 184, 74, 0.58);
    box-shadow: 0 0 0 4px rgba(36, 184, 74, 0.12);
    transform: translateY(-1px);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    box-shadow: none;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(26, 60, 72, 0.12);
    background: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.checkbox-label:hover {
    border-color: rgba(36, 184, 74, 0.4);
}

.checkbox-label input[type="checkbox"] {
    flex: none;
    appearance: none;
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 8px;
    border: 2px solid rgba(92, 102, 125, 0.35);
    background: #e3e6ec;
    display: inline-grid;
    place-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.checkbox-label input[type="checkbox"]::after {
    content: '';
    width: 15px;
    height: 15px;
    background: #fff;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 45% 62%);
    transform: scale(0);
    transition: transform 0.12s ease;
}

.checkbox-label input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent-strong);
}

.checkbox-label input[type="checkbox"]:checked::after {
    transform: scale(1);
}

.checkbox-label-wrap {
    align-items: flex-start;
}

.checkbox-label-wrap input[type="checkbox"] {
    margin-top: 2px;
}

.checkbox-label-wrap span {
    font-weight: 500;
    line-height: 1.55;
}

.error-text {
    color: var(--danger);
    font-size: 0.92rem;
}

.helper-text {
    color: var(--muted);
    font-size: 0.92rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 16px 12px;
    border-bottom: 1px solid rgba(26, 60, 72, 0.08);
    text-align: left;
    vertical-align: top;
}

tbody tr {
    transition: background-color 0.18s ease;
}

tbody tr:hover {
    background: rgba(36, 184, 74, 0.05);
}

th {
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
}

.badge-success {
    background: rgba(24, 121, 78, 0.12);
    color: var(--success);
}

.badge-danger {
    background: rgba(190, 74, 55, 0.12);
    color: var(--danger);
}

.badge-warning {
    background: rgba(168, 106, 20, 0.12);
    color: var(--warning);
}

.timeline {
    display: grid;
    gap: 14px;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
}

.pill-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(36, 184, 74, 0.13), rgba(45, 55, 80, 0.08));
    color: var(--highlight);
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.footer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 28px 30px;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(33, 42, 61, 0.97), rgba(45, 55, 80, 0.94));
    color: rgba(245, 250, 251, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow);
}

.footer p,
.footer strong {
    color: inherit;
}

.footer code {
    background: rgba(255, 255, 255, 0.12);
    padding: 2px 6px;
    border-radius: 8px;
}

.footer a {
    text-decoration: underline;
    text-decoration-color: rgba(245, 250, 251, 0.35);
    text-underline-offset: 3px;
}

.footer-link-button {
    background: none;
    border: none;
    padding: 0;
    margin-top: 4px;
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(245, 250, 251, 0.35);
    text-underline-offset: 3px;
    cursor: pointer;
    font: inherit;
}

.footer-copyright {
    margin-top: 16px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted, #6b7690);
}

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    padding: 16px;
}

.cookie-banner-inner {
    max-width: 920px;
    margin: 0 auto;
    padding: 22px 26px;
    border-radius: var(--radius-lg);
    background: var(--panel-strong);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.cookie-banner-inner p {
    margin: 0 0 14px;
    color: var(--text);
}

.cookie-banner-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.cookie-banner-options .checkbox-label {
    padding: 8px 12px;
    font-size: 0.9rem;
}

.cookie-banner-options .checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    min-width: 22px;
}

.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.empty-state {
    padding: 22px;
    border-radius: var(--radius-lg);
    background: rgba(248, 252, 252, 0.84);
    border: 1px dashed rgba(36, 184, 74, 0.28);
}

.contract-body {
    display: grid;
    gap: 22px;
}

.contract-sheet {
    padding: 36px;
    border-radius: 28px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.contract-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.contract-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.contract-list {
    margin: 0;
    padding-left: 18px;
}

.contract-list li {
    margin-bottom: 8px;
}

.small-caps {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    font-size: 0.84rem;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.section-head h2,
.section-head p {
    margin-top: 0;
}

.table-wrap {
    overflow-x: auto;
}

.stack {
    display: grid;
    gap: 24px;
}

.admin-layout {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.admin-link-list {
    display: grid;
    gap: 12px;
}

.admin-link {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.admin-link:hover {
    transform: translateY(-1px);
    border-color: rgba(36, 184, 74, 0.24);
    background: rgba(248, 253, 249, 0.94);
}

.admin-link.is-selected {
    border-color: rgba(36, 184, 74, 0.3);
    background: linear-gradient(135deg, rgba(36, 184, 74, 0.1), rgba(45, 55, 80, 0.06));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.template-editor {
    min-height: 320px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.96rem;
    line-height: 1.6;
}

.code-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.code-chip {
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(36, 184, 74, 0.1);
    color: var(--highlight);
    border: 1px solid rgba(36, 184, 74, 0.16);
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.9rem;
}

.preview-box {
    display: grid;
    gap: 14px;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
}

.preview-subject {
    font-weight: 700;
    font-size: 1.05rem;
}

.preview-body {
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(247, 251, 252, 0.88);
    border: 1px solid rgba(26, 60, 72, 0.08);
    line-height: 1.65;
}

.auth-card {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.auth-brand {
    display: grid;
    gap: 16px;
    justify-items: center;
    margin-bottom: 28px;
    text-align: center;
}

.auth-logo {
    display: block;
    width: min(320px, 100%);
    height: auto;
    filter: drop-shadow(0 14px 28px rgba(41, 52, 75, 0.12));
}

.auth-copy {
    display: grid;
    gap: 8px;
}

.auth-copy h2 {
    margin-bottom: 0;
}

.auth-copy p {
    max-width: 56ch;
    margin: 0 auto;
}

.preview-body p:first-child {
    margin-top: 0;
}

.preview-body p:last-child {
    margin-bottom: 0;
}

.summary-panel {
    position: relative;
    border: 1px solid rgba(36, 184, 74, 0.28);
    background:
        radial-gradient(circle at 88% 12%, rgba(36, 184, 74, 0.14), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 252, 248, 0.82));
}

.summary-head {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.summary-head p {
    margin: 0;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.summary-item {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(41, 52, 75, 0.1);
}

.summary-item strong {
    font-size: 1.08rem;
}

.summary-item-wide {
    grid-column: 1 / -1;
}

.summary-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
    padding: 12px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(36, 184, 74, 0.24);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
}

.summary-actions .inline-form {
    width: 100%;
}

.summary-btn {
    width: 100%;
    min-height: 46px;
    font-weight: 700;
}

@keyframes orbFloat {
    from {
        transform: translateY(0) scale(1);
    }

    to {
        transform: translateY(18px) scale(1.04);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 920px) {
    .hero-grid,
    .admin-layout,
    .info-grid,
    .two-column,
    .form-grid,
    .contract-grid,
    .footer,
    .summary-grid,
    .summary-actions {
        grid-template-columns: 1fr;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

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

    .timeline-item,
    .contract-meta {
        flex-direction: column;
    }

    .hero {
        padding: 32px 26px;
    }

    .hero-lockup {
        width: min(280px, 100%);
    }
}

@media (max-width: 640px) {
    .site-shell {
        width: min(100% - 18px, 100%);
        padding-top: 12px;
    }

    .hero,
    .card,
    .table-card,
    .contract-card,
    .split-panel,
    .footer {
        padding: 22px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    th,
    td {
        padding-left: 8px;
        padding-right: 8px;
    }

    .brand {
        align-items: flex-start;
    }

    .brand-logo-wrap {
        width: 54px;
        height: 54px;
        padding: 7px;
    }

    .brand small {
        display: none;
    }

    .hero-lockup,
    .auth-logo {
        width: min(240px, 100%);
    }

    .summary-panel {
        margin-bottom: 12px;
    }

    .summary-actions {
        position: sticky;
        bottom: 10px;
        z-index: 2;
    }
}

@media print {
    body {
        background: #fff;
    }

    body::before,
    .topbar,
    .footer,
    .action-row,
    .background-orb {
        display: none !important;
    }

    .site-shell,
    .page-shell {
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .contract-card,
    .contract-sheet {
        border: none;
        box-shadow: none;
        padding: 0;
    }
}
