@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Sans:wght@400;500&display=swap");

:root {
    --bg-surface: #f3f6fa;
    --bg-glass: rgba(255, 255, 255, 0.86);
    --ink-900: #102032;
    --ink-700: #324457;
    --ink-500: #5f7183;
    --line: rgba(16, 32, 50, 0.16);
    --brand: #1756b7;
    --brand-strong: #113e84;
    --accent: #0d9488;
    --danger: #b42318;
    --success: #166534;
    --shadow-soft: 0 24px 60px rgba(17, 31, 45, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink-900);
    font-family: "Space Grotesk", "DM Sans", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 8% 12%, #d8e7ff 0%, transparent 48%),
        radial-gradient(circle at 92% 84%, #d5f4ef 0%, transparent 52%),
        linear-gradient(160deg, #f9fbff 0%, #eff4fb 100%);
}

.landing {
    width: min(1120px, 92vw);
    margin: 0 auto;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: center;
    padding: clamp(1.4rem, 4vw, 3.4rem) 0;
}

.intro,
.auth-card {
    animation: rise 720ms ease both;
}

.auth-card {
    animation-delay: 130ms;
}

.eyebrow {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.24em;
    color: var(--brand-strong);
    font-weight: 700;
}

.intro h1 {
    margin: 0.9rem 0 1rem;
    font-size: clamp(1.9rem, 4vw, 3.2rem);
    line-height: 1.1;
    max-width: 18ch;
}

.lead {
    margin: 0;
    max-width: 42ch;
    color: var(--ink-700);
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.65;
}

.stats {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.stats article {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 0.9rem 1rem;
}

.stat-value {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
}

.stat-label {
    margin: 0.35rem 0 0;
    color: var(--ink-700);
    font-size: 0.88rem;
    line-height: 1.45;
}

.auth-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-soft);
    padding: clamp(1.1rem, 2.4vw, 1.8rem);
}

.auth-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.auth-header p {
    margin: 0.35rem 0 0;
    color: var(--ink-700);
    font-size: 0.95rem;
}

.session-badge {
    margin: 0.9rem 0 0;
    border: 1px solid rgba(13, 148, 136, 0.24);
    border-radius: 12px;
    padding: 0.58rem 0.72rem;
    color: #0f766e;
    background: rgba(13, 148, 136, 0.08);
    font-size: 0.86rem;
    font-weight: 600;
}

.session-badge-button {
    margin: 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font: inherit;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    min-height: 2.25rem;
    line-height: 1.25;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    transition: background-color 140ms ease;
}

.session-badge-button:hover {
    border-color: rgba(13, 148, 136, 0.24);
    background: rgba(13, 148, 136, 0.14);
    transform: none;
    filter: none;
}

.session-badge-button:active {
    transform: none;
    filter: none;
}

.session-badge-button:focus-visible {
    outline: 2px solid rgba(17, 62, 132, 0.42);
    outline-offset: 2px;
}

.session-badge-label {
    overflow-wrap: anywhere;
}

.session-badge-caret {
    color: var(--ink-700);
    font-size: 1.05rem;
    line-height: 1;
    width: 1.05rem;
    text-align: center;
    flex-shrink: 0;
    transform-origin: 50% 50%;
    transition: transform 140ms ease;
}

.session-badge-button[aria-expanded="true"] {
    border-color: rgba(13, 148, 136, 0.24);
    background: rgba(13, 148, 136, 0.16);
}

.session-badge-button[aria-expanded="true"] .session-badge-caret {
    transform: rotate(180deg);
}

.user-menu {
    position: relative;
    width: min(360px, 90vw);
}

.user-menu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.38rem);
    z-index: 20;
    min-width: 190px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow-soft);
    padding: 0.35rem;
    display: grid;
    gap: 0.24rem;
}

.user-menu-dropdown[hidden] {
    display: none;
}

.user-menu-link {
    display: block;
    width: 100%;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    text-align: left;
    text-decoration: none;
    color: var(--ink-700);
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.45rem 0.56rem;
    cursor: pointer;
}

.user-menu-link:hover {
    background: rgba(17, 62, 132, 0.08);
}

.user-menu-link-danger {
    color: #b91c1c;
}

.user-menu-logout-form {
    margin: 0;
}

.tabs {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
}

.tab {
    border: 1px solid var(--line);
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--ink-700);
    padding: 0.56rem 0.35rem;
    font-size: 0.84rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.75);
    transition: transform 140ms ease, background-color 160ms ease;
}

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

.tab.is-active {
    border-color: transparent;
    background: linear-gradient(130deg, var(--brand) 0%, var(--accent) 100%);
    color: #ffffff;
}

.notice {
    margin: 0.9rem 0 0;
    border-radius: 12px;
    padding: 0.65rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid;
}

.notice-info {
    color: var(--ink-900);
    background: rgba(23, 86, 183, 0.08);
    border-color: rgba(23, 86, 183, 0.2);
}

.notice-error {
    color: var(--danger);
    background: rgba(180, 35, 24, 0.08);
    border-color: rgba(180, 35, 24, 0.2);
}

.notice-success {
    color: var(--success);
    background: rgba(22, 101, 52, 0.08);
    border-color: rgba(22, 101, 52, 0.2);
}

.dashboard-panel {
    margin-top: 0.95rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.68);
}

.quick-links {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.quick-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    min-height: 38px;
    padding: 0.35rem 0.5rem;
    color: var(--ink-700);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.82);
    transition: transform 140ms ease, border-color 140ms ease;
}

.quick-links a:hover {
    transform: translateY(-1px);
    border-color: rgba(17, 62, 132, 0.28);
}

.logout-form {
    margin-top: 0.8rem;
}

.auth-form {
    display: none;
    margin-top: 0.95rem;
}

.auth-form.is-active {
    display: grid;
    gap: 0.45rem;
}

.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.turnstile-wrap {
    margin-top: 0.5rem;
}

label {
    margin-top: 0.35rem;
    font-size: 0.88rem;
    color: var(--ink-700);
    font-weight: 600;
}

input:not([type="checkbox"]):not([type="radio"]) {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.68rem 0.74rem;
    font: inherit;
    color: var(--ink-900);
    background: rgba(255, 255, 255, 0.92);
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.68rem 0.74rem;
    font: inherit;
    color: var(--ink-900);
    background: rgba(255, 255, 255, 0.92);
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(17, 62, 132, 0.45);
    box-shadow: 0 0 0 3px rgba(17, 62, 132, 0.14);
}

input:not([type="checkbox"]):not([type="radio"])::placeholder {
    color: #8192a3;
}

input:not([type="checkbox"]):not([type="radio"]):focus {
    outline: none;
    border-color: rgba(17, 62, 132, 0.45);
    box-shadow: 0 0 0 3px rgba(17, 62, 132, 0.14);
}

input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    padding: 0;
    accent-color: var(--brand-strong);
}

.checkbox-group {
    margin: 0;
    border: 0;
    padding: 0;
    min-width: 0;
}

.checkbox-list {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    padding: 0.3rem;
    display: grid;
    gap: 0.2rem;
    max-height: 11rem;
    overflow-y: auto;
}

.checkbox-list:focus-within {
    border-color: rgba(17, 62, 132, 0.45);
    box-shadow: 0 0 0 3px rgba(17, 62, 132, 0.14);
}

.checkbox-item {
    margin-top: 0;
    padding: 0.35rem 0.4rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ink-900);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
}

.checkbox-item:hover {
    background: rgba(17, 62, 132, 0.07);
}

.hint {
    margin: 0.1rem 0 0;
    color: var(--ink-500);
    font-size: 0.82rem;
    line-height: 1.5;
}

button {
    margin-top: 0.75rem;
    border: 0;
    border-radius: 12px;
    padding: 0.72rem 0.88rem;
    font: inherit;
    font-size: 0.93rem;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(130deg, var(--brand-strong) 0%, var(--accent) 100%);
    transition: transform 140ms ease, filter 140ms ease;
}

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

.app-body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink-900);
    font-family: "Space Grotesk", "DM Sans", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 0% 0%, #d2f0ff 0%, transparent 44%),
        radial-gradient(circle at 100% 0%, #d3f4ea 0%, transparent 42%),
        linear-gradient(160deg, #f7fbff 0%, #edf3fb 100%);
}

.app-header {
    width: min(1320px, 94vw);
    margin: 0 auto;
    padding: 1.2rem 0 0.8rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.app-header > div:first-child::before {
    content: "";
    display: block;
    width: clamp(190px, 24vw, 320px);
    aspect-ratio: 1536 / 614;
    margin-bottom: 0.42rem;
    background: url("/static/img/thieit_estate_website_logo.png") no-repeat left top / contain;
}

.app-header h1 {
    margin: 0.5rem 0 0;
    font-size: clamp(1.5rem, 2.8vw, 2.2rem);
}

.header-subline {
    margin: 0.45rem 0 0;
    color: var(--ink-700);
    font-size: 0.94rem;
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
    align-items: flex-start;
}

.header-actions .user-menu {
    margin-top: 0.55rem;
}

.app-layout {
    width: min(1320px, 94vw);
    margin: 0 auto 1.6rem;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 1rem;
}

.app-sidebar {
    position: sticky;
    top: 0.85rem;
    align-self: start;
    display: grid;
    gap: 0.9rem;
}

.section-nav {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-soft);
    padding: 0.7rem;
    display: grid;
    gap: 0.38rem;
}

.section-link {
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    color: var(--ink-700);
    font-weight: 600;
    font-size: 0.84rem;
    padding: 0.48rem 0.62rem;
    transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.section-link:hover {
    transform: translateX(1px);
    border-color: var(--line);
}

.section-link.is-active {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(130deg, var(--brand-strong) 0%, var(--accent) 100%);
}

#monetization {
    display: grid;
    justify-items: center;
    text-align: center;
}

.bmac-script-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
}

#monetization noscript {
    display: flex;
    justify-content: center;
    width: 100%;
}

#monetization .bmc-btn,
#monetization .bmc-button {
    min-height: 40px !important;
    min-width: 220px !important;
    padding: 0.38rem 0.68rem !important;
    border-radius: 10px !important;
    font-size: 1.22rem !important;
    line-height: 1.15 !important;
}

#monetization .bmc-btn img,
#monetization .bmc-button img {
    height: 1.2rem !important;
    width: auto !important;
}

.bmac-link-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    min-width: 220px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1.18rem;
    font-weight: 700;
    color: #000000;
    border: 1px solid #000000;
    background: #ffdd00;
}

#donate-button-container {
    margin-top: 0.55rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#donate-button {
    display: flex;
    justify-content: center;
}

.app-content {
    display: grid;
    gap: 0.95rem;
}

.panel {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    padding: 0.92rem;
}

.panel-compact {
    padding: 0.75rem;
}

.panel.is-focused {
    border-color: rgba(17, 62, 132, 0.36);
}

.panel-head h2 {
    margin: 0;
    font-size: 1.1rem;
}

.panel-head p {
    margin: 0.28rem 0 0;
    color: var(--ink-700);
    font-size: 0.87rem;
}

.panel-head-with-action {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
}

.panel-head-copy {
    min-width: 0;
}

.panel-head-action {
    margin-left: auto;
}

.action-link-wide {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 8.75rem;
    padding-inline: 1.05rem;
}

.panel-head-with-action + .table-wrap {
    margin-top: 0.6rem;
}

.metric-grid {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.56rem;
}

.metric-grid article {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.6rem 0.7rem;
    background: rgba(255, 255, 255, 0.72);
}

.metric-value {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.metric-label {
    margin: 0.25rem 0 0;
    color: var(--ink-700);
    font-size: 0.82rem;
}

.panel-grid {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: minmax(290px, 370px) minmax(0, 1fr);
    gap: 0.85rem;
}

.entity-form {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.74);
    padding: 0.76rem;
    display: grid;
    gap: 0.38rem;
    align-content: start;
}

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

.switch-line {
    display: inline-flex;
    align-items: center;
    gap: 0.52rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink-700);
}

.switch-line input {
    width: auto;
    transform: translateY(1px);
}

.ad-preview {
    margin-top: 0.7rem;
    border: 1px dashed rgba(13, 148, 136, 0.5);
    border-radius: 12px;
    padding: 0.58rem 0.66rem;
    background: rgba(13, 148, 136, 0.07);
}

.ad-title {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 700;
    color: #0f766e;
}

.ad-copy {
    margin: 0.24rem 0 0;
    font-size: 0.8rem;
    color: #0f766e;
}

.table-wrap {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
    overflow: auto;
}

.table-action-cell {
    min-width: 160px;
}

.table-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.list-details-link {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(130deg, var(--brand-strong) 0%, var(--accent) 100%);
}

.list-details-link:hover {
    transform: translateY(-1px);
    border-color: transparent;
}

.table-cell-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.16rem 0.48rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}

.table-cell-pill-danger {
    color: #8f1210;
    background: rgba(180, 35, 24, 0.14);
}

.table-cell-pill-success {
    color: #14532d;
    background: rgba(22, 101, 52, 0.14);
}

.table-cell-pill-neutral {
    color: #0f766e;
    background: rgba(13, 148, 136, 0.14);
}

.table-delete-form {
    margin: 0;
}

.table-actions .action-delete {
    margin-top: 0;
    border: 0;
    border-radius: 0;
    padding: 0.06rem 0.1rem;
    font-size: 0.74rem;
    font-weight: 500;
    line-height: 1.2;
    color: rgba(16, 32, 50, 0.46);
    background: none;
}

.table-actions .action-delete:hover {
    transform: none;
    filter: none;
    color: rgba(180, 35, 24, 0.84);
    border-color: transparent;
    background: none;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.table-actions .action-delete:focus-visible {
    outline: 1px solid rgba(180, 35, 24, 0.3);
    outline-offset: 1px;
}

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

th,
td {
    padding: 0.56rem 0.62rem;
    border-bottom: 1px solid rgba(16, 32, 50, 0.1);
    text-align: left;
    font-size: 0.82rem;
    vertical-align: top;
}

th {
    color: var(--ink-700);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    background: rgba(241, 246, 253, 0.95);
}

.empty-row {
    color: var(--ink-500);
    text-align: center;
}

.panel-toolbar {
    margin: 0.65rem 0 0.75rem;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    padding: clamp(0.8rem, 2vw, 1.4rem);
    background: rgba(9, 18, 30, 0.42);
    backdrop-filter: blur(2px);
    display: grid;
    place-items: center;
}

.modal-card {
    width: min(900px, 96vw);
    max-height: 92vh;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    padding: 0.9rem;
    display: grid;
    gap: 0.78rem;
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.7rem;
}

.modal-head h2 {
    margin: 0;
    font-size: 1.05rem;
}

.modal-toolbar {
    margin: 0;
    display: inline-flex;
    gap: 0.42rem;
    flex-wrap: wrap;
}

.modal-form {
    margin: 0;
}

.wizard-form {
    gap: 0.65rem;
}

.wizard-progress {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.wizard-progress li {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.42rem 0.54rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink-700);
    background: rgba(255, 255, 255, 0.72);
    text-align: center;
}

.wizard-progress li.is-active {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(130deg, var(--brand-strong) 0%, var(--accent) 100%);
}

.wizard-step {
    display: none;
    gap: 0.42rem;
}

.wizard-step.is-active {
    display: grid;
}

.wizard-actions {
    margin-top: 0.35rem;
    display: flex;
    justify-content: space-between;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.wizard-actions-end {
    justify-content: flex-end;
}

.wizard-row-actions {
    display: flex;
    justify-content: flex-end;
}

.wizard-secondary-button {
    margin-top: 0;
    color: var(--ink-900);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--line);
}

.wizard-table-wrap {
    max-height: min(38vh, 360px);
}

.wizard-table input,
.wizard-table select {
    margin: 0;
    min-width: 130px;
}

.wizard-table td {
    vertical-align: middle;
}

.wizard-row-remove {
    margin-top: 0;
    color: rgba(16, 32, 50, 0.74);
    background: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.34rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.wizard-row-remove:hover {
    color: var(--danger);
    border-color: rgba(180, 35, 24, 0.24);
    background: rgba(180, 35, 24, 0.06);
}

.wizard-hidden {
    display: none;
}

.modal-overlay-secondary {
    z-index: 70;
}

.legal-main {
    width: min(960px, 94vw);
    margin: 0 auto 1.2rem;
    display: grid;
    gap: 0.9rem;
}

.legal-panel {
    padding: 1rem;
}

.legal-copy {
    margin: 0.4rem 0 0;
    color: var(--ink-700);
    font-size: 0.92rem;
    line-height: 1.6;
}

.legal-list {
    margin: 0.6rem 0 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.35rem;
    color: var(--ink-700);
    font-size: 0.92rem;
}

.legal-list a {
    color: var(--brand-strong);
}

.legal-dl {
    margin: 0.6rem 0 0;
    display: grid;
    grid-template-columns: minmax(180px, 230px) minmax(0, 1fr);
    gap: 0.35rem 0.7rem;
    font-size: 0.92rem;
}

.legal-dl dt {
    color: var(--ink-700);
    font-weight: 700;
}

.legal-dl dd {
    margin: 0;
    color: var(--ink-900);
}

.legal-footer {
    width: min(1320px, 94vw);
    margin: 0 auto 1rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.74);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(17, 31, 45, 0.08);
}

.legal-footer a {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-700);
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 0.3rem 0.5rem;
    background: rgba(255, 255, 255, 0.78);
}

.legal-footer a:hover {
    border-color: rgba(17, 62, 132, 0.32);
    color: var(--brand-strong);
}

.cookie-notice {
    position: fixed;
    right: 0.85rem;
    bottom: 0.85rem;
    z-index: 90;
    width: min(460px, calc(100vw - 1.7rem));
    border: 1px solid rgba(16, 32, 50, 0.22);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 45px rgba(17, 31, 45, 0.2);
    padding: 0.75rem;
    display: grid;
    gap: 0.55rem;
}

.cookie-notice[hidden] {
    display: none !important;
}

.cookie-notice p {
    margin: 0;
    color: var(--ink-700);
    font-size: 0.84rem;
    line-height: 1.45;
}

.cookie-notice-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.cookie-notice-actions a {
    font-size: 0.82rem;
    color: var(--brand-strong);
    font-weight: 600;
}

.cookie-notice-actions button {
    margin-top: 0;
    padding: 0.46rem 0.62rem;
    font-size: 0.82rem;
}

@media (max-width: 980px) {
    #monetization .bmc-btn,
    #monetization .bmc-button,
    .bmac-link-fallback {
        min-width: 204px !important;
        font-size: 1.12rem !important;
    }

    .landing {
        grid-template-columns: 1fr;
        align-content: start;
    }

    .intro {
        padding-top: 0.25rem;
    }

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

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

    .app-header > div:first-child::before {
        width: clamp(170px, 46vw, 240px);
    }

    .header-actions {
        justify-content: flex-start;
        align-items: flex-start;
    }

    .header-actions .user-menu {
        margin-top: 0;
    }

    .app-layout {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: static;
    }

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

    .panel-head-with-action {
        flex-wrap: wrap;
    }

    .panel-head-action {
        margin-left: 0;
    }

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

    .modal-card {
        width: min(960px, 100vw - 1rem);
        max-height: calc(100vh - 1rem);
    }

    .wizard-progress {
        grid-template-columns: 1fr;
    }

    .wizard-actions {
        flex-direction: column-reverse;
    }

    .wizard-actions-end {
        flex-direction: row;
    }

    .legal-dl {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
