@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300..700&family=Inter:wght@400;500;600&display=swap');

/* ==========================================================================
   Trade Atlas Theme — "Kurum" design system shared with the Akyanmedia and
   ShopsWired themes (v1.0). The dark institutional
   ground stays; the ornament goes. One accent, one display face, rules only
   where structure needs them.

   Only sw-base.css and this file are loaded (layout.liquid links
   /theme-assets/css/<active theme id>.css). default.css never loads, so
   every token sw-base.css consumes must be defined here — including the
   legacy aliases at the bottom of the token block.

   Four standing rules:

   1. Brass appears in exactly three places: the primary CTA fill, the
      eyebrow's dash, and hover/focus states. Anything static and brass that
      was not one of those was decoration, and it is gone — no brass badges,
      no brass rules, no brass group titles.

   2. Fraunces is the display voice only: the hero, page titles, the closing
      CTA title, and the wordmark. Everything at text size — nav, buttons,
      row names, labels, metadata — is Inter. Serif at small sizes reads as
      noise; sans at display sizes would read as a shop.

   3. Vertical rhythm comes from the --ak-section-y TOKEN, never from a
      shared .ak-section class. Two single-class selectors setting padding
      on the same element have equal specificity and source order decides
      the winner silently. One element's padding has exactly one owner.

   4. The theme has no layout.liquid of its own — it inherits default's —
      so fonts cannot be preloaded with <link>. The @import above is the
      only loading mechanism, which makes the system-serif fallback chain
      load-bearing, not decorative.

   The .ak-* components are square by design: no radius, no shadow. The
   radius/shadow tokens stay conventional for the rest of the storefront
   (cart, product, account), which sw-base.css styles.
   ========================================================================== */

:root {
    /* --- 1. BRAND --- */
    --ak-ground: #0e1420;
    --ak-surface: #151c2b;
    --ak-cream: #f2ede4;          /* 15.8:1 on --ak-ground */
    --ak-muted: #9c9689;          /* 6.3:1 on --ak-ground */
    --ak-brass: #c8a45c;          /* 7.8:1 on --ak-ground — usable as text */
    --ak-rule: #262d3b;
    /* --ak-rule is 1.33:1 on the ground: correct for decorative hairlines,
       far too quiet to be the ONLY boundary of a control. Interactive
       elements whose shape is nothing but a border (the mobile Menu button,
       form fields) use this instead, which clears the 3:1 WCAG 1.4.11 floor
       for a non-text boundary. */
    /* Must clear 3:1 on BOTH grounds: the nav toggle sits on --ak-ground,
       but form fields sit on --ak-surface, which is lighter. */
    --ak-rule-strong: #616b80;   /* 3.44:1 on ground, 3.18:1 on surface */

    /* Primary is brass: on a dark ground it carries contrast that the old
       yellow could not on paper, so buttons and links across the whole
       storefront can use the accent directly. */
    --sw-color-primary: var(--ak-brass);
    --sw-color-primary-hover: #d8b673;

    /* --- 2. NEUTRALS --- */
    --sw-color-bg: var(--ak-ground);
    --sw-color-surface: var(--ak-surface);

    /* --- 3. TYPOGRAPHY COLORS --- */
    --sw-color-text-main: var(--ak-cream);
    --sw-color-text-muted: var(--ak-muted);

    /* --- 4. SYSTEM --- */
    /* Opened up from the old #b3261e / #1c6b3c, which fail on a dark ground. */
    --sw-color-error: #ef6f68;    /* 6.3:1 on --ak-ground */
    --sw-color-success: #4caf7d;  /* 6.8:1 on --ak-ground */

    /* --- 5. SPACING --- */
    --sw-space-xs: 0.25rem;
    --sw-space-sm: 0.5rem;
    --sw-space-md: 1rem;
    --sw-space-lg: 2rem;

    /* --- 6. TYPE --- */
    --ak-font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
    --ak-font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --sw-font-sans: var(--ak-font-body);
    --sw-text-sm: 0.875rem;
    --sw-text-base: 1rem;
    --sw-text-lg: 1.25rem;
    --sw-text-xl: 2rem;

    /* --- 7. BORDERS & SHADOWS --- */
    --sw-radius-sm: 8px;
    --sw-radius-md: 12px;
    /* Black shadows vanish on a dark ground, so depth is carried by a
       lightened edge plus a deeper, more opaque drop. */
    --sw-shadow-sm: 0 1px 0 rgba(242, 237, 228, 0.04), 0 2px 6px rgba(0, 0, 0, 0.4);

    /* --- 8. LAYOUT --- */
    --ak-container: 72rem;
    --ak-gutter: clamp(1.25rem, 4vw, 2.5rem);
    --ak-section-y: clamp(5rem, 9vw, 9rem);

    /* --- Legacy mappings (sw-base.css depends on these) --- */
    --sw-primary: var(--sw-color-primary);
    --sw-primary-dark: var(--sw-color-primary-hover);
    --sw-bg: var(--sw-color-bg);
    --sw-text: var(--sw-color-text-main);
    --sw-text-light: var(--sw-color-text-muted);
    --sw-border: var(--ak-rule);
    --sw-surface: var(--sw-color-surface);
    --sw-danger: var(--sw-color-error);
    --sw-radius: var(--sw-radius-md);
    --sw-shadow: var(--sw-shadow-sm);
    --sw-shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
    --sw-max-w: var(--ak-container);
    --sw-font: var(--sw-font-sans);
}

/* The ground is the default surface, not an exception. layout.liquid is
   inherited, so this is the only place body can be painted. */
body {
    background: var(--ak-ground);
    color: var(--ak-cream);
    font-family: var(--ak-font-body);
    -webkit-font-smoothing: antialiased;
}

.ak-wrap {
    max-width: var(--ak-container);
    margin: 0 auto;
    padding-inline: var(--ak-gutter);
}

/* The small voice: eyebrows, slugs, categories, counts, statuses.
   Small caps and tracking, never a badge — labels are text, not chrome. */
.ak-label {
    font-family: var(--ak-font-body);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
}

/* Visually hidden, still announced. */
.ak-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------------------------------------
   Header — wordmark, nav, one action. No cart, no search, no login.

   The mobile toggle is display:none until the header script adds
   .ak-header--js. That class is the whole progressive-enhancement contract:
   without JS the toggle does not exist and the nav is a plain wrapping row.
   -------------------------------------------------------------------------- */

.ak-header {
    padding-block: clamp(1.25rem, 2.5vw, 2rem);
    border-bottom: 1px solid var(--ak-rule);
}

.ak-header-inner {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem 2rem;
    flex-wrap: wrap;
}

.ak-wordmark {
    display: inline-flex;
    align-items: baseline;
    gap: 0.625rem;
    text-decoration: none;
    color: var(--ak-cream);
}

/* The wordmark is identity, not display typography — it keeps Fraunces. */
.ak-wordmark-name {
    font-family: var(--ak-font-display);
    font-size: 1.375rem;
    font-weight: 400;
    letter-spacing: -0.015em;
}

.ak-wordmark-tag {
    color: var(--ak-muted);
}

.ak-nav {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.75rem clamp(1.25rem, 2.5vw, 2rem);
}

.ak-nav-link {
    font-size: 0.9375rem;
    color: var(--ak-muted);
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.ak-nav-link:hover,
.ak-nav-link:focus-visible {
    color: var(--ak-cream);
    border-bottom-color: var(--ak-brass);
}

.ak-nav-cta {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ak-cream);
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 2px solid var(--ak-brass);
}

/* Mobile nav toggle — revealed by the JS class inside the 60rem query only. */
.ak-nav-toggle {
    display: none;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: var(--ak-cream);
    background: none;
    /* This border is the button's only shape — it needs the 3:1 token. */
    border: 1px solid var(--ak-rule-strong);
    cursor: pointer;
}

.ak-nav-toggle:hover {
    border-color: var(--ak-brass);
}

/* --------------------------------------------------------------------------
   Hero — a masthead above the page. Power comes from scale, not weight:
   Fraunces is set large and light rather than small and bold.
   -------------------------------------------------------------------------- */

.ak-hero {
    padding-top: clamp(4rem, 8vw, 7rem);
}

.ak-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--ak-muted);
    margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
}

/* The one static brass mark on the page. */
.ak-hero-eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    background: var(--ak-brass);
}

.ak-hero-title {
    font-family: var(--ak-font-display);
    font-size: clamp(3rem, 7vw, 7rem);
    font-weight: 300;
    font-variation-settings: 'opsz' 144;
    letter-spacing: -0.025em;
    line-height: 1.02;
    margin: 0;
    max-width: 15ch;
    color: var(--ak-cream);
    text-wrap: balance;
}

.ak-hero-sub {
    font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
    line-height: 1.65;
    color: var(--ak-muted);
    max-width: 40ch;
    margin: 2rem 0 0;
}

/* The hero action is a ruled link, not a pill. */
.ak-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2.75rem;
    padding-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--ak-cream);
    text-decoration: none;
    border-bottom: 2px solid var(--ak-brass);
}

.ak-hero-cta::after {
    content: '\2192';
    transition: transform 0.18s ease;
}

.ak-hero-cta:hover::after,
.ak-hero-cta:focus-visible::after {
    transform: translateX(5px);
}

/* Spec strip — the masthead's data line. Cell count is not fixed: cells
   whose figure cannot be derived honestly are dropped from the markup, so
   the columns are auto, not a hard-coded 4. Numbers are cream, not brass:
   data is content, and only actions earn the accent. */
.ak-hero-spec {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    margin-top: clamp(3.5rem, 7vw, 5.5rem);
    border-top: 1px solid var(--ak-rule);
    border-bottom: 1px solid var(--ak-rule);
}

.ak-hero-spec-cell {
    padding: 1.6rem 0 1.6rem 1.6rem;
    border-left: 1px solid var(--ak-rule);
}

.ak-hero-spec-cell:first-child {
    padding-left: 0;
    border-left: none;
}

.ak-hero-spec-num {
    display: block;
    font-family: var(--ak-font-display);
    font-size: clamp(1.75rem, 3.6vw, 2.75rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--ak-cream);
    font-variant-numeric: tabular-nums;
}

.ak-hero-spec-lbl {
    display: block;
    margin-top: 0.65rem;
    color: var(--ak-muted);
}

/* --------------------------------------------------------------------------
   Capabilities — plain type on the ground, no cards, no badges. 'now' is
   the default state and renders nothing; only 'soon' is marked, as text.
   -------------------------------------------------------------------------- */

.ak-caps {
    padding-block: var(--ak-section-y);
    scroll-margin-top: 1.5rem;
}

.ak-caps-head {
    max-width: 44rem;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.ak-caps-title {
    font-family: var(--ak-font-display);
    font-size: clamp(1.875rem, 3.2vw, 2.75rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0;
    color: var(--ak-cream);
}

.ak-caps-intro {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ak-muted);
    margin: 1.25rem 0 0;
}

.ak-caps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: clamp(1.75rem, 3.5vw, 3rem);
}

.ak-cap-status {
    display: inline-block;
    color: var(--ak-muted);
}

.ak-cap-title {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 0.5rem;
    color: var(--ak-cream);
}

/* When a 'soon' marker is present the title steps down after it. */
.ak-cap-status + .ak-cap-title {
    margin-top: 1rem;
}

.ak-cap-blurb {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--ak-muted);
    margin: 0;
}

/* --------------------------------------------------------------------------
   Catalogue index
   -------------------------------------------------------------------------- */

.ak-index {
    padding-bottom: var(--ak-section-y);
    scroll-margin-top: 1.5rem;
}

.ak-index-head {
    max-width: 44rem;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.ak-index-title {
    font-family: var(--ak-font-display);
    font-size: clamp(1.875rem, 3.2vw, 2.75rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0;
    color: var(--ak-cream);
}

.ak-index-intro {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ak-muted);
    margin: 1.25rem 0 0;
}

.ak-list {
    border-top: 1px solid var(--ak-rule);
}

/* Category groups. Only the gap between groups is owned here — the first
   group takes its spacing from .ak-index-head's margin. */
.ak-group + .ak-group {
    margin-top: clamp(3rem, 6vw, 4.5rem);
}

.ak-group-title {
    display: block;
    margin: 0 0 1rem;
    color: var(--ak-muted);
}

/* A row is text and whitespace; the only motion is the arrow answering
   hover. No background wash, no badge inversion. */
.ak-row {
    display: grid;
    grid-template-columns: minmax(11rem, 17rem) minmax(0, 1fr) 9rem 1.25rem;
    align-items: baseline;
    gap: clamp(1rem, 2.5vw, 2.25rem);
    padding: 1.9rem var(--ak-gutter);
    margin-inline: calc(var(--ak-gutter) * -1);
    border-bottom: 1px solid var(--ak-rule);
    text-decoration: none;
    color: inherit;
}

.ak-row:focus-visible {
    outline: 2px solid var(--ak-brass);
    outline-offset: -2px;
}

.ak-row-name {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    color: var(--ak-cream);
    transition: color 0.15s ease;
}

.ak-row:hover .ak-row-name,
.ak-row:focus-visible .ak-row-name {
    color: var(--ak-brass);
}

/* The leading index was removed in 2.1; the slug is redundant chrome. */
.ak-row-slug {
    display: none;
}

.ak-row-desc {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--ak-muted);
    margin: 0;
}

.ak-row-tags {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.ak-row-cat {
    color: var(--ak-muted);
    white-space: nowrap;
}

/* The kind is secondary metadata: plain, no chrome, so it never competes
   with the category label. */
.ak-row-kind {
    color: var(--ak-muted);
    opacity: 0.9;
    white-space: nowrap;
}

.ak-row-arrow {
    justify-self: end;
    color: var(--ak-brass);
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.18s ease;
}

.ak-row:hover .ak-row-arrow,
.ak-row:focus-visible .ak-row-arrow {
    opacity: 1;
    transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   Closing CTA — separation comes from the raised surface alone; the brass
   rule that topped the band was a second accent and is gone.
   -------------------------------------------------------------------------- */

.ak-cta {
    background: var(--ak-surface);
    padding-block: var(--ak-section-y);
}

.ak-cta-inner {
    max-width: 44rem;
}

.ak-cta-title {
    font-family: var(--ak-font-display);
    font-size: clamp(2rem, 3.6vw, 3rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0;
    color: var(--ak-cream);
    text-wrap: balance;
}

.ak-cta-sub {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ak-muted);
    margin: 1.5rem 0 0;
    max-width: 40ch;
}

.ak-cta-btn {
    display: inline-block;
    margin-top: 2.75rem;
    padding: 1rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ak-ground);
    background: var(--ak-brass);
    border: 1px solid var(--ak-brass);
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ak-cta-btn:hover,
.ak-cta-btn:focus-visible {
    background: var(--sw-color-primary-hover);
    border-color: var(--sw-color-primary-hover);
}

.ak-cta-btn:focus-visible {
    outline: 2px solid var(--ak-brass);
    outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Footer — typographic. No icons, no images.
   -------------------------------------------------------------------------- */

.ak-footer {
    padding-top: var(--ak-section-y);
    border-top: 1px solid var(--ak-rule);
}

.ak-footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(auto-fit, minmax(10rem, 1fr));
    gap: clamp(2.5rem, 5vw, 4rem);
}

/* The footer repeats the header wordmark, so it keeps the same face. */
.ak-footer-name {
    font-family: var(--ak-font-display);
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: -0.015em;
    color: var(--ak-cream);
}

.ak-footer-tagline {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--ak-muted);
    max-width: 34ch;
    margin: 1rem 0 1.5rem;
}

.ak-footer-email {
    font-size: 0.9375rem;
    color: var(--ak-cream);
    text-decoration: none;
    border-bottom: 1px solid var(--ak-rule);
    padding-bottom: 2px;
    transition: border-color 0.15s ease;
}

.ak-footer-email:hover,
.ak-footer-email:focus-visible {
    border-bottom-color: var(--ak-brass);
}

.ak-footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.ak-footer-col-title { color: var(--ak-muted); }

.ak-footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.ak-footer-links a {
    font-size: 0.9375rem;
    color: var(--ak-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.ak-footer-links a:hover,
.ak-footer-links a:focus-visible {
    color: var(--ak-cream);
}

.ak-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: var(--ak-section-y);
    padding-block: 1.75rem;
    border-top: 1px solid var(--ak-rule);
    font-size: 0.8125rem;
    color: var(--ak-muted);
}

/* --------------------------------------------------------------------------
   Focus — sw-base.css does not style .ak-* elements, so every interactive
   element declares its own visible focus ring. On the dark ground the ring
   is brass: an ink ring would be invisible.
   -------------------------------------------------------------------------- */

.ak-wordmark:focus-visible,
.ak-nav-link:focus-visible,
.ak-nav-cta:focus-visible,
.ak-nav-toggle:focus-visible,
.ak-hero-cta:focus-visible,
.ak-footer-email:focus-visible,
.ak-footer-links a:focus-visible,
.ak-back:focus-visible,
.ak-notice-link:focus-visible,
.ak-chip:focus-visible,
.ak-prose a:focus-visible,
.ak-contact-email:focus-visible,
.ak-inline-cta-btn:focus-visible {
    outline: 2px solid var(--ak-brass);
    outline-offset: 3px;
}

/* ==========================================================================
   Interior pages — content page, plugin detail, notice/404, contact.
   Same voice as the home page: dark ground, whitespace instead of chrome,
   brass only where it acts. sw-base.css does not touch .ak-*, so these own
   their own type, spacing and focus.
   ========================================================================== */

.ak-lede {
    padding-top: clamp(3rem, 6vw, 5rem);
    padding-bottom: clamp(2.25rem, 4.5vw, 3.5rem);
    border-bottom: 1px solid var(--ak-rule);
    margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

.ak-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--ak-muted);
    text-decoration: none;
    margin-bottom: 2rem;
    transition: color 0.15s ease;
}

.ak-back::before { content: '\2190'; }
.ak-back:hover, .ak-back:focus-visible { color: var(--ak-brass); }

.ak-lede-kicker {
    display: inline-block;
    color: var(--ak-muted);
    margin-bottom: 1.25rem;
}

.ak-lede-title {
    font-family: var(--ak-font-display);
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    font-weight: 300;
    font-variation-settings: 'opsz' 144;
    letter-spacing: -0.025em;
    line-height: 1.04;
    margin: 0;
    max-width: 20ch;
    color: var(--ak-cream);
    text-wrap: balance;
}

.ak-lede-sub {
    font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
    line-height: 1.6;
    color: var(--ak-muted);
    max-width: 54ch;
    margin: 1.75rem 0 0;
}

/* Content page + long-form prose ----------------------------------------- */
.ak-page { padding-bottom: var(--ak-section-y); }

.ak-prose {
    max-width: 42rem;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--ak-muted);
}

.ak-prose > * + * { margin-top: 1.5rem; }

.ak-prose h2 {
    font-family: var(--ak-font-display);
    font-size: clamp(1.625rem, 2.4vw, 2.125rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-top: 3rem;
    color: var(--ak-cream);
}

.ak-prose h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 2.25rem;
    color: var(--ak-cream);
}

.ak-prose p, .ak-prose li { color: var(--ak-muted); }

.ak-prose a {
    color: var(--ak-cream);
    text-decoration: none;
    border-bottom: 1px solid var(--ak-brass);
    padding-bottom: 1px;
    transition: color 0.15s ease;
}

.ak-prose a:hover { color: var(--ak-brass); }
.ak-prose ul, .ak-prose ol { padding-left: 1.25rem; }
.ak-prose li { margin-top: 0.5rem; }

.ak-prose blockquote {
    border-left: 2px solid var(--ak-brass);
    padding-left: 1.5rem;
    color: var(--ak-cream);
}

.ak-prose img { width: 100%; height: auto; border: 1px solid var(--ak-rule); }

.ak-prose code {
    font-size: 0.875em;
    background: var(--ak-surface);
    color: var(--ak-cream);
    padding: 0.1em 0.35em;
}

/* On a dark ground a darker code block reads as a hole, so pre is the
   RAISED surface, not a sunken one. */
.ak-prose pre {
    font-size: 0.875rem;
    line-height: 1.7;
    background: var(--ak-surface);
    color: var(--ak-cream);
    padding: 1.5rem;
    overflow-x: auto;
}

.ak-prose pre code { background: none; padding: 0; color: inherit; }
.ak-prose hr { border: none; border-top: 1px solid var(--ak-rule); }

/* Plugin detail ----------------------------------------------------------- */
.ak-detail { padding-bottom: var(--ak-section-y); }
.ak-detail-tags { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-bottom: 1.5rem; }

.ak-detail-cat,
.ak-detail-kind {
    color: var(--ak-muted);
}

.ak-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    border-top: 1px solid var(--ak-rule);
    margin: clamp(2.5rem, 5vw, 3.5rem) 0;
    max-width: 46rem;
}

.ak-meta-item { padding: 1.25rem 0; border-bottom: 1px solid var(--ak-rule); }
.ak-meta-label { display: block; color: var(--ak-muted); margin-bottom: 0.4rem; }

.ak-meta-value {
    font-weight: 500;
    font-size: 1rem;
    color: var(--ak-cream);
}

/* Inline CTA band, reused on detail + contact + catalogue. The raised
   surface carries the separation; the brass edge is gone. */
.ak-inline-cta {
    background: var(--ak-surface);
    color: var(--ak-cream);
    padding: clamp(2rem, 4vw, 3rem);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2rem;
    margin-top: clamp(3rem, 6vw, 4.5rem);
}

.ak-inline-cta-text {
    font-weight: 500;
    font-size: clamp(1.125rem, 1.8vw, 1.375rem);
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin: 0;
    max-width: 32ch;
}

.ak-inline-cta-btn {
    display: inline-block;
    padding: 0.9rem 1.6rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ak-ground);
    background: var(--ak-brass);
    border: 1px solid var(--ak-brass);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ak-inline-cta-btn:hover,
.ak-inline-cta-btn:focus-visible {
    background: var(--sw-color-primary-hover);
    border-color: var(--sw-color-primary-hover);
}

/* Cross-links to the rest of the catalogue — a plain link list, not chips. */
.ak-cross {
    margin-top: clamp(3rem, 6vw, 4.5rem);
    border-top: 1px solid var(--ak-rule);
    padding-top: 2rem;
}

.ak-cross-title { display: block; color: var(--ak-muted); margin-bottom: 1.25rem; }
.ak-cross-list { display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; }

.ak-chip {
    font-size: 0.9375rem;
    color: var(--ak-cream);
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--ak-rule);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.ak-chip:hover, .ak-chip:focus-visible {
    color: var(--ak-brass);
    border-bottom-color: var(--ak-brass);
}

/* Notice / 404 ------------------------------------------------------------ */
.ak-notice {
    padding-top: clamp(4.5rem, 10vw, 8rem);
    padding-bottom: clamp(4.5rem, 10vw, 8rem);
    max-width: 44rem;
}

.ak-notice-code { display: block; color: var(--ak-muted); margin-bottom: 1.5rem; }

.ak-notice-title {
    font-family: var(--ak-font-display);
    font-size: clamp(2.5rem, 5.5vw, 4rem);
    font-weight: 300;
    font-variation-settings: 'opsz' 144;
    letter-spacing: -0.025em;
    line-height: 1.05;
    margin: 0;
    color: var(--ak-cream);
    text-wrap: balance;
}

.ak-notice-sub {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ak-muted);
    margin: 1.5rem 0 0;
    max-width: 46ch;
}

.ak-notice-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem 2rem;
    margin-top: 2.75rem;
}

.ak-notice-link {
    font-size: 0.9375rem;
    color: var(--ak-muted);
    text-decoration: none;
    border-bottom: 1px solid var(--ak-rule);
    padding-bottom: 2px;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.ak-notice-link:hover { color: var(--ak-cream); border-bottom-color: var(--ak-brass); }

/* Contact ----------------------------------------------------------------- */
.ak-contact { padding-bottom: var(--ak-section-y); }

.ak-contact-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: clamp(2.5rem, 5.5vw, 4.5rem);
    align-items: start;
}

.ak-contact-detail { display: flex; flex-direction: column; gap: 2rem; }
.ak-contact-label { display: block; color: var(--ak-muted); margin-bottom: 0.5rem; }

.ak-contact-email {
    font-weight: 500;
    font-size: clamp(1.1875rem, 2vw, 1.5rem);
    letter-spacing: -0.01em;
    color: var(--ak-cream);
    text-decoration: none;
    border-bottom: 1px solid var(--ak-rule);
    padding-bottom: 2px;
    transition: border-color 0.15s ease;
}

.ak-contact-email:hover,
.ak-contact-email:focus-visible {
    border-bottom-color: var(--ak-brass);
}

.ak-contact-value { font-size: 1.0625rem; color: var(--ak-muted); line-height: 1.6; }

.ak-contact-steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ak-contact-steps li {
    position: relative;
    padding-left: 2.5rem;
    color: var(--ak-muted);
    line-height: 1.6;
}

.ak-contact-steps li::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0.15em;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.1em;
    color: var(--ak-muted);
}

@media (max-width: 48rem) {
    .ak-contact-grid { grid-template-columns: 1fr; }
    .ak-inline-cta { flex-direction: column; align-items: flex-start; }
}

/* --------------------------------------------------------------------------
   Narrow viewports — the index collapses into stacked entries, category
   first, so the metadata still leads the row.
   -------------------------------------------------------------------------- */

@media (max-width: 60rem) {
    /* Nav collapses behind the toggle. Guarded on .ak-header--js so a JS
       failure leaves the old wrapping row rather than an unreachable nav. */
    .ak-header--js .ak-nav-toggle {
        display: inline-flex;
    }

    .ak-header--js .ak-nav {
        display: none;
    }

    .ak-header--js .ak-nav[data-open="true"] {
        display: flex;
        flex-basis: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        margin-top: 1.25rem;
        padding-top: 1.25rem;
        border-top: 1px solid var(--ak-rule);
    }

    .ak-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding-block: 1.5rem;
    }

    .ak-row-tags {
        order: -1;
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .ak-row-arrow {
        display: none;
    }

    .ak-footer-inner {
        grid-template-columns: 1fr;
    }
}

/* Spec strip folds to two columns before it gets cramped. */
@media (max-width: 34rem) {
    .ak-hero-spec {
        grid-auto-flow: row;
        grid-template-columns: 1fr 1fr;
    }

    .ak-hero-spec-cell:nth-child(odd) {
        padding-left: 0;
        border-left: none;
    }

    .ak-hero-spec-cell:nth-child(even) {
        padding-left: 1.4rem;
    }

    .ak-hero-spec-cell:nth-child(n+3) {
        border-top: 1px solid var(--ak-rule);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ak-row-name,
    .ak-row-arrow,
    .ak-nav-link,
    .ak-hero-cta::after,
    .ak-back,
    .ak-footer-email,
    .ak-footer-links a,
    .ak-notice-link,
    .ak-chip,
    .ak-prose a,
    .ak-contact-email,
    .ak-cta-btn,
    .ak-inline-cta-btn {
        transition: none;
    }

    .ak-row:hover .ak-row-arrow,
    .ak-hero-cta:hover::after {
        transform: none;
    }
}

/* --------------------------------------------------------------------------
   Inherited surfaces — sw-base.css styles cart/product/account and does not
   know the ground is dark. Form controls were the one place that broke: the
   browser default is a white field with black text, which stays perfectly
   readable (21:1) but reads as an unfinished white box punched into a dark
   page, and the inherited pages are full of them.

   color-scheme does most of the work: it tells the engine to render native
   UI dark, which fixes scrollbars, the <select> popup, date pickers and
   Chrome's autofill overlay (which otherwise paints its light #E8F0FE over
   the field). CSS alone cannot reach any of those.

   The type list is explicit on purpose. A bare `input` selector also hits
   checkbox, radio, range, color and file, whose appearance depends on native
   widget rendering — painting a background on those damages them rather
   than theming them.

   These are element selectors, so their specificity sits below any class
   rule in sw-base.css: wherever sw-base styles a control it still wins.
   -------------------------------------------------------------------------- */

:root {
    color-scheme: dark;
}

input:is([type="text"], [type="email"], [type="password"], [type="search"],
         [type="tel"], [type="url"], [type="number"], [type="date"],
         [type="datetime-local"], [type="month"], [type="time"], [type="week"]),
textarea,
select {
    background: var(--ak-surface);
    color: var(--ak-cream);
    /* Not --ak-rule: at 1.23:1 against the surface the field would have no
       locatable edge on the dark ground. */
    border: 1px solid var(--ak-rule-strong);
}

input::placeholder, textarea::placeholder {
    color: var(--ak-muted);
}
