/* ==========================================================================
   Erico
   All colour, type and rhythm come from CSS custom properties written into
   the page by App\Support\Appearance. Nothing here hard-codes a palette, so
   switching themes in the admin restyles the whole site with no rebuild.
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    font-weight: 350;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color .4s ease, color .4s ease;
}

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

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

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

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

.wrap { width: min(100% - 48px, 1320px); margin-inline: auto; }
.wrap-narrow { width: min(100% - 48px, 760px); margin-inline: auto; }

/* --------------------------------------------------------------- type ---- */

h1, h2, h3, .display {
    font-family: var(--font-display);
    font-weight: var(--display-weight);
    letter-spacing: var(--tracking);
    line-height: 1.08;
    margin: 0;
}

.h-hero  { font-size: clamp(2.6rem, 7vw, 5.5rem); }
.h-page  { font-size: clamp(1.3rem, 2.2vw, 1.8rem); }
.h-piece { font-size: clamp(1.5rem, 2.6vw, 2.25rem); }

.lede {
    font-size: clamp(.95rem, 1.2vw, 1.05rem);
    color: var(--muted);
    max-width: none;
    line-height: 1.6;
}

.eyebrow {
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
}

.dim { color: var(--muted); }

/* ------------------------------------------------------------- header ---- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); }

.site-header .bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 14px 0;
}

.brand {
    /* Courier, independent of the site typeface - see Appearance::brandFont() */
    font-family: var(--font-brand, var(--font-display));
    /* Scales with the viewport so it stays the anchor of the header on a wide
       screen without crowding the menu on a laptop. Courier has a small
       x-height, so it needs more px than a sans to read at the same weight. */
    font-size: clamp(30px, 3vw, 44px);
    font-weight: var(--display-weight);
    letter-spacing: .16em;
    text-transform: lowercase;
    line-height: 1;
    font-weight: 400;
}

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
    font-size: 13px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    position: relative;
    padding: 4px 0;
    transition: color .25s ease;
}
.nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .3s cubic-bezier(.2,.7,.3,1);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }

/* --------------------------------------------------------------- hero ---- */

.hero { padding: clamp(24px, 4vh, 52px) 0 clamp(16px, 2.5vh, 32px); }
.hero .h-hero { margin-bottom: 24px; }
.hero-meta {
    display: flex; gap: 28px; flex-wrap: wrap;
    margin-top: 36px; padding-top: 24px;
    border-top: 1px solid var(--line);
    font-size: 13px; color: var(--muted);
}

/* --------------------------------------------------------------- grid ---- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--grid-min), 1fr));
    gap: var(--grid-gap);
    padding-bottom: 40px;
}

.tile { display: block; }

.tile-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 1 / 1;
    /* The source photographs have a white ground and a baked-in drop shadow.
       On a dark palette that would read as a glaring white box, so the palette
       supplies a mat colour and the white becomes an intentional gallery mat. */
    background: var(--mat);
    padding: var(--mat-pad);
    transition: transform .5s cubic-bezier(.2,.7,.3,1), box-shadow .4s ease;
}
.tile-frame img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    object-fit: contain;
    transition: transform .7s cubic-bezier(.2,.7,.3,1), opacity .4s ease;
}
.tile:hover .tile-frame img { transform: scale(1.045); }


.tile-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    padding-top: 16px;
}
.tile-title {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: var(--tracking);
    font-size: .82rem;
}
.tile-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; }


/* ------------------------------------------------------- single piece ---- */

.piece {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(250px, .68fr);
    gap: clamp(36px, 5vw, 80px);
    padding: clamp(28px, 5vh, 56px) 0;
    align-items: start;
}

.piece-figure {
    border-radius: var(--radius);
    overflow: hidden;
    /* No padding here: at this size the photograph's own white ground already
       reads as the mat, and adding another band just doubles it up. */
    background: var(--mat);
}

.piece-figure img { width: 100%; cursor: zoom-in; }

.piece-detail { margin-top: 28px; }
.piece-detail figcaption { margin-top: 10px; }

.piece-aside { position: sticky; top: 96px; }
.piece-aside .h-piece { margin-bottom: 18px; }

.spec-list { margin: 0 0 4px; padding: 0; list-style: none; }
.spec-list li {
    display: flex; justify-content: space-between; gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}
.spec-list dt, .spec-list .k { color: var(--muted); }

.badge {
    display: inline-block;
    margin-top: 18px;
    padding: 5px 13px;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
}
.badge.sold { border-color: var(--accent); color: var(--accent); }

.piece-nav {
    display: flex; justify-content: space-between; gap: 20px;
    margin-top: 40px; padding: 26px 0 0;
    border-top: 1px solid var(--line);
    font-size: 13.5px;
}
.piece-nav a { color: var(--muted); transition: color .25s ease; }
.piece-nav a:hover { color: var(--ink); }

/* ------------------------------------------------------------ lightbox --- */

.lightbox {
    position: fixed; inset: 0; z-index: 100;
    display: none; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--bg) 94%, #000);
    padding: 3vmin;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity .3s ease;
}
.lightbox.open { display: flex; opacity: 1; }
.lightbox img { max-width: 100%; max-height: 94vh; object-fit: contain; }

/* --------------------------------------------------------------- prose --- */

.prose { max-width: 68ch; font-size: 1.02rem; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font-size: 1.5rem; margin: 2em 0 .6em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose img { margin: 1.6em 0; border-radius: var(--radius); }

/* -------------------------------------------------------------- footer --- */

/* Compact: Eric wants the home page and the inner pages to fit one screen. */
.site-footer {
    margin-top: clamp(20px, 3vh, 36px);
    padding: 14px 0 20px;
    border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
    font-size: 12.5px; color: var(--muted);
}
.site-footer a:hover { color: var(--ink); }

/* ------------------------------------------------------- reveal on scroll */

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* ================================================== forms / admin chrome == */

label { display: block; font-size: 12.5px; letter-spacing: .04em; color: var(--muted); margin-bottom: 7px; }

input[type=text], input[type=email], input[type=password], textarea, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    transition: border-color .2s ease;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { min-height: 150px; resize: vertical; line-height: 1.6; }

.field { margin-bottom: 20px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 30px;
}

.btn {
    display: inline-block;
    padding: 11px 22px;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    background: var(--ink);
    color: var(--bg);
    font: inherit; font-size: 14px;
    cursor: pointer;
    transition: opacity .2s ease;
}
.btn:hover { opacity: .85; }
.btn.secondary { background: transparent; color: var(--ink); }
.btn.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; }

.error { color: #d14343; font-size: 13px; margin-top: 6px; }
.notice {
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 13px 17px; margin-bottom: 28px; font-size: 14px;
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
tbody tr { transition: background-color .2s ease; }
tbody tr:hover { background: var(--surface); }
.thumb { width: 52px; height: 52px; object-fit: cover; background: var(--surface); border-radius: var(--radius); }

/* --------------------------------------------------- appearance chooser -- */

.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 8px; }

.opt {
    display: block; cursor: pointer;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    transition: border-color .2s ease, transform .2s ease;
}
.opt:hover { transform: translateY(-2px); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt.is-active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.opt-name { display: block; font-size: 14px; margin-bottom: 4px; }
.opt-note { display: block; font-size: 12px; color: var(--muted); line-height: 1.45; }

.swatch { display: flex; height: 34px; border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; border: 1px solid var(--line); }
.swatch span { flex: 1; }

.preview-frame {
    width: 100%; height: 640px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.sticky-actions {
    position: sticky; bottom: 0;
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    padding: 16px 0; margin-top: 32px;
    display: flex; gap: 12px; align-items: center;
}

/* ------------------------------------------------------------ responsive - */

@media (max-width: 900px) {
    .piece { grid-template-columns: 1fr; }
    .piece-aside { position: static; }
    .row { grid-template-columns: 1fr; }
    .wrap, .wrap-narrow { width: min(100% - 32px, 1320px); }
}

@media (max-width: 620px) {
    .nav { gap: 18px; }
    .nav a { font-size: 12px; letter-spacing: .06em; }
    .brand { font-size: 24px; letter-spacing: .14em; }
    .site-header .bar { padding: 14px 0; }
}

/* ==========================================================================
   Works: categories, series, and the single-piece page
   ========================================================================== */

/* --- Works landing: one thumb per category ------------------------------- */
.cat-grid {
    display: grid; gap: clamp(28px, 3vw, 52px);
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    padding-bottom: 40px;
}
.cat-tile { display: block; }
.cat-frame {
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: 1 / 1; overflow: hidden;
    background: var(--mat); border-radius: var(--radius);
}
.cat-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.3,1); }
.cat-tile:hover .cat-frame img { transform: scale(1.04); }
.cat-empty { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cat-label { display: flex; justify-content: flex-start; align-items: baseline; gap: 12px; padding-top: 6px; }
.cat-title {
    font-family: var(--font-display); font-weight: 400;
    letter-spacing: var(--tracking); font-size: .95rem;
}

/* --- Series headings ----------------------------------------------------- */
.series-block { margin-bottom: clamp(48px, 7vh, 88px); }
.series-title {
    font-weight: 400;
    font-size: clamp(1rem, 1.5vw, 1.2rem); margin: 0 0 6px;
    padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
/* Runs the width of the grid rather than a narrow column. */
.series-blurb { color: var(--muted); font-size: 14px; margin: 8px 0 0; max-width: none; }
.series-block .grid { padding-top: 26px; }

/* Eric asked for the title closer to the image than it was. */
/* Title sits tight under the picture, left aligned; "sold" pushes right. */
.tile-caption {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 10px; padding-top: 4px;
}
.tile-sold { font-size: .74rem; color: var(--muted); letter-spacing: .04em; }

/* --- Sold filter toggle -------------------------------------------------- */
/* A tick in a box rather than a sliding dot, and pushed to the right. */
.toggle-row { display: flex; justify-content: flex-end; }
.toggle {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--muted);
}
.toggle-box {
    width: 15px; height: 15px; border-radius: 2px;
    border: 1px solid var(--line); background: var(--bg);
    position: relative; transition: border-color .2s ease;
}
.toggle-box::after {
    content: "✕"; position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; line-height: 1; color: var(--ink);
    opacity: 0; transition: opacity .18s ease;
}
.toggle:hover .toggle-box { border-color: var(--accent); }
.toggle.on { color: var(--ink); }
.toggle.on .toggle-box { border-color: var(--ink); }
.toggle.on .toggle-box::after { opacity: 1; }

/* --- Single piece -------------------------------------------------------- */
/* Category above, picture large, caption bottom-right flush with the image,
   and the prev/next arrows pinned to the middle of each side. */

.piece-wrap { position: relative; }

.piece-category {
    margin: clamp(10px, 2vh, 20px) 0 clamp(8px, 1.5vh, 16px);
    font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
}
.piece-category a { color: var(--muted); }
.piece-category a:hover { color: var(--ink); }

.piece-stage {
    --caption: 260px;
    /* Three tracks with matching outer widths, so the picture centres on the
       PAGE rather than on the picture-and-caption pair. The left track is an
       empty counterweight to the caption on the right - a centred flex row put
       the image off to the left, which Eric spotted. */
    display: grid;
    grid-template-columns: var(--caption) minmax(0, auto) var(--caption);
    align-items: end;
    justify-content: center;
    gap: clamp(20px, 3vw, 48px);
}

.single-figure {
    grid-column: 2;
    margin: 0; background: var(--mat); border-radius: var(--radius);
    overflow: hidden;
}
.single-figure img {
    width: auto; max-width: 100%;
    /* Larger than before, and sized so the page still fits one screen. */
    max-height: 72vh;
    display: block;
}

.single-info {
    grid-column: 3;
    text-align: left; padding-bottom: 2px;
}
.single-title {
    font-weight: 400;
    /* A step up from the rest of the caption, well down from a page heading. */
    font-size: 1.05rem;
    margin: 0 0 6px;
}
.single-line { margin: 0; font-size: .85rem; color: var(--muted); line-height: 1.5; }

.detail-peek {
    display: inline-block; position: relative; margin-top: 10px;
    font-size: .85rem; color: var(--muted);
    text-decoration: underline; text-underline-offset: 3px; cursor: help;
}
.detail-pop {
    position: absolute; right: 0; bottom: calc(100% + 10px);
    width: min(60vw, 420px); padding: 8px;
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: 0 24px 60px -24px rgb(0 0 0 / .45);
    opacity: 0; visibility: hidden; z-index: 60;
    transition: opacity .22s ease, visibility .22s;
}
.detail-peek:hover .detail-pop,
.detail-peek:focus .detail-pop,
.detail-peek:focus-within .detail-pop { opacity: 1; visibility: visible; }
.detail-pop img { width: 100%; border-radius: calc(var(--radius) - 1px); }

.single-sold {
    margin: 10px 0 0; font-size: .85rem; color: var(--muted);
}
.single-note {
    margin-top: 12px; font-size: .85rem; color: var(--muted);
    max-width: 30ch; line-height: 1.5;
}

/* Arrows sit against each edge, vertically centred on the picture. */
.piece-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    font-size: 22px; line-height: 1; color: var(--muted);
    padding: 12px; transition: color .2s ease;
    text-decoration: none;
}
.piece-arrow:hover { color: var(--ink); }
.piece-arrow.prev { left: -8px; }
.piece-arrow.next { right: -8px; }

@media (max-width: 760px) {
    /* One column on a phone: no room for a counterweight. */
    .piece-stage { grid-template-columns: minmax(0, 1fr); justify-content: start; }
    .single-figure, .single-info { grid-column: 1; }
    .single-figure img { max-height: 58vh; }
    .detail-pop { right: auto; left: 0; width: min(88vw, 340px); }
    .piece-arrow.prev { left: -4px; }
    .piece-arrow.next { right: -4px; }
}

/* ------------------------------------------------------ arrange screen --- */
/* Drag-and-drop ordering. Pictures are sequenced by eye, so this shows the
   work rather than asking for a position number. */

.arrange-group { margin-bottom: 34px; }
.arrange-heading {
    font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--muted); font-weight: 500; margin: 0 0 12px;
}

.arrange-list {
    display: grid; gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    padding: 14px; min-height: 130px;
    border: 1px dashed var(--line); border-radius: var(--radius);
    background: var(--surface);
}
.arrange-list.is-empty { display: block; }

.arrange-empty {
    display: none; margin: 0; padding: 26px 0; text-align: center;
    font-size: 12.5px; color: var(--muted);
}
.arrange-list.is-empty .arrange-empty { display: block; }

.arrange-tile {
    margin: 0; cursor: grab; user-select: none;
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.arrange-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgb(0 0 0 / .4); }
.arrange-tile:active { cursor: grabbing; }
.arrange-tile.dragging { opacity: .35; transform: none; box-shadow: none; }

.arrange-tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.arrange-tile figcaption {
    padding: 7px 9px; font-size: 11.5px; line-height: 1.35; color: var(--muted);
    display: flex; justify-content: space-between; gap: 6px; align-items: baseline;
}
.arrange-hidden {
    font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase;
    color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
    padding: 1px 6px; white-space: nowrap;
}

.arrange-state { margin-left: 8px; font-size: 12px; }
.arrange-state.ok  { color: #15803d; }
.arrange-state.bad { color: #b91c1c; }

/* ------------------------------------------------------- contact form --- */

.contact-form { margin: clamp(18px, 3vh, 30px) 0 0; max-width: 100%; }
.contact-form .row { gap: 18px; }
.contact-form .check {
    display: flex; align-items: center; gap: 9px;
    margin: 4px 0 20px; color: var(--ink); font-size: 14px;
}
.contact-form .check input { width: auto; }

/* Honeypot: off-screen rather than display:none, which some bots detect. */
.hp {
    position: absolute; left: -9999px; width: 1px; height: 1px;
    overflow: hidden;
}

/* CV and page headings, bold as Eric asked. */
.prose h2 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.6em 0 .4em;
}
.prose h2:first-child { margin-top: 0; }

/* --- Home slideshow: fixed frame, uniform slides, no arrows or search ----- */
.slideshow {
    position: relative;
    /* Sized so the slideshow and the statement together fit one screen without
       scrolling - Eric asked for that on the home page and the inner pages. */
    margin: clamp(14px, 2.5vh, 28px) auto 0;
    aspect-ratio: 3 / 2;
    max-height: min(50vh, 500px);
    background: var(--mat);
    border-radius: var(--radius);
    overflow: hidden;
}
.slide {
    position: absolute; inset: 0; margin: 0;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 1s ease;
}
.slide.on { opacity: 1; }
.slide img { max-width: 100%; max-height: 100%; width: auto; object-fit: contain; }

/* Sequence dots removed at Eric's request; the timer is the only control. */
.slide-dots { display: none; }
.slide-dot {
    width: 7px; height: 7px; padding: 0; border-radius: 50%;
    border: 1px solid var(--muted); background: none; cursor: pointer;
    transition: background-color .25s ease;
}
.slide-dot.on { background: var(--ink); border-color: var(--ink); }

/* Widened by a quarter on each side at Eric's request - was 62ch. */
.statement {
    max-width: 93ch; margin: clamp(16px, 2.5vh, 30px) auto 0;
    text-align: center; font-size: 1.02rem;
}
.statement p { margin: 0 0 1em; }

/* ---------------------------------------------------------- admin tabs --- */
/* The admin lives inside the site layout, so it needs a sub-menu of its own.
   Real tabs: the selected one is white, joins the page below it and carries a
   bar on top, so there is never a question which section you are in. */

.nav-admin { color: var(--ink) !important; }
.nav-admin::before {
    content: "";
    display: inline-block;
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent);
    margin-right: 7px; vertical-align: middle;
}

.admin-tabs {
    display: flex; gap: 6px; flex-wrap: wrap;
    margin: clamp(18px, 3vh, 32px) 0 0;
    border-bottom: 1px solid var(--line);
}
.admin-tabs a {
    position: relative;
    padding: 13px 26px;
    font-size: 13.5px; letter-spacing: .03em;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    margin-bottom: -1px;
    white-space: nowrap;
    transition: color .18s ease, background-color .18s ease;
}
.admin-tabs a:hover { color: var(--ink); background: var(--bg); }

.admin-tabs a[aria-current="page"] {
    color: var(--ink);
    background: var(--bg);
    z-index: 1;
}
/* Hides the strip's own bottom rule under the selected tab. */
.admin-tabs a[aria-current="page"]::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: -1px;
    height: 2px; background: var(--bg);
}
.admin-tabs a[aria-current="page"]::before {
    content: "";
    position: absolute; left: -1px; right: -1px; top: -1px;
    height: 2px; background: var(--ink);
    border-radius: 4px 4px 0 0;
}

.admin-body { padding-top: 32px; }

@media (max-width: 760px) {
    .admin-tabs { gap: 3px; }
    .admin-tabs a { padding: 10px 14px; font-size: 12.5px; }
}
