:root {
    --ink: rgb(0 0 0 / 80%);
    --muted: rgb(0 0 0 / 62%);
    --paper: #fff;
    --panel: rgb(1 46 62 / 8%);
    --panel-strong: rgb(1 46 62 / 76%);
    --line: rgb(216 116 4 / 28%);
    --accent: #d87404;
    --accent-dark: #b65f00;
    --gold: #d87404;
    --blue: #0b1d5f;
    --red: #92140c;
    --shadow: 0 24px 70px rgb(11 29 95 / 14%);
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #fff;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

body::before,
body::after {
    content: "";
    pointer-events: none;
    position: fixed;
}

body::before {
    display: none;
}

body::after {
    background: #fff;
    inset: 0;
    z-index: -2;
}

h1,
h2,
h3,
h4 {
    color: var(--blue);
    font-family: Georgia, "Times New Roman", Times, serif;
}

a {
    color: var(--accent);
}

a:hover,
a:focus {
    color: var(--red);
}

.skip-link {
    left: 1rem;
    position: absolute;
    top: -5rem;
    z-index: 20;
}

.skip-link:focus {
    background: var(--accent);
    color: var(--paper);
    padding: 0.7rem 1rem;
    top: 1rem;
}

.site-header {
    background: rgb(255 255 255 / 94%);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
    font-family: Georgia, "Times New Roman", Times, serif;
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-header::after {
    display: none;
}

.site-header__inner,
.site-footer__inner,
.section,
.hero,
.page-hero,
.reconstruction-band {
    margin: 0 auto;
    max-width: 1180px;
    padding-left: 24px;
    padding-right: 24px;
}

.site-header__inner {
    align-items: center;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    min-height: 78px;
}

.brand {
    align-items: center;
    display: inline-flex;
    gap: 12px;
    text-decoration: none;
}

.brand__logo {
    background: rgba(255, 255, 255, 0.94);
    display: block;
    height: 52px;
    object-fit: contain;
    padding: 4px;
    width: 56px;
}

.brand__name,
.brand__meta {
    display: block;
}

.brand__name {
    color: var(--blue);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
}

.brand__meta {
    color: var(--muted);
    font-size: 0.78rem;
}

.primary-nav {
    align-items: center;
    display: flex;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    gap: 18px;
}

.primary-nav a {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
}

.primary-nav a[aria-current="page"],
.primary-nav a:hover {
    color: var(--red);
}

.primary-nav__external {
    border-left: 1px solid var(--line);
    padding-left: 18px;
}

.account-menu {
    position: relative;
}

.account-menu__trigger {
    background: rgb(216 116 4 / 12%);
    border: 1px solid var(--line);
    color: var(--accent);
    cursor: pointer;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 900;
    min-height: 38px;
    padding: 0.45rem 0.7rem;
    text-transform: uppercase;
}

.account-menu__panel {
    background: var(--panel-strong);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
    min-width: 190px;
    padding: 8px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 15;
}

.account-menu:hover .account-menu__panel,
.account-menu:focus-within .account-menu__panel {
    display: grid;
    gap: 4px;
}

.account-menu__panel a,
.account-menu__panel button {
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    display: block;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    padding: 0.55rem 0.6rem;
    text-align: left;
    text-decoration: none;
    text-transform: uppercase;
    width: 100%;
}

.account-menu__panel a:hover,
.account-menu__panel a:focus,
.account-menu__panel button:hover,
.account-menu__panel button:focus {
    color: var(--red);
}

.nav-toggle {
    background: var(--accent);
    border: 0;
    color: var(--paper);
    cursor: pointer;
    display: none;
    font: inherit;
    font-weight: 700;
    padding: 0.7rem 0.9rem;
}

.hero {
    align-items: center;
    display: grid;
    gap: 48px;
    grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
    min-height: max(calc(100vh - 78px), calc(100vw * 1310 / 1800));
    max-width: none;
    overflow: hidden;
    padding-bottom: 76px;
    padding-left: max(24px, calc((100vw - 1180px) / 2 + 24px));
    padding-right: max(24px, calc((100vw - 1180px) / 2 + 24px));
    padding-top: 76px;
    position: relative;
    isolation: isolate;
}

.hero__content {
    background: rgb(255 255 255 / 50%);
    border: 1px solid rgb(255 255 255 / 34%);
    border-radius: 1em;
    box-shadow: 0 20px 20px rgb(11 29 95 / 22%);
    grid-column: 2;
    justify-self: end;
    max-width: 760px;
    padding: 28px;
}

.hero::before {
    background: url("/assets/foglio.jpg") center top / contain no-repeat;
    content: "";
    inset: 0;
    opacity: 1;
    pointer-events: none;
    position: absolute;
    z-index: -1;
}

.eyebrow {
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 14px;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
    font-size: clamp(3.7rem, 12vw, 9.5rem);
    letter-spacing: 0;
    line-height: 0.88;
    margin: 0;
}

.hero__subtitle {
    color: var(--muted);
    font-size: clamp(1.2rem, 2vw, 1.75rem);
    line-height: 1.35;
    margin: 24px 0 0;
    max-width: 760px;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.button {
    align-items: center;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 900;
    justify-content: center;
    min-height: 46px;
    padding: 0.75rem 1rem;
    text-decoration: none;
    text-transform: uppercase;
}

.button--primary,
.button--secondary {
    background: var(--red);
    color: #fff;
}

.button--primary:hover,
.button--primary:focus,
.button--secondary:hover,
.button--secondary:focus {
    background: #b32117;
}

.button--ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--accent);
}

.button--ghost:hover,
.button--ghost:focus {
    border-color: var(--red);
    color: var(--red);
}

.hero .button--ghost {
    background: rgb(255 227 16 / 34%);
}

.hero .button--ghost:hover,
.hero .button--ghost:focus {
    background: rgb(255 255 255 / 70%);
}

.section,
.page-hero,
.reconstruction-band {
    padding-bottom: 80px;
    padding-top: 80px;
}

.section--two {
    display: grid;
    gap: 42px;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.section--narrow {
    max-width: 820px;
    width: 100%;
}

.section--leaf-content {
    max-width: 1098px;
}

.section h2,
.reconstruction-band h2 {
    font-size: 1.5rem;
    line-height: 1.4;
    margin: 0;
}

.section__heading {
    margin-bottom: 28px;
    max-width: 780px;
}

.text-link {
    color: var(--accent);
    display: inline-block;
    font-weight: 800;
    margin-top: 12px;
}

.reconstruction-band {
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line);
    color: var(--ink);
    max-width: none;
}

.reconstruction-band__inner {
    margin-left: auto;
    margin-right: auto;
    max-width: 1180px;
    width: 100%;
}

.reconstruction-band__inner p:last-child {
    color: var(--muted);
    max-width: 760px;
}

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

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

.home-updates__column,
.home-updates .list-card {
    min-width: 0;
}

.home-updates .list-card {
    overflow-wrap: anywhere;
}

.feature-card,
.compact-card,
.empty-state {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 1em;
    box-shadow: 0 16px 42px rgb(11 29 95 / 10%);
    min-height: 190px;
    padding: 20px;
}

.feature-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
}

.feature-card span,
.compact-card span {
    color: var(--red);
    font-weight: 900;
    text-transform: uppercase;
}

.feature-card p,
.compact-card p,
.page-hero p {
    color: var(--muted);
}

.feature-card:hover,
.content-card:hover {
    border-color: rgb(216 116 4 / 58%);
}

.compact-card h3,
.compact-card h2 {
    font-size: 1.35rem;
    line-height: 1.2;
    margin: 18px 0 10px;
}

.page-hero {
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    font-size: clamp(3rem, 8vw, 6.5rem);
}

.page-hero p {
    font-size: 1.25rem;
    max-width: 760px;
}

.empty-state {
    min-height: 120px;
}

.prose > *:first-child {
    margin-top: 0;
}

.prose {
    min-width: 0;
    overflow-wrap: anywhere;
}

.prose > * {
    max-width: 100%;
}

.prose pre {
    overflow-x: auto;
}

.page-hero h1 {
    overflow-wrap: anywhere;
}

.prose > *:last-child {
    margin-bottom: 0;
}

.prose a {
    color: var(--accent);
    font-weight: 800;
}


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

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

.list-card,
.content-card,
.person-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 1em;
    padding: 20px;
}

.list-card {
    min-height: 150px;
}

.list-card h4,
.content-card h2,
.content-card h3,
.person-card h4 {
    line-height: 1.18;
    margin: 8px 0;
}

.list-card a,
.content-card a {
    color: var(--red);
    text-decoration: none;
}

.list-card a:hover,
.content-card a:hover {
    color: var(--red);
    text-decoration: underline;
}

time,
.meta-line,
.person-card span {
    color: var(--muted);
    display: block;
    font-size: 0.9rem;
}

.content-card {
    min-height: 250px;
}

.content-card img {
    aspect-ratio: 16 / 9;
    display: block;
    height: auto;
    margin-bottom: 16px;
    object-fit: cover;
    width: 100%;
}

.content-card__image-link {
    display: block;
}

.content-card__image-link:hover img,
.content-card__image-link:focus-visible img {
    opacity: 0.85;
}

.featured-image {
    border: 1px solid var(--line);
    display: block;
    height: auto;
    margin-bottom: 16px;
    width: 100%;
}

.document-groups {
    display: grid;
    gap: 34px;
}

.document-group {
    display: grid;
    gap: 18px;
}

.document-list {
    display: grid;
    gap: 14px;
}

.document-card {
    align-items: start;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 1em;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 20px;
}

.document-card h3 {
    font-size: 1.05rem;
    line-height: 1.3;
    margin: 0 0 8px;
}

.document-card p {
    color: var(--muted);
    margin: 0;
}

.document-card__meta {
    color: var(--accent);
    display: grid;
    font-size: 0.84rem;
    font-weight: 800;
    gap: 4px;
    justify-items: end;
    text-transform: uppercase;
}

.timeline-list {
    display: grid;
    gap: 22px;
    position: relative;
}

.timeline-list::before {
    background: var(--line);
    bottom: 0;
    content: "";
    left: 118px;
    position: absolute;
    top: 0;
    width: 1px;
}

.timeline-item {
    display: grid;
    gap: 28px;
    grid-template-columns: 92px minmax(0, 1fr);
    position: relative;
}

.timeline-item__date {
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 900;
    padding-top: 22px;
    text-align: right;
}

.timeline-item__date span {
    background: var(--panel-strong);
    border: 1px solid var(--line);
    display: inline-block;
    padding: 0.35rem 0.5rem;
}

.timeline-item__body {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 1em;
    box-shadow: 0 16px 42px rgb(11 29 95 / 10%);
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
    padding: 20px;
    position: relative;
}

.timeline-item__body::before {
    background: var(--accent);
    border: 4px solid var(--paper);
    content: "";
    height: 13px;
    left: -35px;
    position: absolute;
    top: 27px;
    width: 13px;
}

.timeline-item__body img {
    aspect-ratio: 4 / 3;
    border: 1px solid var(--line);
    display: block;
    object-fit: cover;
    width: 100%;
}

.timeline-item__body h2 {
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    line-height: 1.05;
    margin: 0 0 10px;
}

.timeline-item__body p {
    color: var(--muted);
    margin: 0;
}

.timeline-item__body .prose {
    margin-top: 14px;
}

.map-shell {
    align-items: stretch;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr);
}

.map-canvas {
    background: rgba(17, 29, 74, 0.3);
    border: 1px solid var(--line);
    border-radius: 1em;
    box-shadow: var(--shadow);
    min-height: 620px;
    overflow: hidden;
}

.map-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 1em;
    padding: 20px;
}

.map-panel h2 {
    font-size: clamp(1.4rem, 2vw, 2rem);
    line-height: 1.05;
    margin: 0 0 18px;
}

.map-location-list {
    display: grid;
    gap: 12px;
    max-height: 515px;
    overflow: auto;
    padding-right: 4px;
}

.map-location-card {
    background: rgb(255 255 255 / 64%);
    border: 1px solid var(--line);
    border-radius: 1em;
    cursor: pointer;
    padding: 15px;
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.map-location-card:hover,
.map-location-card:focus-within {
    background: rgb(255 255 255 / 92%);
    border-color: rgb(216 116 4 / 72%);
    transform: translateY(-1px);
}

.map-location-card h3 {
    font-size: 1rem;
    line-height: 1.25;
    margin: 9px 0 4px;
}

.map-location-card p {
    color: var(--muted);
    margin: 5px 0 0;
}

.leaflet-container {
    background: rgb(255 255 255 / 92%);
    font-family: inherit;
}

.map-popup {
    color: #1e1e24;
    display: grid;
    gap: 6px;
    max-width: 250px;
}

.map-popup img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    width: 100%;
}

.map-popup strong {
    color: #1e1e24;
    font-size: 1rem;
    line-height: 1.2;
}

.map-popup span,
.map-popup p {
    color: #30313a;
    margin: 0;
}

.map-popup a {
    color: var(--blue);
    font-weight: 700;
}

.person-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    padding: 0;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.person-card:hover {
    border-color: rgb(146 20 12 / 52%);
    box-shadow: 0 18px 42px rgb(11 29 95 / 16%);
    transform: translateY(-3px);
}

.person-card__media {
    aspect-ratio: 1 / 1;
    background: rgb(11 29 95 / 10%);
    border-bottom: 2px solid rgb(146 20 12 / 55%);
    display: grid;
    overflow: hidden;
    place-items: center;
    width: 100%;
}

.person-card__media img {
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 300ms ease;
    width: 100%;
}

.person-card:hover .person-card__media img {
    transform: scale(1.025);
}

.person-card__placeholder {
    color: rgb(11 29 95 / 48%);
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 700;
    line-height: 1;
}

.person-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px 18px 18px;
}

.person-card__body h4 {
    font-size: 1.28rem;
    margin: 0;
}

.person-card__role {
    color: var(--red);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.35;
    margin: 6px 0 12px;
    text-transform: uppercase;
}

.person-card__meta {
    border-top: 1px solid rgb(11 29 95 / 16%);
    margin-top: auto;
    padding-top: 10px;
}

.person-card__meta span {
    color: var(--muted);
    display: block;
    font-size: 0.88rem;
    line-height: 1.35;
}

.person-card__meta .person-card__country {
    color: var(--blue);
    font-weight: 700;
    margin-top: 3px;
}

.admin-auth {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 190px);
    padding: 56px 24px;
}

.admin-auth__panel {
    background: var(--panel-strong);
    border: 1px solid var(--line);
    border-radius: 1em;
    box-shadow: var(--shadow);
    max-width: 440px;
    padding: 32px;
    width: 100%;
}

.admin-auth h1 {
    font-size: 2.6rem;
    line-height: 1;
    margin: 0 0 24px;
}

.admin-form {
    display: grid;
    gap: 18px;
}

.admin-form label {
    color: var(--accent);
    display: grid;
    font-size: 0.9rem;
    font-weight: 800;
    gap: 7px;
    text-transform: uppercase;
}

.admin-form input,
.admin-form select {
    background: rgb(255 255 255 / 80%);
    border: 1px solid var(--line);
    color: var(--ink);
    font: inherit;
    min-height: 46px;
    padding: 0.7rem 0.8rem;
    width: 100%;
}

.admin-form select {
    appearance: none;
}

.admin-form input[type="file"] {
    padding: 0.65rem;
}

.admin-form input[type="file"]::file-selector-button {
    background: var(--accent);
    border: 0;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    margin-right: 12px;
    padding: 0.55rem 0.75rem;
    text-transform: uppercase;
}

.admin-form textarea {
    background: rgb(255 255 255 / 80%);
    border: 1px solid var(--line);
    color: var(--ink);
    font: inherit;
    padding: 0.7rem 0.8rem;
    resize: vertical;
    width: 100%;
}

.field-note {
    color: var(--muted);
    display: block;
    font-size: 0.86rem;
    font-weight: 500;
    text-transform: none;
}

.admin-form--wide {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 1em;
    box-shadow: var(--shadow);
    padding: 20px;
}

.admin-form input:focus,
.admin-form select:focus {
    border-color: var(--accent);
    outline: 3px solid rgb(216 116 4 / 22%);
}

.admin-form textarea:focus {
    border-color: var(--accent);
    outline: 3px solid rgb(216 116 4 / 22%);
}

.rich-editor {
    background: rgb(255 255 255 / 80%);
    border: 1px solid var(--line);
    color: var(--ink);
    overflow: hidden;
    text-transform: none;
}

.rich-editor__textarea {
    display: none;
}

.rich-editor__source {
    background: #fff;
    border: 0;
    color: #1e1e24;
    display: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.9rem;
    line-height: 1.55;
    min-height: 180px;
    padding: 16px;
    resize: vertical;
    width: 100%;
}

.rich-editor__custom-preview {
    display: none;
    min-height: 180px;
    padding: 16px;
}

.rich-editor--compact .rich-editor__custom-preview {
    min-height: 120px;
}

.rich-editor--compact .rich-editor__source {
    min-height: 120px;
}

.rich-editor--source .ql-container {
    display: none;
}

.rich-editor--source .rich-editor__source {
    display: block;
}

.rich-editor--custom-preview .ql-container {
    display: none;
}

.rich-editor--custom-preview:not(.rich-editor--source) .rich-editor__custom-preview {
    display: block;
}

.rich-editor--source .rich-editor__custom-preview {
    display: none;
}

.rich-editor--source .ql-toolbar > :not(.rich-editor__source-controls),
.rich-editor--custom-preview .ql-toolbar > :not(.rich-editor__source-controls) {
    opacity: 0.35;
    pointer-events: none;
}

.rich-editor .ql-toolbar .rich-editor__source-toggle {
    color: var(--red);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    padding: 0 7px;
    width: auto;
}

.rich-editor .ql-toolbar .rich-editor__source-toggle:hover,
.rich-editor .ql-toolbar .rich-editor__source-toggle:focus,
.rich-editor .ql-toolbar .rich-editor__source-toggle[aria-pressed="true"] {
    background: rgb(146 20 12 / 10%);
    color: var(--red);
}

.rich-editor .ql-toolbar,
.rich-editor .ql-container,
.rich-editor .ql-editor,
.rich-editor .ql-picker,
.rich-editor .ql-picker-label,
.rich-editor .ql-picker-item {
    text-transform: none;
}

.rich-editor .ql-toolbar.ql-snow {
    background: rgb(255 255 255 / 86%);
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}

.rich-editor .ql-container.ql-snow {
    border: 0;
    color: var(--ink);
    font: inherit;
}

.rich-editor .ql-editor {
    min-height: 180px;
}

.rich-editor--compact .ql-editor {
    min-height: 120px;
}

.rich-editor .ql-editor.ql-blank::before {
    color: rgba(215, 216, 221, 0.6);
}

.rich-editor .ql-picker,
.rich-editor .ql-picker-label,
.rich-editor .ql-stroke {
    color: var(--muted);
    stroke: var(--muted);
}

.rich-editor .ql-fill {
    fill: var(--muted);
}

.rich-editor .ql-picker-options {
    background: var(--panel-strong);
    border-color: var(--line) !important;
}

.rich-editor .ql-toolbar button:hover .ql-stroke,
.rich-editor .ql-toolbar button:focus .ql-stroke,
.rich-editor .ql-toolbar button.ql-active .ql-stroke,
.rich-editor .ql-toolbar .ql-picker-label:hover .ql-stroke,
.rich-editor .ql-toolbar .ql-picker-label.ql-active .ql-stroke {
    stroke: var(--accent);
}

.rich-editor .ql-toolbar button:hover .ql-fill,
.rich-editor .ql-toolbar button:focus .ql-fill,
.rich-editor .ql-toolbar button.ql-active .ql-fill {
    fill: var(--accent);
}

.rich-editor .ql-toolbar button:hover,
.rich-editor .ql-toolbar button:focus,
.rich-editor .ql-toolbar button.ql-active,
.rich-editor .ql-toolbar .ql-picker-label:hover,
.rich-editor .ql-toolbar .ql-picker-label.ql-active,
.rich-editor .ql-toolbar .ql-picker-item:hover,
.rich-editor .ql-toolbar .ql-picker-item.ql-selected {
    color: var(--accent);
}

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

.checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
}

.checkbox-grid label {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    flex-direction: row;
    gap: 8px;
    text-transform: none;
}

.checkbox-grid input {
    min-height: auto;
    width: auto;
}

.checkbox-inline {
    align-content: center;
    align-items: center;
    color: var(--muted) !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    text-transform: none !important;
}

.checkbox-inline input {
    min-height: auto;
    width: auto;
}

.form-actions,
.admin-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.form-message {
    background: rgba(146, 20, 12, 0.18);
    border: 1px solid rgb(216 116 4 / 34%);
    color: var(--red);
    font-weight: 700;
    margin-bottom: 18px;
    padding: 0.8rem 0.9rem;
}

.form-message p {
    margin: 0;
}

.form-message p + p {
    margin-top: 6px;
}

.form-message--success {
    background: rgb(1 46 62 / 66%);
    color: var(--ink);
}

.admin-nav {
    display: flex;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 20px;
}

.admin-nav a {
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    padding: 0.32rem 0.5rem;
    text-decoration: none;
    text-transform: uppercase;
}

.admin-nav a[aria-current="page"],
.admin-nav a:hover {
    border-color: var(--red);
    color: var(--red);
}

.admin-table-wrap {
    border: 1px solid var(--line);
    border-radius: 1em;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.admin-table {
    background: var(--panel);
    border-collapse: collapse;
    min-width: 880px;
    width: 100%;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: var(--accent);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.admin-table tbody tr {
    transition: background 160ms ease, box-shadow 160ms ease;
}

.admin-table tbody tr[data-href] {
    cursor: pointer;
}

.admin-table tbody tr[data-href]:hover,
.admin-table tbody tr[data-href]:focus-within {
    background: rgb(216 116 4 / 8%);
    box-shadow: inset 3px 0 0 var(--accent);
}

.admin-table td span {
    color: var(--muted);
    display: block;
    font-size: 0.9rem;
}

.admin-row-link {
    color: var(--ink);
    text-decoration: none;
}

.admin-row-link:hover,
.admin-row-link:focus {
    color: var(--red);
    text-decoration: underline;
}

.admin-badge {
    border: 1px solid var(--line);
    color: var(--accent) !important;
    display: inline-block !important;
    font-size: 0.75rem !important;
    font-weight: 900;
    margin: 0 4px 4px 0;
    padding: 0.2rem 0.45rem;
    text-transform: uppercase;
}

.button-link {
    background: transparent;
    border: 0;
    color: var(--accent);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 0;
    text-decoration: underline;
}

.button-link:hover,
.button-link:focus {
    color: var(--red);
}

.logout-form {
    margin-top: 28px;
}

.pagination {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-top: 24px;
}

.site-footer {
    background: rgb(12 14 22 / 96%);
    border-top: 1px solid var(--line);
    color: rgb(255 255 255 / 88%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-footer__inner {
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding-bottom: 34px;
    padding-top: 34px;
}

.site-footer__about {
    max-width: 620px;
}

.site-footer__meta {
    min-width: 180px;
    text-align: right;
}

.site-footer__credit {
    font-size: 0.78rem;
    margin-top: 14px !important;
}

.site-footer p,
.site-footer span {
    color: rgb(255 255 255 / 72%);
    display: block;
    margin: 0;
}

.site-footer strong {
    color: rgb(255 255 255 / 92%);
}

.site-footer__cost {
    border-top: 1px solid rgb(216 116 4 / 18%);
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin: 0 auto;
    max-width: 1180px;
    padding: 26px 24px 34px;
}

.site-footer__cost strong {
    display: block;
    margin-bottom: 6px;
}

.site-footer__cost p {
    max-width: 680px;
}

.site-footer__logos {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: flex-end;
}

.site-footer__logos a {
    display: block;
}

.site-footer__logos img {
    display: block;
    height: 54px;
    max-width: 210px;
    object-fit: contain;
}

@media (max-width: 860px) {
    .site-header__inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding-bottom: 16px;
        padding-top: 16px;
    }

    .nav-toggle {
        display: inline-flex;
        position: absolute;
        right: 24px;
        top: 18px;
    }

    .primary-nav {
        display: none;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .primary-nav--open {
        display: flex;
    }

    .primary-nav a {
        border-top: 1px solid var(--line);
        padding-top: 10px;
        width: 100%;
    }

    .primary-nav__external {
        border-left: 0;
        padding-left: 0;
    }

    .account-menu {
        width: 100%;
    }

    .account-menu__trigger {
        text-align: left;
        width: 100%;
    }

    .account-menu__panel {
        box-shadow: none;
        margin-top: 8px;
        position: static;
        width: 100%;
    }

    .hero,
    .section--two,
    .feature-grid,
    .card-grid,
    .listing-grid,
    .people-grid,
    .form-grid,
    .map-shell,
    .timeline-item,
    .timeline-item__body {
        grid-template-columns: 1fr;
    }

    .map-canvas {
        min-height: 440px;
    }

    .map-location-list {
        max-height: none;
    }

    .timeline-list::before {
        left: 10px;
    }

    .timeline-item {
        gap: 14px;
        padding-left: 28px;
    }

    .timeline-item__date {
        padding-top: 0;
        text-align: left;
    }

    .timeline-item__body::before {
        left: -25px;
    }

    .hero {
        min-height: auto;
        padding-top: 52px;
    }

    .hero__content {
        grid-column: 1;
        justify-self: start;
    }

    .site-footer__inner {
        flex-direction: column;
    }

    .site-footer__meta {
        text-align: left;
    }

    .site-footer__cost {
        grid-template-columns: 1fr;
    }

    .site-footer__logos {
        justify-content: flex-start;
    }

    .site-footer__logos img {
        height: auto;
        max-height: 58px;
        max-width: min(260px, 100%);
    }
}
