/* ==========================================================================
   Sugilanon Brews — public site
   Palette: espresso #3E2C23 · coffee #6F4E37 · caramel #C08552 · cream #F5EDE3
   Type: Georgia throughout. Pattern: hablon-inspired warp/weft stripes.
   ========================================================================== */

:root {
    --espresso: #3E2C23;
    --coffee: #6F4E37;
    --caramel: #C08552;
    --caramel-dark: #9E6A3E;
    --cream: #F5EDE3;
    --paper: #FBF7F1;
    --white: #FFFDF9;
    --sand: #E4D6C6;
    --line: rgba(62, 44, 35, .14);
    --forest: #2F4A3A;
    --rust: #8C3B2E;
    --muted: #7A6556;
    --serif: Georgia, "Times New Roman", serif;
    --radius: 2px;
    --wrap: 1180px;
    --narrow: 700px;
    --shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(62, 44, 35, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--espresso);
    font-family: var(--serif);
    font-size: 18px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--caramel); text-underline-offset: 3px; }
a:hover { color: var(--caramel-dark); }
:focus-visible { outline: 3px solid var(--caramel); outline-offset: 2px; }
h1, h2, h3, h4 { font-weight: normal; line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
code { font-size: .85em; background: var(--cream); padding: .1em .35em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.wrap--narrow { max-width: calc(var(--narrow) + 64px); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--espresso); color: var(--cream); padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; }
.small { font-size: .85rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---- Hablon band ------------------------------------------------------- */
.hablon-band {
    height: 10px;
    background:
        repeating-linear-gradient(90deg,
            var(--espresso) 0 22px, var(--caramel) 22px 30px, var(--coffee) 30px 52px,
            var(--cream) 52px 56px, var(--rust) 56px 64px, var(--espresso) 64px 70px,
            var(--caramel) 70px 92px, var(--cream) 92px 95px);
    position: relative;
}
.hablon-band::after {
    content: ""; position: absolute; inset: 0;
    background: repeating-linear-gradient(0deg, rgba(255,255,255,.18) 0 2px, transparent 2px 4px);
}
.hablon-band--thin { height: 6px; }

/* ---- Labels, badges, buttons ------------------------------------------- */
.label {
    font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
    color: var(--coffee); margin: 0 0 .6em; display: block;
}
.label a { text-decoration: none; }
.label a:hover { text-decoration: underline; }
.label--light { color: var(--sand); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4em;
    font-family: var(--serif); font-size: 1rem; line-height: 1.2;
    padding: .8em 1.4em; border: 1px solid var(--espresso); border-radius: var(--radius);
    background: var(--espresso); color: var(--cream); text-decoration: none; cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--caramel-dark); border-color: var(--caramel-dark); color: var(--white); }
.btn--ghost { background: transparent; color: var(--espresso); }
.btn--ghost:hover { background: var(--espresso); color: var(--cream); }
.btn--light { background: var(--cream); color: var(--espresso); border-color: var(--cream); }
.btn--danger { background: var(--rust); border-color: var(--rust); }
.btn--small { font-size: .85rem; padding: .5em .95em; }
.btn--block { width: 100%; }
.link-button { background: none; border: 0; padding: 0; color: var(--coffee); text-decoration: underline; cursor: pointer; font-family: var(--serif); }
.link-arrow { text-decoration: none; font-style: italic; }
.link-arrow::after { content: " →"; }

.badge {
    display: inline-block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
    padding: .2em .6em; border: 1px solid currentColor; border-radius: 99px; vertical-align: middle;
}
.badge--active, .badge--paid, .badge--approved, .badge--published, .badge--resolved, .badge--free { color: var(--forest); }
.badge--cancelled, .badge--pending, .badge--past_due, .badge--open, .badge--draft, .badge--review { color: var(--caramel-dark); }
.badge--expired, .badge--failed, .badge--rejected, .badge--auto_rejected, .badge--retired { color: var(--rust); }

.ai-tag { font-size: .72rem; letter-spacing: .08em; color: var(--muted); margin: -.4em 0 .8em; }
.ai-tag a { text-decoration: none; border-bottom: 1px dotted var(--muted); }
.ai-tag::before { content: "✦ "; color: var(--caramel); }

.flash { padding: .8em 1em; border-left: 4px solid var(--forest); background: var(--white); margin: 16px 0; }
.flash--err { border-color: var(--rust); }
.flash--info { border-color: var(--caramel); }
.notice { background: var(--cream); padding: 1em 1.2em; margin: 0 0 24px; }
.notice--sandbox { border: 1px dashed var(--caramel); background: transparent; margin-top: 24px; }

/* ---- Header ------------------------------------------------------------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; flex-wrap: wrap; }
.masthead { display: flex; flex-direction: column; text-decoration: none; line-height: 1; padding: 10px 0; }
.masthead__kicker { font-size: .68rem; letter-spacing: .32em; text-transform: uppercase; color: var(--coffee); }
.masthead__name { font-size: 2rem; font-style: italic; letter-spacing: -.01em; }
.site-nav { display: flex; gap: 22px; align-items: center; }
.site-nav a { text-decoration: none; font-size: .95rem; }
.site-nav a:not(.btn):hover { text-decoration: underline; }
.nav-toggle { display: none; font-family: var(--serif); background: none; border: 1px solid var(--line); padding: .4em .8em; }
@media (max-width: 760px) {
    .nav-toggle { display: inline-block; }
    .site-nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; padding: 0 0 16px; gap: 12px; }
    .site-nav.is-open { display: flex; }
}

/* ---- Hero ----------------------------------------------------------------- */
.hero { display: grid; gap: 40px; padding-top: 48px; padding-bottom: 24px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 5fr 7fr; padding-top: 72px; } }
.hero__title { font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: -.02em; font-style: italic; }
.hero__lede { font-size: 1.2rem; color: var(--coffee); max-width: 32em; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* ---- Sections ------------------------------------------------------------ */
.section { padding-top: 48px; padding-bottom: 48px; }
.section--tight { padding-top: 8px; }
.section__head { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--espresso); padding-top: 12px; margin-bottom: 28px; }
.section__title { font-size: 1.5rem; margin: 0; }
.page-head { padding-top: 48px; padding-bottom: 24px; }
.page-head--center { text-align: center; }
.page-head--center .page-lede { margin-left: auto; margin-right: auto; }
.page-title { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.015em; }
.page-title--small { font-size: 2rem; }
.page-lede { font-size: 1.15rem; color: var(--coffee); max-width: 38em; }
.empty { padding: 48px 0; color: var(--muted); font-style: italic; }

/* ---- Cards --------------------------------------------------------------- */
.grid { display: grid; gap: 40px 32px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { display: flex; flex-direction: column; }
.card__media { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--cream); margin-bottom: 16px; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card__media img { transform: scale(1.03); }
.card__flag { position: absolute; left: 12px; top: 12px; background: var(--cream); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; padding: .3em .7em; }
.card__title { font-size: 1.45rem; margin-bottom: .4em; }
.card__title a { text-decoration: none; }
.card__title a:hover { text-decoration: underline; }
.card__summary { color: #4d3a2f; font-size: 1rem; }
.card__meta { color: var(--muted); margin-top: auto; }
.card__meta a { color: var(--muted); }
.card--large .card__title { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.card--large .card__summary { font-size: 1.1rem; }

/* ---- Filters ------------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-top: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { text-decoration: none; border: 1px solid var(--line); padding: .35em .9em; border-radius: 99px; font-size: .9rem; background: var(--white); }
.chip.is-active, .chip:hover { background: var(--espresso); color: var(--cream); border-color: var(--espresso); }
.search { display: flex; gap: 8px; }
.search input { font-family: var(--serif); font-size: .95rem; padding: .5em .8em; border: 1px solid var(--line); background: var(--white); min-width: 0; width: 220px; }

.pagination { list-style: none; padding: 0; margin: 48px 0 0; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pagination a { display: block; padding: .4em .85em; border: 1px solid var(--line); text-decoration: none; background: var(--white); }
.pagination a.is-active { background: var(--espresso); color: var(--cream); }

/* ---- Issue band / tiles --------------------------------------------------- */
.issue-band { background: var(--espresso); color: var(--cream); margin: 32px 0; }
.issue-band a:not(.btn) { color: var(--cream); }
.issue-band__inner { display: grid; gap: 32px; padding-top: 56px; padding-bottom: 56px; align-items: center; }
@media (min-width: 760px) { .issue-band__inner { grid-template-columns: 1fr 2fr; } }
.issue-band__cover img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; max-width: 320px; box-shadow: 0 30px 50px -20px rgba(0,0,0,.6); }
.issue-band__title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-style: italic; }
.issue-band__title span { font-style: normal; font-size: .6em; color: var(--sand); }

.issue-list { display: grid; gap: 32px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.issue-tile { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.issue-tile img { aspect-ratio: 3 / 4; object-fit: cover; margin-bottom: 10px; box-shadow: var(--shadow); }
.issue-tile__num { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--coffee); }
.issue-tile__title { font-size: 1.5rem; font-style: italic; }
.issue-tile__en { color: var(--coffee); }

.issue-hero { background: var(--espresso); color: var(--cream); }
.issue-hero a { color: var(--sand); }
.issue-hero .page-lede { color: var(--sand); }
.issue-hero__inner { display: grid; gap: 32px; padding-top: 56px; padding-bottom: 56px; align-items: center; }
@media (min-width: 760px) { .issue-hero__inner { grid-template-columns: 2fr 1fr; } }
.issue-hero__en { font-style: italic; font-size: 1.3rem; margin-top: -.4em; }
.issue-hero__cover { aspect-ratio: 3 / 4; object-fit: cover; max-width: 300px; justify-self: end; }

.toc { list-style: none; padding: 0; margin: 0; max-width: 820px; }
.toc__item { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.toc__num { font-size: 2rem; font-style: italic; color: var(--caramel); line-height: 1; }
.toc__title { font-size: 1.6rem; }
.toc__title a { text-decoration: none; }

/* ---- Story page --------------------------------------------------------- */
.story__head { padding-top: 56px; text-align: left; }
.story__title { font-size: clamp(2.3rem, 6vw, 3.8rem); letter-spacing: -.02em; }
.story__dek { font-size: 1.3rem; font-style: italic; color: var(--coffee); }
.story__byline { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-end; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; margin-top: 24px; }
.story__byline p { margin: 0; }
.story__tools { display: flex; gap: 8px; }
.story__cover { margin: 32px auto; }
.story__cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.story__cover figcaption { margin-top: 8px; }
.story__credits { border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); font-style: italic; }

.article-body { font-size: 1.15rem; line-height: 1.75; }
.article-body > p:first-of-type::first-letter {
    float: left; font-size: 4.4em; line-height: .82; padding: .06em .1em 0 0; color: var(--caramel-dark); font-style: italic;
}
.article-body h2 { font-size: 1.6rem; margin-top: 1.8em; font-style: italic; }
.article-body h3 { font-size: 1.3rem; margin-top: 1.5em; }
.article-body blockquote, .article-body .pull-quote { margin: 1.6em 0; padding: 0 0 0 1.2em; border-left: 3px solid var(--caramel); font-size: 1.3rem; font-style: italic; }
.article-body .hil { font-style: italic; color: var(--coffee); }
.article-body .editors-note { border: 1px solid var(--caramel); background: var(--cream); padding: 1em 1.2em; margin: 0 0 2em; font-size: 1rem; }
.article-body .editors-note p { margin: 0; }
.article-body figure { margin: 1.8em 0; padding: 1em 1.2em; background: var(--cream); }
.article-body figcaption { font-size: 1rem; }
.article-body ::selection { background: var(--sand); }
.print-licence { display: none; }

.preview { background: var(--cream); padding: 28px 28px 12px; margin: 8px 0 0; border-top: 3px solid var(--caramel); }
.preview__text { font-size: 1.25rem; line-height: 1.6; font-style: italic; }
.paywall { background: var(--white); box-shadow: var(--shadow); padding: 0 28px 28px; margin: 32px 0 56px; text-align: center; }
.paywall .hablon-band { margin: 0 -28px 24px; }
.paywall h2 { font-size: 1.8rem; font-style: italic; }
.paywall__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- Plans ---------------------------------------------------------------- */
.plans { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); max-width: 820px; margin: 0 auto; }
.plan { position: relative; background: var(--white); padding: 32px; box-shadow: var(--shadow); border-top: 4px solid var(--coffee); }
.plan--best { border-top-color: var(--caramel); }
.plan__flag { position: absolute; top: -14px; right: 20px; background: var(--caramel); color: var(--white); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; padding: .35em .8em; }
.plan__name { font-size: 1.6rem; font-style: italic; }
.plan__price { font-size: 2.4rem; margin: 0; }
.plan__price span { font-size: 1rem; color: var(--muted); }
.plan__desc { color: var(--coffee); min-height: 3em; }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 16px; }
.check input { margin-top: .35em; accent-color: var(--espresso); }
.faq { max-width: 820px; margin: 48px auto 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-size: 1.1rem; }

.promise { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-top: 1px solid var(--line); }
.promise h3 { font-size: 1.2rem; font-style: italic; }

/* ---- Forms / auth / account --------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 6px; }
.form .label { margin: 10px 0 2px; }
input:not([type]), input[type=tel], input[type=email], input[type=text], input[type=password], input[type=number], input[type=datetime-local], input[type=date], input[type=url], input[type=search], select, textarea {
    font-family: var(--serif); font-size: 1rem; padding: .65em .8em; border: 1px solid #cdbba8; border-radius: var(--radius);
    background: var(--white); color: var(--espresso); width: 100%;
}
textarea { line-height: 1.5; }
.auth-wrap { padding-top: 48px; padding-bottom: 72px; }
.auth-card { max-width: 440px; margin: 0 auto; background: var(--white); padding: 32px; box-shadow: var(--shadow); }
.auth-card .btn--block { margin-top: 12px; }
/* Shield's own views (magic link, 2FA) use Bootstrap class names — give them a basic look. */
.auth-wrap .card { max-width: 440px; margin: 0 auto; background: var(--white); padding: 32px; box-shadow: var(--shadow); }
.auth-wrap .form-control { font-family: var(--serif); padding: .65em .8em; border: 1px solid #cdbba8; width: 100%; margin-bottom: 12px; }
.auth-wrap .btn-primary { background: var(--espresso); color: var(--cream); border: 0; padding: .8em 1.4em; font-family: var(--serif); cursor: pointer; }
.auth-wrap .alert { padding: .8em 1em; background: var(--cream); margin-bottom: 12px; }

.account { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.panel { background: var(--white); padding: 24px 28px; box-shadow: var(--shadow); }
.panel__title { font-size: 1.35rem; font-style: italic; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.plain-list { list-style: none; padding: 0; margin: 0 0 12px; }
.plain-list li { padding: 6px 0; border-bottom: 1px dotted var(--line); }

.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: left; font-weight: normal; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--coffee); border-bottom: 1px solid var(--espresso); padding: 8px 10px; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table--compact td, .table--compact th { padding: 6px 4px; }

.sandbox { background: var(--white); padding: 32px; box-shadow: var(--shadow); border: 2px dashed var(--caramel); }
.methods { border: 0; padding: 0; margin: 16px 0; display: flex; gap: 10px; flex-wrap: wrap; }
.method { border: 1px solid var(--line); padding: .5em 1em; cursor: pointer; }
.sandbox__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.prose h2 { font-size: 1.5rem; margin-top: 1.6em; font-style: italic; }
.prose li { margin-bottom: .5em; }

/* ---- Dialog / toast ------------------------------------------------------ */
.dialog { border: 0; padding: 28px; max-width: 560px; width: calc(100% - 32px); background: var(--white); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.dialog::backdrop { background: rgba(62, 44, 35, .5); }
.dialog textarea { margin-bottom: 8px; font-size: .9rem; }
.dialog__actions { display: flex; gap: 8px; margin: 12px 0 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--espresso); color: var(--cream); padding: .8em 1.2em; max-width: calc(100% - 32px); font-size: .95rem; z-index: 20; box-shadow: 0 10px 30px rgba(0,0,0,.3); }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { background: var(--espresso); color: var(--cream); margin-top: 64px; }
.site-footer a { color: var(--cream); text-decoration: none; display: block; padding: 3px 0; }
.site-footer a:hover { text-decoration: underline; color: var(--white); }
.site-footer .muted { color: var(--sand); }
.site-footer .muted a { display: inline; text-decoration: underline; }
.site-footer .label { color: var(--caramel); }
.site-footer__grid { display: grid; gap: 32px; padding-top: 48px; padding-bottom: 32px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer__name { font-size: 1.6rem; margin: 0; }
.site-footer__tag { font-style: italic; color: var(--caramel); }
.site-footer__base { border-top: 1px solid rgba(245, 237, 227, .15); padding-top: 16px; padding-bottom: 24px; }

/* ---- Print: readers may print for personal use; licence line is added. ---- */
@media print {
    .site-header, .site-footer, .hablon-band, .story__tools, .section, .paywall, .skip-link, .toast { display: none !important; }
    body { background: #fff; font-size: 12pt; }
    .print-licence { display: block; border-top: 1px solid #000; margin-top: 2em; padding-top: .5em; font-size: 9pt; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ==========================================================================
   Admin area
   ========================================================================== */
.admin { display: grid; gap: 32px; padding-top: 32px; padding-bottom: 48px; }
@media (min-width: 900px) { .admin { grid-template-columns: 210px 1fr; } }
.admin__nav { display: flex; flex-direction: column; gap: 2px; align-self: start; position: sticky; top: 96px; }
.admin__nav a { text-decoration: none; padding: 7px 10px; border-left: 3px solid transparent; font-size: .95rem; }
.admin__nav a:hover { background: var(--cream); }
.admin__nav a.is-active { border-left-color: var(--caramel); background: var(--white); }
.admin__nav .count { background: var(--caramel); color: var(--white); border-radius: 99px; font-size: .7rem; padding: 0 .5em; margin-left: 4px; }
@media (max-width: 899px) { .admin__nav { position: static; flex-direction: row; flex-wrap: wrap; } .admin__nav .label { width: 100%; } }
.admin__main { min-width: 0; overflow-x: auto; }
.admin__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.admin__head .page-title { margin: 0; }
.admin__h2 { font-size: 1.3rem; font-style: italic; margin-top: 40px; border-top: 1px solid var(--line); padding-top: 16px; }
.admin .chips { margin: 0 0 16px; }
.admin .table form { display: inline; }
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-bottom: 24px; }
.stat { background: var(--white); box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; }
.stat__n { font-size: 2rem; line-height: 1.1; margin-bottom: 4px; }
.stat .label { margin: 0; }
.warn { color: var(--rust); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
textarea.mono { font-size: .88rem; }
.form--narrow { max-width: 520px; }
.form-grid { display: grid; gap: 28px; }
@media (min-width: 1100px) { .form-grid { grid-template-columns: 1fr 300px; } }
.form-grid__main, .form-grid__side { display: flex; flex-direction: column; gap: 6px; }
.form-grid__side .btn { margin-top: 16px; }
.flags { border: 1px solid var(--line); padding: 8px 12px; margin: 12px 0 0; }
.thumb { max-width: 160px; margin: 4px 0; }
.danger-zone { margin-top: 32px; padding-top: 16px; border-top: 1px dashed var(--rust); }
.danger-zone .link-button { color: var(--rust); }
.queue__story { font-size: 1.15rem; margin: 24px 0 8px; }
.variant { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; padding: 14px 16px; background: var(--white); box-shadow: var(--shadow); margin-bottom: 10px; align-items: start; }
.variant__text p:first-child { margin-bottom: .4em; }
.variant__actions { display: flex; flex-direction: column; gap: 6px; }
.panel--flat { box-shadow: none; border: 1px solid var(--line); margin-bottom: 16px; }

/* ==========================================================================
   Coffee, Shop, Partnerships
   ========================================================================== */
.site-nav a.is-current { text-decoration: underline; text-decoration-color: var(--caramel); text-decoration-thickness: 2px; }
.nav-cart__n { display: inline-block; min-width: 1.5em; padding: 0 .4em; border-radius: 99px; background: var(--caramel); color: var(--white); font-size: .75rem; text-align: center; line-height: 1.5; }
@media (min-width: 761px) and (max-width: 1080px) { .site-nav { gap: 14px; } .site-nav a { font-size: .88rem; } }

.shop-hero { background: var(--espresso); color: var(--cream); position: relative; overflow: hidden; }
.shop-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
    background: repeating-linear-gradient(90deg, var(--caramel) 0 22px, var(--cream) 22px 26px, var(--rust) 26px 34px, var(--coffee) 34px 56px, var(--sand) 56px 60px); }
.shop-hero--coffee { background: linear-gradient(120deg, #2b1f19 0%, var(--espresso) 55%, #5a3e2c 100%); }
.shop-hero--partner { background: linear-gradient(120deg, #22362a 0%, var(--forest) 60%, #3e2c23 100%); }
.shop-hero__inner { display: grid; gap: 32px; padding-top: 64px; padding-bottom: 64px; align-items: center; }
@media (min-width: 900px) { .shop-hero__inner { grid-template-columns: 3fr 2fr; } }
.shop-hero__title { font-size: clamp(2.2rem, 5.5vw, 3.8rem); font-style: italic; letter-spacing: -.015em; }
.shop-hero__lede { font-size: 1.15rem; color: var(--sand); max-width: 36em; }
.shop-hero__facts { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--caramel); }
.shop-hero__facts li { padding: 10px 0 10px 20px; color: var(--sand); }
.shop-hero__facts strong { color: var(--cream); font-weight: normal; font-style: italic; font-size: 1.15rem; display: block; }
.btn--ghost-light { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn--ghost-light:hover { background: var(--cream); color: var(--espresso); }

.values { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 40px; }
.values__h { font-size: 1.3rem; font-style: italic; border-top: 2px solid var(--caramel); padding-top: 12px; }

.pgrid { display: grid; gap: 36px 28px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 24px; }
.pgrid--4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.pcard { display: flex; flex-direction: column; }
.pcard__media { position: relative; display: block; aspect-ratio: 1; background: var(--cream); overflow: hidden; margin-bottom: 14px; }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.pcard:hover .pcard__media img { transform: scale(1.04); }
.pcard__flag { position: absolute; top: 10px; left: 10px; background: var(--white); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; padding: .3em .7em; }
.pcard__flag--out { background: var(--rust); color: var(--white); }
.pcard__title { font-size: 1.2rem; margin-bottom: .25em; }
.pcard__title a { text-decoration: none; }
.pcard__tag { font-size: .92rem; color: var(--muted); margin-bottom: .5em; }
.pcard__price { margin-top: auto; font-size: 1.1rem; }
.pcard__price s { font-size: .9rem; margin-left: 6px; }

.product__grid { display: grid; gap: 40px; margin-top: 12px; }
@media (min-width: 900px) { .product__grid { grid-template-columns: 1fr 1fr; align-items: start; } .product__media { position: sticky; top: 96px; } }
.product__media img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--cream); }
.product__title { font-size: clamp(2rem, 4vw, 2.8rem); }
.product__tag { font-size: 1.15rem; font-style: italic; color: var(--coffee); }
.product__price { font-size: 1.8rem; margin: 8px 0; }
.product__price s { font-size: 1.1rem; margin-left: 8px; }
.stock { font-size: .9rem; color: var(--forest); }
.stock--low { color: var(--caramel-dark); }
.stock--out { color: var(--rust); }
.buy { display: flex; flex-direction: column; gap: 6px; margin: 16px 0 28px; max-width: 420px; }
.buy__row { display: flex; gap: 10px; }
.buy__row input { width: 90px; }
.buy__row .btn { flex: 1; }
.details th { width: 38%; color: var(--coffee); font-weight: normal; text-transform: none; letter-spacing: 0; font-size: .95rem; border-bottom: 1px solid var(--line); }
.ship-info { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 12px; }
.ship-info summary { cursor: pointer; }
.crumbs a { text-decoration: none; }

.brew { background: var(--cream); }
.brew__grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 24px 0; }
.brew__card { background: var(--white); padding: 24px; box-shadow: var(--shadow); }
.brew__card h3 { font-size: 1.4rem; font-style: italic; }
.brew__card ol { padding-left: 20px; margin: 12px 0 0; font-size: .98rem; }
.brew .notice { background: var(--white); }
.cta-band { display: flex; gap: 24px; justify-content: space-between; align-items: center; flex-wrap: wrap; background: var(--white); box-shadow: var(--shadow); padding: 28px 32px; border-left: 4px solid var(--caramel); }
.cta-band h2 { font-size: 1.5rem; font-style: italic; margin-bottom: .2em; }
.cta-band p { margin: 0; color: var(--coffee); }

.cart { display: grid; gap: 32px; margin-top: 16px; }
@media (min-width: 960px) { .cart { grid-template-columns: 1fr 340px; align-items: start; } }
.cart-table td { vertical-align: middle; }
.cart-thumb img { width: 72px; height: 72px; object-fit: cover; background: var(--cream); }
.cart-table .qty { width: 72px; }
.cart-table tr.is-short td { background: #fbeee9; }
.num { text-align: right; white-space: nowrap; }
.sum-row { display: flex; justify-content: space-between; margin: 0 0 8px; }
.sum-row--total { border-top: 1px solid var(--espresso); padding-top: 10px; font-size: 1.2rem; }
.meter { height: 6px; background: var(--cream); margin: -4px 0 14px; }
.meter span { display: block; height: 100%; background: var(--caramel); }
.ok { color: var(--forest); }
.empty-cart { padding: 32px 0; font-size: 1.1rem; }

.checkout { display: grid; gap: 28px; margin-top: 16px; }
@media (min-width: 960px) { .checkout { grid-template-columns: 1fr 360px; align-items: start; } .checkout__summary { position: sticky; top: 96px; } }
.checkout__form { display: flex; flex-direction: column; gap: 20px; }
.checkout fieldset.panel { border: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.checkout legend.panel__title { padding: 0; width: 100%; float: left; margin-bottom: 8px; }
.checkout fieldset > *:not(legend) { clear: both; }
.radio-card { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--line); padding: 12px 14px; cursor: pointer; background: var(--paper); }
.radio-card:has(input:checked) { border-color: var(--caramel); background: var(--cream); }
.radio-card input { accent-color: var(--espresso); }
.two { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .two { grid-template-columns: 1fr 1fr; } }
.mini-lines { list-style: none; padding: 0; margin: 0 0 14px; }
.mini-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dotted var(--line); font-size: .95rem; }

.timeline { list-style: none; display: flex; padding: 0; margin: 24px 0; counter-reset: t; }
.timeline li { flex: 1; text-align: center; position: relative; font-size: .85rem; color: var(--muted); padding-top: 30px; }
.timeline li::before { content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 2px solid var(--sand); z-index: 1; }
.timeline li::after { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--sand); }
.timeline li:first-child::after { display: none; }
.timeline li.is-done { color: var(--espresso); }
.timeline li.is-done::before { background: var(--caramel); border-color: var(--caramel); }
.timeline li.is-done::after { background: var(--caramel); }
.timeline li.is-now { font-weight: bold; }

.partner-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-top: 24px; }
.pcardx { background: var(--white); box-shadow: var(--shadow); padding: 26px 28px; border-top: 4px solid var(--forest); }
.pcardx:nth-child(3n+2) { border-top-color: var(--caramel); }
.pcardx:nth-child(3n) { border-top-color: var(--rust); }
.pcardx h3 { font-size: 1.45rem; font-style: italic; }
.pcardx ul { padding-left: 18px; margin: 0; font-size: .97rem; }
.pcardx li { margin-bottom: 4px; }
.two-col { display: grid; gap: 40px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }
.steps-list { padding-left: 22px; }
.steps-list li { margin-bottom: 12px; }
.principles { list-style: none; padding: 0; }
.principles li { padding: 10px 0 10px 16px; border-left: 3px solid var(--caramel); margin-bottom: 10px; background: var(--white); padding-right: 12px; }
.faq--wide { max-width: 860px; margin: 0; }
.inquiry .two { margin: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
