:root {
    --ink: #18202a;
    --muted: #667085;
    --line: #e7e2d8;
    --paper: #fbfaf7;
    --soft: #f1ece2;
    --gold: #b58a45;
    --gold-dark: #7d5d2b;
    --navy: #172234;
    --white: #ffffff;
    --danger: #b42318;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
}

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

input,
textarea,
button {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px clamp(18px, 5vw, 72px);
    border-bottom: 1px solid rgba(231, 226, 216, .8);
    background: rgba(251, 250, 247, .92);
    backdrop-filter: blur(16px);
}

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

.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 8px;
    color: var(--white);
    background: var(--navy);
    font-weight: 800;
    letter-spacing: .04em;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    color: #344054;
    font-size: 15px;
}

.main-nav a:hover {
    color: var(--gold-dark);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, .55fr);
    gap: 34px;
    min-height: 680px;
    padding: clamp(64px, 9vw, 118px) clamp(18px, 5vw, 72px);
    color: var(--white);
    background:
        linear-gradient(100deg, rgba(23, 34, 52, .94), rgba(23, 34, 52, .68)),
        url("/assets/hero-bg.webp") center / cover;
}

.hero-content {
    max-width: 780px;
    align-self: center;
}

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

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 20px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 14px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
}

h3 {
    margin-bottom: 10px;
    font-size: 22px;
    line-height: 1.25;
}

.hero p:not(.eyebrow) {
    max-width: 650px;
    color: rgba(255, 255, 255, .82);
    font-size: 20px;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
    cursor: pointer;
    font-weight: 700;
}

.button.primary {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--white);
}

.button.ghost {
    background: transparent;
    color: inherit;
}

.hero .button.ghost {
    border-color: rgba(255, 255, 255, .35);
}

.hero-panel {
    align-self: end;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 8px;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(18px);
}

.hero-panel span {
    display: block;
    margin-bottom: 10px;
    color: var(--gold);
    font-weight: 800;
}

.hero-panel strong {
    display: block;
    font-size: 24px;
    line-height: 1.25;
}

.section,
.page-hero,
.article-page,
.admin-shell,
.auth-shell {
    padding: clamp(54px, 8vw, 96px) clamp(18px, 5vw, 72px);
}

.page-hero {
    background: var(--navy);
    color: var(--white);
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    color: rgba(255, 255, 255, .76);
    font-size: 19px;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 32px;
}

.muted {
    background: var(--soft);
}

.practice-grid,
.article-grid,
.team-grid,
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.practice-grid article,
.article-card,
.person,
.practice-list article,
.contact-grid > div,
.contact-form,
.auth-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    padding: 26px;
    box-shadow: 0 16px 38px rgba(24, 32, 42, .06);
}

.article-card p {
    color: var(--gold-dark);
    font-size: 14px;
    font-weight: 800;
}

.article-card span,
.practice-grid p,
.practice-list p,
.person p {
    color: var(--muted);
}

.article-card a:hover,
.site-footer a:hover,
.row-actions a:hover {
    color: var(--gold-dark);
}

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

.person .avatar {
    display: grid;
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
    place-items: center;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
}

.contact-grid {
    grid-template-columns: .8fr 1.2fr;
}

label {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    color: #344054;
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: 12px 14px;
    background: var(--white);
    color: var(--ink);
}

textarea {
    resize: vertical;
}

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

.check input {
    width: auto;
}

.article-page {
    max-width: 900px;
    margin: 0 auto;
}

.article-page h1 {
    color: var(--navy);
}

.lead {
    color: var(--muted);
    font-size: 21px;
}

.article-body {
    margin-top: 32px;
    font-size: 18px;
}

.auth-shell {
    display: grid;
    min-height: 620px;
    place-items: center;
}

.auth-card {
    width: min(100%, 440px);
}

.admin-shell {
    max-width: 1180px;
    margin: 0 auto;
}

.admin-shell.narrow {
    max-width: 820px;
}

.admin-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 24px;
}

.notice {
    border-radius: 8px;
    padding: 14px 16px;
    background: #ecfdf3;
    color: #067647;
    font-weight: 700;
}

.error {
    color: var(--danger);
    font-weight: 700;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

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

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

th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

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

.row-actions button {
    border: 0;
    background: transparent;
    color: var(--danger);
    cursor: pointer;
}

.editor-form {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 34px clamp(18px, 5vw, 72px);
    border-top: 1px solid var(--line);
    background: var(--white);
    color: var(--muted);
}

.site-footer strong {
    color: var(--ink);
}

nav[role="navigation"] {
    margin-top: 24px;
}

@media (max-width: 860px) {
    .site-header,
    .site-footer,
    .admin-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .main-nav {
        justify-content: flex-start;
    }

    .hero,
    .practice-grid,
    .article-grid,
    .team-grid,
    .practice-list,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }
}

/* Case & Counsel Partners 1.1.0 palette */
:root {
    --ink: #111827;
    --muted: #64748b;
    --line: #d9dee8;
    --paper: #f3f6fa;
    --soft: #e8edf4;
    --gold: #b9904a;
    --gold-dark: #7a5b2b;
    --navy: #172033;
    --white: #ffffff;
}

.brand strong {
    letter-spacing: .02em;
}

.brand-mark {
    background: linear-gradient(135deg, #172033, #334155);
}

.hero,
.page-hero {
    background:
        radial-gradient(circle at 88% 18%, rgba(185, 144, 74, .26), transparent 22rem),
        linear-gradient(135deg, rgba(17, 24, 39, .97), rgba(51, 65, 85, .82)),
        url("/assets/hero-bg.webp") center / cover;
}

.copyright-strip {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin: 18px clamp(12px, 3vw, 34px) 0;
    padding: 18px clamp(18px, 5vw, 42px);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #111827;
    color: rgba(255, 255, 255, .82);
    font-size: 14px;
}

.copyright-strip p {
    margin: 0;
}

.copyright-strip span {
    color: var(--gold);
    font-weight: 800;
    white-space: nowrap;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
}

.admin-nav a {
    padding: 10px 16px;
    border-radius: 999px;
    color: #334155;
    font-weight: 800;
}

.admin-nav a:hover {
    background: var(--navy);
    color: var(--white);
}

.person span {
    display: block;
    margin-top: 10px;
    color: var(--muted);
}

@media (max-width: 860px) {
    .copyright-strip {
        flex-direction: column;
    }

    .admin-nav {
        border-radius: 18px;
    }
}

/* 1.2.0 footer, logo, policies and feedback */
.site-header {
    align-items: center;
}

.brand-logo {
    width: 96px;
    height: 58px;
    object-fit: contain;
    border-radius: 10px;
    background: var(--white);
}

.brand-mark {
    display: none;
}

.site-footer {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
    align-items: stretch;
    margin: 18px clamp(12px, 3vw, 34px) 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 22px 60px rgba(16, 24, 40, .08);
}

.footer-map {
    min-height: 320px;
    background: #e8edf4;
}

.footer-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 320px;
    border: 0;
}

.map-placeholder {
    display: grid;
    min-height: 320px;
    place-content: center;
    padding: 32px;
    text-align: center;
    color: var(--muted);
}

.map-placeholder strong {
    color: var(--ink);
    font-size: 24px;
}

.footer-nav {
    display: grid;
    align-content: center;
    gap: 12px;
    padding: 34px;
}

.footer-nav a {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #334155;
    font-weight: 800;
}

.footer-nav a:hover {
    background: var(--navy);
    color: var(--white);
}

.copyright-strip {
    margin-bottom: 18px;
}

.page-hero.compact {
    min-height: auto;
}

.settings-preview {
    width: 220px;
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    padding: 8px;
}

.settings-favicon-preview {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    padding: 6px;
}

.message-list {
    display: grid;
    gap: 16px;
}

.message-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 18px 48px rgba(16, 24, 40, .07);
}

.message-card.read {
    opacity: .72;
}

.contact-form .notice {
    margin-bottom: 18px;
}

@media (max-width: 860px) {
    .site-footer,
    .message-card {
        grid-template-columns: 1fr;
    }

    .brand-logo {
        width: 82px;
        height: 50px;
    }
}

/* 1.3.0 content editing, team photos and office contacts */
select {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: 12px 14px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
}

select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(197, 154, 74, .16);
    outline: none;
}

.person-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 18px;
}

.office-contacts {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .72);
}

.content-block {
    margin-bottom: 22px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 18px 48px rgba(16, 24, 40, .07);
}

.content-block img,
.content-block video {
    display: block;
    width: 100%;
    max-height: 620px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 18px;
}

.embed-wrap iframe {
    width: 100%;
    min-height: 360px;
    border: 0;
    border-radius: 16px;
}

.block-editor {
    margin-bottom: 12px;
}

/* 1.3.5 faster hero and stable toolbars */
.auth-nav,
.admin-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    overflow: visible;
    white-space: normal;
}

.auth-nav form {
    margin: 0;
}

.auth-nav button {
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    background: #f2f4f7;
    color: #344054;
    cursor: pointer;
    font-weight: 800;
}

.admin-nav a {
    flex: 0 0 auto;
}

/* 1.3.6 stable admin menu without horizontal scroll */
.admin-shell {
    width: min(1180px, calc(100% - 36px));
}

.admin-shell.narrow {
    width: min(820px, calc(100% - 36px));
}

.admin-nav {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    align-items: center;
    overflow: visible !important;
    white-space: normal !important;
    border-radius: 18px;
}

.admin-nav a {
    flex: 0 1 auto;
    min-width: max-content;
}

.auth-nav {
    overflow: visible !important;
}

.hero,
.page-hero {
    background-image:
        linear-gradient(100deg, rgba(7, 14, 25, .52), rgba(7, 14, 25, .06)),
        url("/assets/hero-bg-small.jpg") !important;
}

@supports (background-image: url("/assets/hero-bg-small.webp")) {
    .hero,
    .page-hero {
        background-image:
            linear-gradient(100deg, rgba(7, 14, 25, .52), rgba(7, 14, 25, .06)),
            url("/assets/hero-bg-small.webp") !important;
    }
}

/* 1.3.2 visual fixes and visitor analytics */
.hero {
    background:
        linear-gradient(100deg, rgba(10, 18, 32, .62), rgba(10, 18, 32, .18)),
        url("/assets/hero-bg.webp") center right / cover !important;
}

.page-hero {
    background:
        linear-gradient(100deg, rgba(10, 18, 32, .70), rgba(10, 18, 32, .32)),
        url("/assets/hero-bg.webp") center right / cover !important;
}

.office-contacts {
    margin-top: 20px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.office-contacts strong {
    font-weight: 600;
}

.office-contacts p:first-child strong {
    font-weight: 400;
}

/* Modern 1.0.0 refresh */
:root {
    --ink: #101828;
    --muted: #667085;
    --line: #e4e7ec;
    --paper: #f7f8fb;
    --soft: #eef2f6;
    --gold: #c59a4a;
    --gold-dark: #8a6327;
    --navy: #0f172a;
    --white: #ffffff;
}

body {
    background:
        radial-gradient(circle at top left, rgba(197, 154, 74, .14), transparent 32rem),
        linear-gradient(180deg, #fbfcff 0%, var(--paper) 100%);
}

.site-header {
    margin: 14px clamp(12px, 3vw, 34px) 0;
    border: 1px solid rgba(228, 231, 236, .9);
    border-radius: 18px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 18px 50px rgba(16, 24, 40, .08);
}

.brand-mark {
    border-radius: 14px;
    background: linear-gradient(135deg, #0f172a, #29364f);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}

.main-nav a {
    padding: 8px 10px;
    border-radius: 999px;
}

.main-nav a:hover {
    background: #f2f4f7;
}

.hero {
    position: relative;
    overflow: hidden;
    margin: 18px clamp(12px, 3vw, 34px) 0;
    border-radius: 28px;
    background:
        linear-gradient(100deg, rgba(15, 23, 42, .96), rgba(15, 23, 42, .68)),
        url("/assets/hero-bg.webp") center / cover;
}

.hero::after {
    content: "";
    position: absolute;
    right: -160px;
    bottom: -160px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(197, 154, 74, .18);
    filter: blur(20px);
}

.hero-content,
.hero-panel {
    position: relative;
    z-index: 1;
}

.hero-panel,
.practice-grid article,
.article-card,
.person,
.practice-list article,
.contact-grid > div,
.contact-form,
.auth-card,
.editor-form,
.table-wrap {
    border-color: rgba(228, 231, 236, .92);
    border-radius: 18px;
    box-shadow: 0 22px 60px rgba(16, 24, 40, .08);
}

.button {
    border-radius: 999px;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(16, 24, 40, .12);
}

.button.primary {
    background: linear-gradient(135deg, #cfa75a, #a9782f);
    box-shadow: 0 14px 30px rgba(181, 138, 69, .28);
}

.section {
    margin: 18px clamp(12px, 3vw, 34px);
    border-radius: 28px;
}

.muted {
    background: rgba(238, 242, 246, .86);
}

.page-hero {
    margin: 18px clamp(12px, 3vw, 34px) 0;
    border-radius: 28px;
    background:
        radial-gradient(circle at 88% 20%, rgba(197, 154, 74, .24), transparent 22rem),
        linear-gradient(135deg, #0f172a, #1f2937);
}

.article-card,
.practice-grid article,
.practice-list article,
.person {
    transition: transform .18s ease, box-shadow .18s ease;
}

.article-card:hover,
.practice-grid article:hover,
.practice-list article:hover,
.person:hover {
    transform: translateY(-3px);
    box-shadow: 0 28px 70px rgba(16, 24, 40, .12);
}

input:focus,
textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(197, 154, 74, .16);
    outline: none;
}

.auth-shell {
    background:
        radial-gradient(circle at 50% 0%, rgba(197, 154, 74, .18), transparent 26rem),
        transparent;
}

.auth-card {
    backdrop-filter: blur(18px);
}

.auth-link {
    display: inline-flex;
    margin-top: 16px;
    color: var(--gold-dark);
    font-weight: 800;
}

.admin-shell {
    margin-top: 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, .64);
}

table tr:hover td {
    background: #f9fafb;
}

@media (max-width: 860px) {
    .site-header,
    .hero,
    .section,
    .page-hero {
        margin-left: 10px;
        margin-right: 10px;
        border-radius: 20px;
    }
}

/* 1.3.7 compact pagination and fixed one-line admin toolbar */
.admin-shell,
.admin-shell.narrow {
    width: min(1240px, calc(100% - 32px));
}

.admin-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100%;
    gap: 6px;
    padding: 7px;
    overflow: visible !important;
    white-space: nowrap !important;
}

.admin-nav a {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 8px;
    text-align: center;
    font-size: clamp(11px, .95vw, 13px);
    line-height: 1.15;
}

.editor-form {
    max-width: 820px;
}

nav[role="navigation"] {
    margin-top: 18px;
}

nav[role="navigation"] > div:first-child {
    display: none;
}

nav[role="navigation"] > div:last-child,
nav[role="navigation"] .relative.z-0.inline-flex {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

nav[role="navigation"] a,
nav[role="navigation"] span {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: 6px 10px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    line-height: 1 !important;
}

nav[role="navigation"] svg {
    width: 16px !important;
    height: 16px !important;
}

@media (max-width: 980px) {
    .admin-nav {
        gap: 4px;
        padding: 6px;
    }

    .admin-nav a {
        padding: 7px 5px;
        font-size: 10px;
    }
}

/* 1.3.8 prevent admin toolbar overlap on narrow admin pages */
.admin-shell,
.admin-shell.narrow {
    max-width: 1240px;
}

.admin-nav {
    justify-content: flex-start;
}

.admin-nav a {
    flex: 0 0 auto;
    min-width: max-content;
    padding-left: 12px;
    padding-right: 12px;
}

.admin-shell.narrow .editor-form {
    width: min(820px, 100%);
}

/* 1.3.4 final hero background override */
.hero,
.page-hero {
    background-image:
        linear-gradient(100deg, rgba(7, 14, 25, .52), rgba(7, 14, 25, .06)),
        url("/assets/hero-bg.jpg") !important;
    background-position: center right !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
}
