@font-face {
    font-family: "Fraunces";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/fraunces-600.woff2") format("woff2");
}

@font-face {
    font-family: "Source Sans 3";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/source-sans-400.woff2") format("woff2");
}

@font-face {
    font-family: "Source Sans 3";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/source-sans-600.woff2") format("woff2");
}

:root {
    --ink: #1A1714;
    --ink-soft: #4A453C;
    --paper: #EFE7DA;
    --sheet: #F6F1E7;
    --sidebar: #E4D9C8;
    --line: #D4C7B4;
    --copper: #A24B32;
    --copper-deep: #6E2E1C;
    --grove: #243F36;
    --grove-soft: #E5EFE9;
    --danger: #8C2F22;
    --danger-soft: #F8E8E2;
    --shadow: 0 18px 40px rgba(26, 23, 20, 0.12);
    --header: 4.25rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
    font-size: 1.0625rem;
    line-height: 1.65;
    overflow-wrap: break-word;
    text-rendering: optimizeLegibility;
}

body.nav-open {
    overflow: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--copper-deep);
    text-underline-offset: 0.18em;
}

address {
    font-style: normal;
}

h1,
h2,
h3,
.brand-name,
.service-name,
.faq-item summary,
.foot-name {
    font-family: "Fraunces", Georgia, "Times New Roman", serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

h1,
.folio-title {
    margin: 0.35rem 0 0.8rem;
    font-size: clamp(2rem, 1.35rem + 2.5vw, 4.05rem);
}

h2 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.35rem);
}

h3 {
    margin: 1.4rem 0 0.35rem;
    font-size: 1.28rem;
}

p {
    margin: 0 0 0.9rem;
}

ul,
ol {
    margin: 0.4rem 0 1rem;
    padding-left: 1.2rem;
}

li {
    margin: 0.3rem 0;
}

code {
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92em;
}

:focus-visible {
    outline: 2px solid var(--copper-deep);
    outline-offset: 3px;
}

::selection {
    background: #E7C7B8;
    color: var(--ink);
}

.skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 80;
    background: var(--ink);
    color: var(--sheet);
    padding: 0.6rem 0.9rem;
    text-decoration: none;
}

.skip:focus {
    top: 0.75rem;
}

.shell {
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(239, 231, 218, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.sidebar-top {
    position: relative;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: var(--header);
    padding: 0.55rem 1rem;
    background: rgba(239, 231, 218, 0.96);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    color: var(--ink);
    text-decoration: none;
}

.brand-mark {
    width: 36px;
    height: 36px;
    flex: none;
}

.brand-lock {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-name {
    font-size: 1.08rem;
}

.brand-kicker {
    color: var(--ink-soft);
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 44px;
    min-width: 44px;
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
    display: block;
    width: 1rem;
    height: 1.5px;
    background: var(--ink);
    content: "";
}

.nav-toggle-lines {
    position: relative;
}

.nav-toggle-lines::before,
.nav-toggle-lines::after {
    position: absolute;
    left: 0;
}

.nav-toggle-lines::before {
    top: -5px;
}

.nav-toggle-lines::after {
    top: 5px;
}

.site-nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 40;
    overflow: auto;
    padding: 5.2rem 1.15rem 2rem;
    background: var(--sheet);
}

.site-nav.is-open {
    display: block;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 44px;
    padding: 0.35rem 0.2rem;
    color: var(--ink);
    text-decoration: none;
    border-left: 2px solid transparent;
}

.nav-link.is-active {
    border-left-color: var(--copper);
    color: var(--copper-deep);
}

.nav-index {
    width: 1.7rem;
    color: var(--copper-deep);
    font-variant-numeric: tabular-nums;
    font-size: 0.9375rem;
}

.nav-meta {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.98rem;
}

.nav-meta a {
    overflow-wrap: anywhere;
}

.nav-org {
    margin-bottom: 0.35rem;
    color: var(--ink);
    font-weight: 600;
}

.sheet {
    border-top: 3px solid var(--copper);
    min-width: 0;
}

.sheet-inner {
    width: min(100% - 2rem, 76rem);
    margin: 0 auto;
    padding: 1.6rem 0 3rem;
}

.crumb {
    margin-bottom: 1.2rem;
}

.crumb-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
    color: var(--ink-soft);
    font-size: 0.9375rem;
}

.crumb-list li:not(:last-child)::after {
    content: "/";
    margin-left: 0.4rem;
    color: var(--line);
}

.folio-kicker,
.section-kicker {
    margin: 0;
    color: var(--copper-deep);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.lede {
    font-size: 1.18rem;
    line-height: 1.55;
    max-width: 40rem;
}

.folio-actions,
.form-actions,
.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.55rem 0.95rem;
    border: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.btn-copper {
    background: var(--copper-deep);
    border-color: var(--copper-deep);
    color: var(--sheet);
}

.btn-copper:hover {
    background: #542214;
}

.btn-line:hover,
.nav-toggle:hover {
    background: rgba(26, 23, 20, 0.05);
}

.figure-frame {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #ddd4c6;
    box-shadow: var(--shadow);
}

.figure-frame img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

.figure-cap {
    max-width: 36rem;
    margin-top: 0.8rem;
    color: var(--ink-soft);
    font-size: 0.98rem;
}

.block {
    margin: 3.2rem 0;
}

.abstract-grid,
.who-grid,
.close-grid,
.contact-grid,
.band,
.split,
.role-grid,
.foot-grid {
    display: grid;
    gap: 1.25rem;
}

.principle-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.abstract-item,
.principle,
.fee-panel {
    padding-top: 0.75rem;
    border-top: 2px solid var(--copper);
}

.abstract-item h3,
.principle h3 {
    margin-top: 0.45rem;
}

.service-index {
    list-style: none;
    margin: 0;
    padding: 0;
}

.service-row {
    display: grid;
    gap: 0.25rem 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
    color: inherit;
    text-decoration: none;
}

.service-index li:last-child .service-row {
    border-bottom: 1px solid var(--line);
}

.service-row:hover {
    background: rgba(255, 252, 247, 0.7);
}

.service-num,
.clause-num,
.path-num {
    color: var(--copper-deep);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.service-name {
    font-size: 1.3rem;
}

.service-purpose,
.who-list,
.prose p,
.prose li,
.service-block p,
.service-block li,
.clause p,
.clause li {
    max-width: 68ch;
}

.who-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.who-list li {
    padding: 0.85rem 0;
    border-top: 1px solid var(--line);
}

.path {
    margin: 0;
    padding: 0;
    list-style: none;
}

.path-step {
    padding: 0 0 1.4rem 1.1rem;
    border-left: 1px solid var(--line);
}

.boundary {
    padding: clamp(1.4rem, 3vw, 2.4rem);
    background:
        linear-gradient(155deg, rgba(162, 75, 50, 0.28), transparent 46%),
        var(--grove);
    color: var(--sheet);
}

.boundary a {
    color: var(--sheet);
}

.close-band {
    padding: clamp(1.3rem, 3vw, 2rem);
    background:
        linear-gradient(135deg, rgba(162, 75, 50, 0.16), rgba(36, 63, 54, 0.08)),
        #E7DFD1;
    border: 1px solid var(--line);
}

.jump {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.1rem;
    margin: 1.4rem 0 0.5rem;
    padding: 0.4rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.jump a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--ink);
    text-decoration: none;
}

.jump a:hover {
    color: var(--copper-deep);
}

.service-block,
.clause,
.situation {
    padding: 1.7rem 0;
    border-top: 1px solid var(--line);
}

.site-footer {
    margin-top: 3rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--line);
}

.foot-name {
    margin: 0 0 0.4rem;
    font-size: 1.45rem;
}

.foot-label {
    margin: 0 0 0.45rem;
    font-weight: 600;
}

.foot-links {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.foot-links a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    color: var(--ink);
    text-decoration: none;
}

.foot-links a:hover {
    color: var(--copper-deep);
}

.faq-list {
    border-top: 1px solid var(--line);
}

.faq-item {
    border-bottom: 1px solid var(--line);
}

.faq-item summary {
    cursor: pointer;
    padding: 1rem 0;
    font-size: 1.25rem;
}

.faq-item summary:hover {
    color: var(--copper-deep);
}

.field {
    margin-bottom: 1rem;
}

.field label,
.check span {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.field input,
.field textarea {
    width: 100%;
    padding: 0.75rem 0.8rem;
    border: 1px solid #C9BBA8;
    border-radius: 0;
    background: #FBF8F2;
    color: var(--ink);
    font: inherit;
}

.field textarea {
    min-height: 11rem;
    resize: vertical;
}

.has-error input,
.has-error textarea {
    border-color: var(--danger);
}

.field-error {
    margin: 0.35rem 0 0;
    color: var(--danger);
    font-size: 0.98rem;
}

.check {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.check input {
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0.25rem;
    flex: none;
}

.check label,
.check span {
    margin: 0;
    font-weight: 400;
}

.form-note {
    color: var(--ink-soft);
}

.alert {
    margin: 0 0 1.2rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--line);
}

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

.alert-ok {
    background: var(--grove-soft);
    border-color: var(--grove);
}

.missing {
    padding-bottom: 1rem;
}

.cookie-banner,
.cookie-panel {
    position: fixed;
    z-index: 60;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    max-height: min(70vh, 34rem);
    overflow: auto;
    padding: 1rem;
    border: 1px solid var(--line);
    background: rgba(246, 241, 231, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.cookie-banner[hidden],
.cookie-panel[hidden] {
    display: none;
}

.cookie-title {
    margin: 0 0 0.35rem;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.2rem;
    font-weight: 600;
}

.cookie-panel-top {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.cookie-prefs {
    list-style: none;
    margin: 0.8rem 0;
    padding: 0;
}

.cookie-prefs li {
    margin: 0.8rem 0;
}

.cookie-note {
    margin: 0.8rem 0 0;
}

body.has-cookie {
    padding-bottom: 18rem;
}

@media (min-width: 720px) {
    .abstract-grid,
    .close-grid,
    .role-grid,
    .foot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-row {
        grid-template-columns: 2.5rem minmax(12rem, 0.7fr) minmax(0, 1.3fr);
        align-items: baseline;
    }

    .clause,
    .situation {
        grid-template-columns: 4.5rem minmax(0, 1fr);
        display: grid;
        column-gap: 1rem;
    }

    .cookie-banner,
    .cookie-panel {
        left: 50%;
        right: auto;
        width: min(46rem, calc(100% - 2rem));
        transform: translateX(-50%);
    }

    body.has-cookie {
        padding-bottom: 14rem;
    }
}

@media (min-width: 900px) {
    .folio-grid,
    .who-grid,
    .band,
    .contact-grid,
    .split {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
        align-items: start;
        gap: 2rem;
    }

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

    .foot-grid {
        grid-template-columns: 1.3fr 0.8fr 0.9fr;
    }
}

@media (min-width: 980px) {
    .shell {
        display: grid;
        grid-template-columns: 17.5rem minmax(0, 1fr);
    }

    .sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        display: flex;
        flex-direction: column;
        overflow: auto;
        border-bottom: 0;
        border-right: 1px solid var(--line);
        background: var(--sidebar);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .sidebar-top {
        display: block;
        padding: 1.4rem 1.15rem 0.4rem;
        background: transparent;
    }

    .nav-toggle {
        display: none;
    }

    .site-nav,
    .site-nav.is-open {
        display: flex;
        flex-direction: column;
        position: static;
        flex: 1;
        overflow: auto;
        padding: 0.6rem 0.85rem 1.2rem;
        background: transparent;
    }

    .nav-meta {
        margin-top: auto;
    }

    .sheet {
        border-top: 0;
        box-shadow: inset 3px 0 0 var(--copper);
    }

    .sheet-inner {
        width: min(100% - 4.5rem, 76rem);
        padding-top: 2.4rem;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .folio-title {
        animation: ov-rise 0.65s ease both;
    }
}

@keyframes ov-rise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
