/* dianetietjen.com - the shared look of every page: the site shell (header,
   footer), type, buttons, forms, cards, chips, alerts and motion.
   Loaded after colors.css and normalize.css. Page styles (home.css,
   shop.css, manage.css, ...) only add what is particular to them and build
   on the tokens in colors.css and the classes here:

     .dt-wrap        centered column, 1240px max
     .dt-eyebrow     small uppercase mint label above a heading
     .dt-display     the big serif heading style
     .dt-card        raised dark card
     .dt-chip        pill filter / tag (add .is-on, or aria-pressed="true")
     .dt-tag         small mint tag inside a card
     .button-link    button-looking link; .primary = green, .ghost = outline
     .dt-rise        fades and rises in on load (.dt-d1 ... .dt-d5 = delays)
*/

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* main.js measures the header and updates this; anchors scroll clear of it. */
:root { --site-header-h: 80px; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--site-header-h) + .5rem); }
body {
    background-color: var(--ink);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--text);
    letter-spacing: -0.005em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin: 1.5rem 0 .5rem; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.15; margin: 0 0 .75rem; }
h3 { font-size: 1.3rem; line-height: 1.2; margin: 0 0 .5rem; }
a { color: var(--mint); text-decoration: none; transition: color .2s; }
a:hover { color: #ffffff; }
hr { border: 0; border-top: 1px solid var(--line); }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }
::selection { background: var(--green); color: var(--ink); }

.dt-wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; box-sizing: border-box; }
.main-content { max-width: 1200px; margin: 0 auto; }
.nowrap { white-space: nowrap; }
.flex-container { display: flex; flex-wrap: wrap; }
.justify-content-center { justify-content: center; }
.justify-content-end { justify-content: flex-end; }
.dt-eyebrow {
    margin: 0 0 .9rem;
    color: var(--mint);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.dt-display { font-family: var(--font-display); font-weight: 400; line-height: 1.05; letter-spacing: -0.015em; }
.dt-display em, h1 em, h2 em { font-style: italic; color: var(--mint); }
.dt-lead { color: var(--text-2); font-size: 1.1rem; line-height: 1.65; }
.dt-muted { color: var(--muted); }

.dt-card {
    background: var(--ink-3);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

/* ---------- Header ---------- */
header {
    position: sticky;
    top: 0;
    z-index: 25;
    max-width: none;
    margin: 0;
    padding: 0;
    background: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-image: none;
}
/* The frosted glass sits on a layer behind the header, not on the header
   itself: a blur on the header would trap the phone menu (position: fixed)
   inside the header's own box instead of the whole window. */
header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(13, 17, 16, 0.72);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    pointer-events: none;
}
.logo-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.logo-container .logo a { display: flex; align-items: center; gap: 14px; }
.header-palette { width: 42px; height: 42px; margin: 0; }
.header-logo { width: auto; height: 36px; display: block; }
.logo-nav { flex: 1; width: auto; text-align: right; }
.logo-nav .flex-container { align-items: center; gap: 12px; flex-wrap: nowrap; }
nav { margin: 0; }

/* The signature writes itself in on the home page (home.js sets .dt-home). */
@keyframes dt-write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.dt-home .header-logo { animation: dt-write 1.6s .2s cubic-bezier(.5, 0, .3, 1) both; }

/* Phone menu: a panel that slides in from the right (showMenu in menu.js
   sets its width). From 770px wide the links sit in the header instead. */
nav ul { margin: 0; padding: 0; list-style: none; }
.menuBtn, .closeBtn { display: block; }
nav .menuBtn a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid var(--line-2);
    border-radius: var(--pill);
    background: transparent;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
}
/* Phone menu: covers the whole screen (showMenu in menu.js opens it). */
.navigation {
    position: fixed;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    text-align: left;
    padding: 88px 0 40px;
    background:
        radial-gradient(120% 60% at 100% 0%, rgba(58, 153, 120, .16), transparent 60%),
        var(--ink);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity .25s ease, transform .35s var(--ease), visibility 0s .35s;
}
.navigation[data-showing="true"] {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity .25s ease, transform .35s var(--ease), visibility 0s;
}
html.menu-open { overflow: hidden; }
.navigation li { border-bottom: 1px solid var(--line); margin: 0 24px; }
.navigation li:first-child { border: 0; margin: 0; }
.navigation li a {
    display: block;
    padding: 16px 4px;
    font-family: var(--font-display);
    font-size: 30px;
    line-height: 1.15;
    color: var(--text);
}
.navigation li a:hover { color: var(--mint); }
.navigation .closeBtn {
    position: absolute;
    top: 10px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line-2);
    border-radius: var(--pill);
    font-family: var(--font-body);
    font-size: 28px;
    line-height: 1;
}
.navigation li.active { background: none; border-bottom: 1px solid var(--line); padding-bottom: 0; }
.navigation li.active a { color: var(--mint) !important; }

@media screen and (min-width: 770px) {
    .menuBtn, .closeBtn { display: none !important; }
    .navigation {
        position: static;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 32px;
        width: auto !important;
        height: auto;
        overflow: visible;
        background: none;
        border: 0;
        box-shadow: none;
        padding: 0;
        visibility: visible;
        opacity: 1;
        transform: none;
        transition: none;
    }
    html.menu-open { overflow: visible; }
    .navigation > li:first-child { display: none; }
    .navigation li { margin: 0; border: 0; text-align: center; }
    .navigation li a {
        position: relative;
        padding: 10px 0;
        font-family: var(--font-body);
        font-size: 15px;
        font-weight: 500;
        line-height: 1.55;
        color: var(--text-2);
    }
    .navigation li a::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 2px;
        height: 2px;
        background: var(--mint);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform .35s var(--ease);
    }
    .navigation li a:hover { color: #ffffff; }
    .navigation li a:hover::after,
    .navigation li.active a::after { transform: scaleX(1); }
    .navigation li.active { background: none; border: 0; }
    .navigation li.active a { color: #ffffff !important; }
    .navigation li.active a::after { background: var(--green); }
    .logo-container .logo { flex: none; }
}
/* Narrow desktops: the signature keeps its room. Home goes (the signature
   is the link home) and the links sit closer. */
@media screen and (min-width: 770px) and (max-width: 980px) {
    .logo-container { padding-left: 20px; padding-right: 20px; }
    .navigation { gap: 16px; }
    .navigation > li:nth-child(2) { display: none; }
    .navigation li a { font-size: 14px; }
}

/* Shop menu (shop-menu.js builds it from the catalog). On a phone it opens
   inside the full-screen menu, under "Shop"; from 770px it drops down
   under the header, the full width of the page. */
header button.nav-menu-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 16px 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text) !important;
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 400;
    line-height: 1.15;
}
header button.nav-menu-btn:hover, header button.nav-menu-btn:focus { background: transparent; color: var(--mint) !important; }
header button.nav-menu-btn.is-active { color: var(--mint) !important; }
header button.nav-menu-btn svg { width: 22px; height: 22px; flex: none; transition: transform .3s var(--ease); }
header button.nav-menu-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.navigation .shop-menu li { margin: 0; border: 0; text-align: left; }
.navigation .shop-menu a {
    position: static;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--text-2);
}
.navigation .shop-menu a::after { content: none; }
.navigation .shop-menu a:hover { color: #ffffff; }
.shop-menu { padding: 4px 4px 24px; }
.shop-menu-inner { display: flex; flex-direction: column; gap: 24px; }
.shop-menu-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px 32px; }
.navigation .shop-menu a.shop-menu-family {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
}
.shop-menu-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--mint); flex: none; }
.shop-dot-wall-art { background: #e9e5dc; }
.shop-dot-cards { background: var(--mint); }
.shop-dot-gifts { background: var(--green); }
.shop-dot-books { background: var(--sky); }
.shop-dot-more { background: #2c769a; }
.navigation .shop-menu ul a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 15px; }
.shop-menu-count { color: var(--muted); font-size: 13px; }
.shop-menu-aside { display: flex; flex-direction: column; gap: 12px; }
.navigation .shop-menu a.shop-menu-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0;
    border-radius: var(--radius);
    background: var(--ink-3);
    overflow: hidden;
    color: var(--text);
}
.shop-menu-feature img { width: 88px; height: 88px; object-fit: cover; flex: none; }
.shop-menu-feature-text { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 12px 0; }
.shop-menu-feature-text strong { font-weight: 600; }
.shop-menu-feature-text span { color: var(--muted); font-size: 14px; }
.navigation .shop-menu a.shop-menu-all {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line-2);
    border-radius: 10px;
    color: var(--text);
    font-weight: 500;
}
.navigation .shop-menu a.shop-menu-all:hover { border-color: #5c6f69; }

/* Account menu: orders, favorites, Manage for admins, sign in/out
   (header-menus.js). A list under "Account" on a phone; a small card under
   the button from 770px. */
.account-menu { display: flex; flex-direction: column; padding: 0 4px 20px; }
.account-menu[hidden] { display: none; }
.account-menu-who { margin: 0 0 6px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.navigation .account-menu a.account-menu-link {
    position: static;
    display: block;
    padding: 10px 0;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--text-2);
}
.navigation .account-menu a.account-menu-link::after { content: none; }
.navigation .account-menu a.account-menu-link:hover { color: #ffffff; }
.navigation .account-menu a.account-menu-link[hidden] { display: none; }
.navigation .account-menu a.account-menu-sign { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--mint); }
@media screen and (min-width: 770px) {
    .navigation li.nav-account { position: relative; }
    .account-menu {
        position: absolute;
        top: calc(100% + 14px);
        right: -14px;
        width: 250px;
        padding: 8px;
        border: 1px solid var(--line-2);
        border-radius: var(--radius);
        background: var(--ink-2);
        box-shadow: 0 24px 48px rgba(0, 0, 0, .5);
        text-align: left;
        opacity: 0;
        transform: translateY(-6px);
        transition: opacity .2s ease, transform .3s var(--ease);
    }
    .account-menu.is-open { opacity: 1; transform: none; }
    .account-menu-who { margin: 0 0 4px; padding: 8px 12px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
    .navigation .account-menu a.account-menu-link { padding: 10px 12px; border-radius: var(--radius-s); font-size: 15px; }
    .navigation .account-menu a.account-menu-link:hover { background: var(--ink-4); }
    .navigation .account-menu a.account-menu-sign { margin-top: 4px; padding-top: 10px; border-top: 0; }
}
@media screen and (min-width: 770px) {
    header button.nav-menu-btn {
        display: inline-flex;
        width: auto;
        padding: 10px 0;
        font-family: var(--font-body);
        font-size: 15px;
        font-weight: 500;
        line-height: 1.55;
        color: var(--text-2) !important;
    }
    header button.nav-menu-btn svg { width: 14px; height: 14px; }
    header button.nav-menu-btn:hover,
    header button.nav-menu-btn:focus-visible,
    header button.nav-menu-btn[aria-expanded="true"],
    header button.nav-menu-btn.is-active { color: #ffffff !important; }
    header button.nav-menu-btn:focus:not(:focus-visible) { color: var(--text-2) !important; }
    header button.nav-menu-btn.is-active::after,
    header button.nav-menu-btn[aria-expanded="true"]::after {
        content: "";
        position: absolute;
        left: 0;
        right: 20px;
        bottom: 2px;
        height: 2px;
        background: var(--green);
    }
    .shop-menu {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        padding: 0;
        background: var(--ink-2);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity .25s ease, transform .35s var(--ease);
    }
    .shop-menu.is-open { opacity: 1; transform: none; }
    .shop-menu-inner { flex-direction: row; gap: 48px; max-width: 1240px; margin: 0 auto; padding: 36px 32px 40px; }
    .shop-menu-cols { flex: 1 1 auto; min-width: 0; align-content: start; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
    .shop-menu-aside { flex: 0 0 300px; }
    .navigation .shop-menu a.shop-menu-feature { flex-direction: column; align-items: stretch; gap: 0; }
    .shop-menu-feature img { width: 100%; height: 140px; }
    .shop-menu-feature-text { padding: 14px 16px 16px; }
}
@media screen and (min-width: 770px) and (max-width: 980px) {
    header button.nav-menu-btn { font-size: 14px; }
}

/* Search: an icon in the header that opens a field under it (menu.js). */
.header-search-wrap { display: flex; }
header button.header-search-btn {
    width: 44px;
    min-height: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--pill);
    background: transparent;
    color: var(--text) !important;
}
header button.header-search-btn:hover,
header button.header-search-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.06); color: var(--mint) !important; }
header button.header-search-btn:focus:not(:focus-visible) { background: transparent; }
.site-search {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: rgba(13, 17, 16, 0.94);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .35s var(--ease);
}
.site-search.is-open { opacity: 1; transform: none; }
.site-search-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 760px;
    margin: 0 auto;
    padding: 16px 32px;
}
.site-search-icon { position: absolute; left: 52px; color: var(--muted); pointer-events: none; }
#site-search input[type=search] {
    flex: 1;
    min-width: 0;
    height: 50px;
    margin: 0;
    padding: 0 18px 0 48px;
    border: 1px solid var(--line-2);
    border-radius: var(--pill);
    background: var(--ink-2);
    color: var(--text);
    font-size: 16px;
}
.site-search button.primary { flex: none; min-height: 50px; padding: 0 24px; }
.site-search-go-arrow { display: none; font-size: 20px; line-height: 1; }
/* Phones: the field gets the room; Search becomes a round arrow button
   (the word stays for screen readers). */
@media screen and (max-width: 480px) {
    .site-search button.site-search-go { width: 50px; padding: 0; }
    .site-search-go-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .site-search-go-arrow { display: block; }
}
header button.site-search-close {
    width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted) !important;
    font-size: 28px;
    line-height: 1;
}
header button.site-search-close:hover { background: rgba(255, 255, 255, 0.06); color: #ffffff !important; }

/* Cart */
.header-cart-wrap { display: flex; }
.header-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--pill);
    color: var(--text);
}
.header-cart:hover { color: var(--mint); background: rgba(255, 255, 255, 0.05); }
.header-cart svg { width: 22px; height: 22px; }
.header-cart .cart-count {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--red);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

@media screen and (max-width: 760px) {
    .dt-wrap { padding: 0 16px; }
    .logo-container { padding: 10px 16px; gap: 12px; }
    .header-palette { width: 34px; height: 34px; }
    .header-logo { height: 28px; }
}
/* Phones: keep the signature whole and clear of the Menu button. */
@media screen and (max-width: 420px) {
    .logo-container .logo { flex: none; }
    .logo-container .logo a { gap: 10px; }
    .logo-nav { min-width: 0; }
    .logo-nav .flex-container { gap: 4px; }
    .header-logo { height: 24px; }
    /* Room for the search icon: the menu button shows only its icon. */
    nav .menuBtn a { width: 44px; padding: 0; justify-content: center; }
    nav .menuBtn .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .site-search-inner { padding: 12px 16px; gap: 6px; }
    .site-search-icon { left: 30px; }
    .site-search button.primary { padding: 0 16px; }
}
@media screen and (max-width: 360px) {
    .header-logo { display: none; }
}

/* ---------- Footer ----------
   At the end of every page (no longer pinned to the window). The body is a
   column so a short page still puts the footer at the bottom of the window. */
:root { --site-footer-h: 0px; }
body { min-height: 100vh; display: flex; flex-direction: column; padding-bottom: 0; }
body > main { flex: 1 0 auto; }
footer.site-footer {
    position: static;
    margin-top: 96px;
    padding: 0;
    background: var(--ink-deep);
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
    text-align: left;
}
.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr);
    gap: 48px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 64px 32px 48px;
    box-sizing: border-box;
}
.footer-signature { display: block; width: auto; height: 46px; opacity: .92; transition: opacity .2s; }
.footer-signature-link { display: inline-block; }
.footer-signature-link:hover .footer-signature { opacity: 1; }
.footer-brand p { max-width: 34ch; margin: 20px 0 0; color: var(--muted); }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-col h2 {
    margin: 0 0 14px;
    color: var(--mint);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li { margin: 0; }
.footer-col a { display: inline-block; padding: 6px 0; color: var(--text-2); }
footer.site-footer a:hover { color: var(--mint); }
.footer-base {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 32px 28px;
    border-top: 1px solid var(--line);
    box-sizing: border-box;
    font-size: 13px;
}
.footer-top { color: var(--text-2); }
@media screen and (max-width: 860px) {
    .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 48px 20px 32px; }
    .footer-base { padding: 18px 20px 24px; }
}
@media screen and (max-width: 520px) {
    footer.site-footer { margin-top: 64px; }
    .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
    .footer-col a { padding: 9px 0; }
}

/* ---------- Buttons ---------- */
input[type=button], input[type=submit], input[type=reset], button:not(.logout), .button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 22px;
    margin: 0;
    border: 1px solid var(--line-2);
    border-radius: var(--pill);
    background: var(--ink-3);
    color: var(--text) !important;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .25s var(--ease), box-shadow .25s;
}
.button-link { width: fit-content; text-align: center; }
input[type=button]:hover, input[type=submit]:hover, input[type=reset]:hover, button:hover:not(.logout), .button-link:hover {
    background: var(--ink-4);
    border-color: #5c6f69;
    color: #ffffff !important;
}
input[type=button]:focus, input[type=submit]:focus, input[type=reset]:focus, button:focus:not(.logout), .button-link:focus {
    background: var(--ink-3);
    color: var(--text);
    outline: none;
}
input[type=button]:focus-visible, input[type=submit]:focus-visible, input[type=reset]:focus-visible, button:focus-visible:not(.logout), .button-link:focus-visible {
    outline: 2px solid var(--sky);
    outline-offset: 3px;
}
.button-link.primary, button.primary, input[type=submit].primary {
    background: var(--green);
    border-color: var(--green);
    color: var(--ink) !important;
    font-weight: 600;
}
.button-link.primary:hover, button.primary:hover, input[type=submit].primary:hover {
    background: #45ad88;
    border-color: #45ad88;
    color: var(--ink) !important;
    box-shadow: 0 10px 30px rgba(58, 153, 120, 0.4);
    transform: translateY(-2px);
}
.button-link.primary:focus, button.primary:focus { background: var(--green); color: var(--ink) !important; }
.button-link.ghost, button.ghost { background: transparent; }
button.cancel, .button-link.cancel, input[type=button].cancel, input[type=submit].cancel, input[type=reset].cancel {
    background: transparent;
    color: var(--text-2) !important;
}
button:disabled, input[type=submit]:disabled, input[type=button]:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---------- Forms ---------- */
label { display: block; color: var(--text-2); font-size: 14px; font-weight: 500; }
input:not([type=submit]):not([type=button]):not([type=reset]):not([type=file]):not([type=color]):not([type=checkbox]):not([type=radio]):not([type=range]),
textarea, select {
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--line-2) !important;
    border-radius: 10px;
    background: var(--ink) !important;
    color: var(--text) !important;
    font-family: var(--font-body);
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 96px; line-height: 1.5; }
input:not([type=submit]):not([type=button]):not([type=reset]):not([type=file]):not([type=color]):not([type=checkbox]):not([type=radio]):not([type=range]):focus,
textarea:focus, select:focus {
    outline: none;
    border-color: var(--sky) !important;
    box-shadow: 0 0 0 3px rgba(146, 207, 238, 0.2);
}
input::placeholder, textarea::placeholder { color: #7f8b87 !important; opacity: 1; font-size: inherit; }
/* Fields stay neutral until someone has typed in them and left them wrong. */
input:user-invalid, textarea:user-invalid, select:user-invalid {
    border-color: var(--required-color) !important;
}
input[type=checkbox], input[type=radio] { accent-color: var(--green); width: 18px; height: 18px; }
input[type=checkbox] { margin: 0 10px; }
select option { background: var(--ink-2); color: var(--text); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
legend { background: none; padding: 0 .5rem; color: var(--text); font-weight: 600; font-size: 15px; }

/* ---------- Chips and tags ---------- */
.dt-chip, a.medium-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--line-2);
    border-radius: var(--pill);
    background: transparent;
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    transition: background .2s, color .2s, border-color .2s;
}
.dt-chip:hover, a.medium-filter:hover { border-color: #5c6f69; color: #ffffff; border-bottom: 1px solid #5c6f69; }
.dt-chip.is-on, .dt-chip[aria-pressed="true"], a.medium-filter.medium-selected {
    background: var(--text);
    border-color: var(--text);
    color: var(--ink);
}
.dt-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--pill);
    background: var(--green-deep);
    color: var(--mint);
    font-size: 12px;
    font-weight: 500;
}
/* A tag that is a link: same look, bigger tap area. */
a.dt-tag { position: relative; transition: background .2s, color .2s; }
a.dt-tag::after { content: ""; position: absolute; inset: -8px -3px; }
a.dt-tag:hover { background: var(--green); color: var(--ink); }

/* ---------- Breadcrumb, messages, alerts ---------- */
.breadcrumb { color: var(--muted); font-size: 14px; padding: .75rem 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: #ffffff; }
.breadcrumb-current, a.breadcrumb-current { color: var(--text); font-weight: 500; }
.messages, .alert { border-radius: var(--radius-s); border-width: 1px; border-style: solid; }
.search-keywords { color: var(--muted); }
.search-keywords span { color: var(--mint); }
.no-results { color: var(--text-2); }
.price, .subtotal { color: var(--text); font-weight: 600; }

/* ---------- Painting cards (gallery, search, home) ---------- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 28px 22px;
    justify-content: stretch;
}
.gallery > a { margin: 0; display: block; color: var(--text); }
.gallery a:hover { color: var(--text); }
.art-thumb, .gallery-thumb, .product-thumb {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    border-radius: var(--radius);
    background: transparent;
    box-shadow: none;
    text-align: left;
    transition: transform .45s var(--ease);
}
.gallery .art-thumb, .gallery .gallery-thumb, .product-thumb { background: transparent; }
.art-thumb:hover, .gallery-thumb:hover, .product-thumb:hover { transform: translateY(-6px); background: transparent; }
/* The painting sits whole on a dark wall, the way it would hang. */
.art-thumb img, .gallery-thumb img {
    display: block;
    width: 100%;
    height: 240px;
    max-height: none;
    padding: 18px;
    box-sizing: border-box;
    object-fit: contain;
    object-position: center;
    border: 0;
    border-radius: var(--radius);
    background: var(--ink-2);
    box-shadow: none;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45));
    transition: background .35s, padding .45s var(--ease);
}
.art-thumb:hover img, .gallery-thumb:hover img { background: var(--ink-4); padding: 12px; }
/* Thumbnails stay hidden until their picture arrives (artworkgallery.js). */
.lazy-image { transition: opacity .3s ease-in-out; }
.lazy-image:not(.loaded) { opacity: 0; }
.art-desc, .gallery-desc, .product-desc {
    margin: 12px 2px 0;
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 18px;
    line-height: 1.25;
    text-align: left;
}
.art-thumb:hover .art-desc, .gallery-thumb:hover .gallery-desc, .product-thumb:hover .product-desc { background: none; color: var(--mint); }
.gallery-thumb { width: auto; height: auto; }
.gallery-thumb img { height: 200px; object-fit: cover; padding: 0; filter: none; }
.gallery-thumb:hover img { padding: 0; }
@media screen and (max-width: 580px) {
    .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
    .art-thumb img { height: 170px; padding: 12px; }
    .art-desc { font-size: 16px; }
}

/* Section headings inside a gallery list */
.gallery-section-header h2 {
    display: block;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text);
    font-size: 28px;
    font-weight: 600;
    text-align: left;
}

/* ---------- Loading ----------
   Placeholders shaped like the page (built by DtSkeleton in main.js), a
   spinner on any button marked aria-busy="true", and a notice when the
   server is slow to answer (DtWait in main.js). */
.dt-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
@keyframes dt-shimmer { from { background-position: 120% 0; } to { background-position: -20% 0; } }
@keyframes dt-spin { to { transform: rotate(360deg); } }
.dt-skel {
    display: block;
    border-radius: var(--radius-s);
    background: linear-gradient(100deg, var(--ink-3) 30%, #2c3834 50%, var(--ink-3) 70%) 0 0 / 300% 100%;
    animation: dt-shimmer 1.6s ease-in-out infinite;
}
.dt-skel-line { height: 14px; margin: 0 0 12px; }
.dt-skel-title { height: 44px; max-width: 520px; margin: 0 0 18px; }
.dt-skel-eyebrow { width: 140px; height: 12px; margin: 0 0 18px; }
.dt-skel-pill { width: 160px; height: 48px; border-radius: var(--pill); }
.dt-skel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px; list-style: none; margin: 0; padding: 0; }
.dt-skel-card .dt-skel:first-child { aspect-ratio: 1 / 1; border-radius: var(--radius); }
.dt-skel-card .dt-skel-line { width: 60%; margin-top: 14px; }
.dt-skel-grid.is-collections .dt-skel-card .dt-skel:first-child { aspect-ratio: 4 / 3; }
.dt-skel-rows { display: grid; gap: 10px; }
.dt-skel-row { height: 64px; border-radius: var(--radius); }
/* A "Loading ..." line with shimmering list rows under it (admin lists). */
.dt-loading-rows::after {
    content: "";
    display: block;
    height: 296px;
    margin-top: 16px;
    background: linear-gradient(100deg, var(--ink-3) 30%, #2c3834 50%, var(--ink-3) 70%) 0 0 / 300% 100%;
    -webkit-mask: repeating-linear-gradient(#000 0 64px, transparent 64px 74px);
    mask: repeating-linear-gradient(#000 0 64px, transparent 64px 74px);
    animation: dt-shimmer 1.6s ease-in-out infinite;
}
.dt-skel-detail { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; margin-top: 28px; }
.dt-skel-detail .dt-skel-wall { min-height: 520px; border-radius: var(--radius-l); }
@media screen and (max-width: 860px) {
    .dt-skel-detail { grid-template-columns: minmax(0, 1fr); }
    .dt-skel-detail .dt-skel-wall { min-height: 340px; }
}

/* A button waiting on the server: a small spinner before its label. */
button[aria-busy="true"], .button-link[aria-busy="true"] { cursor: progress; }
button[aria-busy="true"]::before, .button-link[aria-busy="true"]::before {
    content: "";
    flex: none;
    width: 15px;
    height: 15px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: dt-spin .75s linear infinite;
}

/* "Still working...": shown when a request takes more than a few seconds. */
.dt-wait-note {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 70;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: min(92vw, 520px);
    padding: 14px 20px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    background: rgba(18, 24, 22, 0.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-l);
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.45;
    opacity: 0;
    transform: translate(-50%, 16px);
    transition: opacity .3s ease, transform .4s var(--ease);
    pointer-events: none;
}
.dt-wait-note.is-shown { opacity: 1; transform: translate(-50%, 0); }
.dt-wait-note strong { color: var(--text); font-weight: 600; }
.dt-wait-spinner {
    flex: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--green);
    border-right-color: transparent;
    border-radius: 50%;
    animation: dt-spin .8s linear infinite;
}

/* Loading more paintings: three soft dots. */
@keyframes dt-dot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: none; } }
.dt-dots { display: inline-flex; gap: 6px; }
.dt-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); animation: dt-dot 1.2s ease-in-out infinite; }
.dt-dots span:nth-child(2) { animation-delay: .15s; }
.dt-dots span:nth-child(3) { animation-delay: .3s; }
.content-loading-wrapper { position: relative; }
.loading-more { padding: 2rem; color: var(--muted); text-align: center; }

/* ---------- Motion ---------- */
@keyframes dt-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes dt-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes dt-bloom-a { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(80px, -50px) scale(1.18); } }
@keyframes dt-bloom-b { 0%, 100% { transform: translate(0, 0) scale(1.1); } 50% { transform: translate(-70px, 60px) scale(.92); } }
@keyframes dt-sheen { from { transform: translateX(-150%) skewX(-20deg); } to { transform: translateX(350%) skewX(-20deg); } }
@keyframes dt-marquee { to { transform: translateX(-50%); } }
@keyframes dt-draw { to { stroke-dashoffset: 0; } }

.dt-rise { animation: dt-rise .9s var(--ease) both; }
.dt-d1 { animation-delay: .08s; } .dt-d2 { animation-delay: .2s; } .dt-d3 { animation-delay: .34s; }
.dt-d4 { animation-delay: .5s; } .dt-d5 { animation-delay: .7s; }
.dt-float { animation: dt-float 5s ease-in-out infinite; }

/* Soft paint-color blooms behind a section: put .dt-blooms (with three
   empty <span>s) first inside a position:relative parent. */
.dt-blooms { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.dt-blooms span { position: absolute; border-radius: 50%; }
.dt-blooms span:nth-child(1) { width: 620px; height: 620px; left: 52%; top: -140px; background: var(--blue); filter: blur(110px); opacity: .38; animation: dt-bloom-a 18s ease-in-out infinite; }
.dt-blooms span:nth-child(2) { width: 520px; height: 520px; left: 26%; top: 260px; background: var(--green); filter: blur(120px); opacity: .28; animation: dt-bloom-b 22s ease-in-out infinite; }
.dt-blooms span:nth-child(3) { width: 260px; height: 260px; left: 82%; top: 380px; background: var(--mint); filter: blur(90px); opacity: .15; animation: dt-bloom-a 26s ease-in-out infinite; }

/* A light streak across a card on hover: add <span class="dt-sheen"> inside a position:relative, overflow:hidden card with .dt-sheen-host. */
.dt-sheen { position: absolute; top: 0; bottom: 0; left: 0; width: 30%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent); transform: translateX(-150%) skewX(-20deg); pointer-events: none; }
.dt-sheen-host:hover .dt-sheen { animation: dt-sheen .9s ease; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0s !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
