/* ============================================================
   DeepSoft — modern theme (DEV ONLY)
   A radical visual refresh layered on top of the existing CSS.
   Loaded last in layout.xslt, so it overrides inner/media/css.css.
   Pure restyle: no markup depends on these class names beyond
   what the existing layout already emits.
   ============================================================ */

:root {
    --ink:        #0e1320;   /* primary text */
    --ink-soft:   #46505f;   /* secondary text */
    --muted:      #6b7480;   /* tertiary / meta */
    --bg:         #ffffff;
    --surface:    #f6f7fb;   /* soft section bg */
    --surface-2:  #eef0f7;
    --border:     #e6e8ef;
    --brand:      #6d5efc;   /* indigo-violet */
    --brand-2:    #a855f7;   /* violet */
    --brand-3:    #22d3ee;   /* cyan, for gradients */
    --accent:     #ff4d6d;   /* warm coral, hover */
    --ring:       rgba(109, 94, 252, .35);
    --header-bg:  rgba(255, 255, 255, .72);  /* glass nav */
    color-scheme: light;

    --radius:     18px;
    --radius-sm:  12px;
    --radius-pill: 999px;

    --shadow-sm:  0 1px 2px rgba(14,19,32,.05), 0 2px 8px rgba(14,19,32,.05);
    --shadow:     0 4px 12px rgba(14,19,32,.06), 0 18px 40px rgba(14,19,32,.10);
    --shadow-lg:  0 10px 30px rgba(14,19,32,.10), 0 30px 60px rgba(14,19,32,.16);

    --font-body:  'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-disp:  'Space Grotesk', var(--font-body);

    --maxw: 1180px;
}

/* ---------- dark palette ----------
   Applied when the user explicitly chooses dark, and when their OS prefers
   dark (unless they explicitly chose light). Defined via a reusable selector
   list so both triggers share one block. */
:root[data-theme="dark"] {
    --ink:        #e7e9f3;
    --ink-soft:   #aeb6c8;
    --muted:      #7e8799;
    --bg:         #0d1018;
    --surface:    #161b26;
    --surface-2:  #1f2532;
    --border:     #2a3140;
    --brand:      #8f80ff;
    --brand-2:    #c07cff;
    --brand-3:    #34d3ee;
    --accent:     #ff6b86;
    --ring:       rgba(143, 128, 255, .38);
    --header-bg:  rgba(13, 16, 24, .72);
    --shadow-sm:  0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
    --shadow:     0 4px 12px rgba(0,0,0,.4), 0 18px 40px rgba(0,0,0,.5);
    --shadow-lg:  0 10px 30px rgba(0,0,0,.5), 0 30px 60px rgba(0,0,0,.6);
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ink:        #e7e9f3;
        --ink-soft:   #aeb6c8;
        --muted:      #7e8799;
        --bg:         #0d1018;
        --surface:    #161b26;
        --surface-2:  #1f2532;
        --border:     #2a3140;
        --brand:      #8f80ff;
        --brand-2:    #c07cff;
        --brand-3:    #34d3ee;
        --accent:     #ff6b86;
        --ring:       rgba(143, 128, 255, .38);
        --header-bg:  rgba(13, 16, 24, .72);
        --shadow-sm:  0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
        --shadow:     0 4px 12px rgba(0,0,0,.4), 0 18px 40px rgba(0,0,0,.5);
        --shadow-lg:  0 10px 30px rgba(0,0,0,.5), 0 30px 60px rgba(0,0,0,.6);
        color-scheme: dark;
    }
}

/* ---------- base / typography ---------- */
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.6;
}

body::selection,
::selection { background: var(--ring); }

a, a:visited { color: var(--brand); transition: color .15s ease; }
a:hover { color: var(--accent); }

/* Centered content column, a touch wider & airier than the old 20% gutters */
div.content {
    padding: 0 24px;
    max-width: var(--maxw);
    margin: 0 auto;
}
div.wide-content { padding: 0 24px; }

/* Page H1 (interior pages) — modern, no heavy underline rule */
.content > h1,
div.content h1 {
    font-family: var(--font-disp);
    font-weight: 700;
    letter-spacing: -.02em;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    text-align: center;
    border-bottom: none;
    padding: .2em 0 .1em;
    margin: 1.2em auto .2em;
    position: relative;
}
/* subtle gradient accent under interior H1 instead of the flat teal bar */
.content > h1::after,
div.content h1::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin: .55em auto 0;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

h2 { font-family: var(--font-disp); letter-spacing: -.01em; }
h3 { font-family: var(--font-disp); }

/* ============================================================
   HEADER / NAV  — sticky glass bar, brand left, pill links
   Markup: .header-holder > .header > (.sandwich, ul#MainMenu>li...)
   ============================================================ */
.header-holder {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
}
.header {
    display: flex !important;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: .7rem 24px;
    box-sizing: border-box;
}
.header ul#MainMenu {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
    margin: 0;
    padding: 0;
    width: 100%;
}
.header ul#MainMenu li {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}
/* breadcrumb separator "/" — muted and equally spaced from both neighbours */
.header ul#MainMenu li.sep {
    color: var(--muted);
    margin: 0 .15rem;
}

.header ul#MainMenu a,
.header ul#MainMenu a:visited {
    display: inline-block;
    padding: .5rem .85rem;
    border-radius: var(--radius-pill);
    color: var(--ink-soft);
    font-weight: 500;
    font-size: .95rem;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}
.header ul#MainMenu a:hover {
    background: var(--surface-2);
    color: var(--ink);
    text-decoration: none;
}

/* Brand = first menu item ("DeepSoft — Home"); breadcrumb path flows to its right.
   No extra margin here — spacing around the "/" is symmetric via the gap +
   the equal pill padding on the crumbs on either side. */
.header ul#MainMenu li:first-child a {
    font-family: var(--font-disp);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -.02em;
    color: var(--ink);
    padding-left: 2.1rem;
    position: relative;
}
/* gradient dot logo before the brand */
.header ul#MainMenu li:first-child a::before {
    content: "";
    position: absolute;
    left: .55rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2) 55%, var(--brand-3));
    box-shadow: 0 2px 8px var(--ring);
}
.header ul#MainMenu li:first-child a:hover { background: transparent; color: var(--ink); }

/* current-page chip */
.header ul#MainMenu li span,
.header span.current {
    background: linear-gradient(135deg, var(--brand), var(--brand-2)) !important;
    color: #fff !important;
    padding: .45rem .85rem !important;
    border-radius: var(--radius-pill) !important;
    font-weight: 600;
    font-size: .95rem;
}

/* theme toggle + Contact CTA pinned to the right of the nav */
.header ul#MainMenu li.nav-toggle { margin-left: auto; }
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.theme-toggle:hover { color: var(--ink); background: var(--surface-2); border-color: var(--surface-2); }
.theme-toggle .ic { width: 1.15rem; height: 1.15rem; display: none; }
.theme-toggle[data-mode="light"]  .ic-sun  { display: block; }
.theme-toggle[data-mode="dark"]   .ic-moon { display: block; }
.theme-toggle[data-mode="system"] .ic-sys  { display: block; }
.header ul#MainMenu li.nav-cta { /* sits next to the toggle, on the right */ }

/* the full section list is for the mobile menu only — hidden on desktop */
.header ul#MainMenu li.section-link { display: none; }
.header ul#MainMenu li.nav-cta a,
.header ul#MainMenu li.nav-cta a:visited {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    font-weight: 600;
    padding: .5rem 1.15rem;
    box-shadow: 0 4px 14px var(--ring);
}
.header ul#MainMenu li.nav-cta a:hover {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    filter: brightness(1.06);
}

/* hamburger restyle */
.header .sandwich div { background-color: var(--brand) !important; border-radius: 2px; }

/* ============================================================
   HERO — no panel: just large, modern type on the page itself
   Markup: .wide-content > .front > ul > li > h1.main / h2.main
   ============================================================ */
.wide-content .front {
    display: block !important;
    max-width: var(--maxw);
    margin: 0 auto !important;
    padding: clamp(2.25rem, 6vw, 4.5rem) 1rem clamp(1.25rem, 3.5vw, 2.5rem) !important;
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
.wide-content .front ul,
.wide-content .front ul li {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center !important;
}

.wide-content h1.main {
    font-family: var(--font-disp);
    font-weight: 700;
    font-size: clamp(2.75rem, 8vw, 5.5rem) !important;
    line-height: 1.02;
    letter-spacing: -.04em;
    margin: 0 !important;
    color: var(--ink);
}
.wide-content h1.main span,
.wide-content h1.main span b {
    color: var(--ink) !important;
    background: none !important;
    padding: 0 !important;
    display: inline !important;
    font-weight: 700;
    text-shadow: none;
}
/* fancy gradient ink on the wordmark — guarded so it can never collapse to a box */
@supports (-webkit-background-clip: text) or (background-clip: text) {
    .wide-content h1.main span b {
        background-image: linear-gradient(105deg, var(--ink) 0%, var(--brand) 72%, var(--brand-2) 100%) !important;
        -webkit-background-clip: text !important;
                background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
    }
}
.wide-content h2.main {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(1rem, 2.2vw, 1.3rem) !important;
    margin: .85rem auto 0 !important;
    color: var(--muted);
    max-width: 42ch;
}
.wide-content h2.main span.txt { display: inline !important; color: inherit; }

/* small CTA row under the hero subtitle (optional, used if present) */
.wide-content .front .hero-cta {
    margin-top: 1.6rem;
    display: flex;
    gap: .8rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   SELLING-PAGE SECTIONS  (/software/* via subpage.xslt)
   ============================================================ */
.sell-block { margin: 4rem 0; }
.sell-h {
    font-family: var(--font-disp);
    font-weight: 700;
    letter-spacing: -.01em;
    font-size: 1.6rem;
    margin: 0 0 1.5rem;
    text-align: left;
    border: none;
    padding: 0;
}
.sell-h.center { text-align: center; margin: 4.5rem 0 2rem; }

/* problem framing */
.sell-pains {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.sell-pains .pain {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 1rem 1.15rem;
    color: var(--ink-soft);
}

/* outcomes — checklist */
ul.sell-gains {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
ul.sell-gains li {
    position: relative;
    padding-left: 2rem;
    line-height: 1.5;
}
ul.sell-gains li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .12em;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 50%;
    background:
        linear-gradient(135deg, var(--brand), var(--brand-2));
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/76% no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/76% no-repeat;
}

/* social proof */
.trusted-by { text-align: center; margin: 4.5rem 0 1.5rem; }
.trusted-label {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted);
    margin: 0 0 1.25rem;
}
.trusted-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem 2.5rem;
}
.trusted-logos img {
    height: 30px;
    width: auto;
    filter: grayscale(1);
    opacity: .55;
    transition: filter .2s ease, opacity .2s ease;
}
.trusted-logos img:hover { filter: grayscale(0); opacity: 1; }

/* process */
.process {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.process .step {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.process .step .n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    font-family: var(--font-disp);
    font-weight: 700;
    margin-bottom: .6rem;
}
.process .step h4 {
    font-family: var(--font-disp);
    font-size: 1.15rem;
    margin: 0 0 .35rem;
}
.process .step p { margin: 0; color: var(--ink-soft); }

/* technologies chips */
.tech-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .6rem;
}
.tech-chips span {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: .45rem 1rem;
    font-weight: 500;
    color: var(--ink-soft);
}
.tech-note {
    max-width: 60ch;
    margin: 1.5rem auto 0;
    text-align: center;
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.6;
}

/* closing CTA banner */
.cta-banner {
    margin: 4rem 0 1rem;
    padding: clamp(2rem, 5vw, 3.25rem);
    border-radius: 24px;
    text-align: center;
    color: #fff;
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(34,211,238,.35), transparent 55%),
        linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: var(--shadow);
}
.cta-banner h3 {
    font-family: var(--font-disp);
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 0 0 .4rem;
    color: #fff;
    padding: 0;
}
.cta-banner p { margin: 0 0 .25rem; color: rgba(255,255,255,.9); }
.cta-banner p.button { margin-top: 1.4rem; }
/* invert the button on the gradient banner so it pops */
.cta-banner p.button a.button {
    background: #fff !important;
    color: var(--brand) !important;
    box-shadow: 0 8px 22px rgba(0,0,0,.18);
}
.cta-banner p.button a.button:hover {
    background: #fff !important;
    color: var(--brand-2) !important;
    transform: translateY(-2px);
}

@media screen and (max-width: 820px) {
    .sell-pains, .process { grid-template-columns: 1fr; }
    ul.sell-gains { grid-template-columns: 1fr; }
}

/* ============================================================
   CARD GRID  (.global1 > .glob)
   ============================================================ */
div.global1 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem !important;
    max-width: var(--maxw);
    margin: 0 auto 4rem;
}
div.global1 div.glob {
    width: auto !important;
    text-align: center;
    background: var(--bg) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius) !important;
    padding: 2rem 1.5rem !important;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s ease, border-color .2s ease;
    position: relative;
    overflow: hidden;
}
div.global1 div.glob::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
    opacity: 0;
    transition: opacity .2s ease;
}
div.global1 div.glob:hover {
    box-shadow: var(--shadow);
    border-color: transparent;
}
div.global1 div.glob:hover::before { opacity: 1; }

div.global1 div.glob img.main {
    width: 100%;
    max-width: 100% !important;
    height: auto;            /* keep natural aspect ratio — no square crop */
    object-fit: contain;
    border-radius: var(--radius-sm) !important;
    margin-bottom: .35rem;
}
div.global1 div.glob h3 {
    font-family: var(--font-disp);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -.01em;
    padding: .6rem 0 .2rem !important;
    margin: 0;
}
div.global1 div.glob h3 a { color: var(--ink) !important; }
div.global1 div.glob:hover h3 a {
    color: var(--brand) !important;
}
div.global1 div.glob p {
    color: var(--ink-soft);
    font-size: 1rem;
    margin: .25rem 0 0;
}

/* recent-blog list inside the blog card */
div.global1 div.glob ul.recent-blog { margin-top: 1rem; }
div.global1 div.glob ul.recent-blog li {
    border-top: 1px solid var(--border);
    padding: .7rem .25rem;
}
div.global1 div.glob ul.recent-blog a {
    color: var(--ink);
    font-weight: 500;
}
div.global1 div.glob ul.recent-blog a:hover { color: var(--brand); }
div.global1 div.glob ul.recent-blog span { color: var(--muted); }

/* ============================================================
   SIBLING-PAGE BLOCK  (.global1.global1-mini)
   "More in this section" tiles at the bottom of interior pages.
   No images here — keep them small and quiet, no colored panel.
   ============================================================ */
div.global1.global1-mini {
    background: none !important;            /* drop the beige panel */
    margin: 4rem auto 0 !important;
    padding: 2.5rem 0 0 !important;
    border-top: 1px solid var(--border);    /* separate with a divider instead */
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem !important;
}
/* section label (per-page, e.g. "More in Mobile development") spanning the row */
div.global1.global1-mini > h2.section-more {
    grid-column: 1 / -1;
    text-align: left;
    border: none;
    padding: 0;
    font-family: var(--font-disp);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -.01em;
    color: var(--ink);
    margin: 0 0 .25rem;
}
div.global1.global1-mini div.glob {
    width: auto !important;
    min-height: 0 !important;
    padding: 1.05rem 1.15rem !important;
    text-align: left;
    background: var(--surface) !important;
    border: 1px solid var(--border);
    box-shadow: none;
}
div.global1.global1-mini div.glob::before { display: none; }   /* no gradient bar */
div.global1.global1-mini div.glob:hover {
    background: var(--bg) !important;
    border-color: var(--brand);
    box-shadow: var(--shadow-sm);
}
div.global1.global1-mini div.glob h3 {
    font-size: 1.02rem !important;
    padding: 0 0 .25rem !important;
}
div.global1.global1-mini div.glob p {
    font-size: .88rem;
    margin: 0;
}
@media screen and (max-width: 980px) {
    div.global1.global1-mini { grid-template-columns: repeat(3, 1fr); }
}
@media screen and (max-width: 640px) {
    div.global1.global1-mini { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
p.button a.button,
input[type="submit"] {
    background: linear-gradient(135deg, var(--brand), var(--brand-2)) !important;
    border: none !important;
    color: #fff !important;
    font-family: var(--font-body);
    font-weight: 600;
    padding: .8em 1.6em !important;
    border-radius: var(--radius-pill) !important;
    box-shadow: 0 6px 18px var(--ring);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
    letter-spacing: 0;
}
p.button a.button:hover,
input[type="submit"]:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 10px 26px var(--ring);
    background: linear-gradient(135deg, var(--brand), var(--brand-2)) !important;
    color: #fff !important;
    border: none !important;
}
input[type="submit"]:disabled {
    background: var(--surface-2) !important;
    color: var(--muted) !important;
    box-shadow: none;
}

/* ============================================================
   SOFTWARE COURSES (section refresh — shared bits, not a template)
   ============================================================ */
/* small badge on the course landing cards */
.course-badge {
    display: inline-block;
    margin: 0 0 .35rem;
    padding: .2rem .75rem;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    color: var(--brand);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
}

/* quick-facts strip (training pages) */
ul.course-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: .5rem 0 1.75rem;
    padding: 0;
    list-style: none;
}
ul.course-facts li {
    flex: 1 1 0;
    min-width: 9rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .85rem 1.1rem;
    margin: 0;
}
ul.course-facts .k {
    display: block;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    margin-bottom: .25rem;
}
ul.course-facts .v { font-weight: 600; font-family: var(--font-disp); }

/* left-aligned CTA used inline on course pages */
p.button.course-cta {
    text-align: left;
    padding: 0;
    margin: 0 0 2.5rem;
}

/* static buttons — no hover lift / transition / letter-spacing shift.
   Covers explicitly-tagged .no-anim buttons and all course CTA buttons
   (e.g. "Enquire about this training", "Visit course.raku.org"). */
p.button a.button.no-anim,
p.button a.button.no-anim:hover,
a.button.no-anim,
a.button.no-anim:hover,
p.button.course-cta a.button,
p.button.course-cta a.button:hover {
    transform: none !important;
    filter: none !important;
    transition: none !important;
    letter-spacing: 0 !important;
    box-shadow: 0 6px 18px var(--ring) !important;
}

/* syllabus / course outline blocks */
.content pre {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem 1.4rem;
    overflow-x: auto;
    line-height: 1.55;
    font-size: .9rem;
    color: var(--ink-soft);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* collapsible "Day N" syllabus panels (built by the script in layout.xslt) */
details.day {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin: 0 0 .75rem;
    background: var(--bg);
    overflow: hidden;
}
details.day > summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1.25rem;
    background: var(--surface);
    font-family: var(--font-disp);
    font-weight: 700;
    font-size: 1.1rem;
    transition: color .15s ease, background .15s ease;
}
details.day > summary::-webkit-details-marker { display: none; }
details.day > summary::after {
    content: "+";
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--brand);
}
details.day[open] > summary::after { content: "\2013"; }   /* – */
details.day > summary:hover { color: var(--brand); }
details.day[open] > summary { border-bottom: 1px solid var(--border); }
/* the syllabus body sits flush inside the panel */
details.day > pre {
    margin: 0;
    border: none;
    border-radius: 0;
    background: var(--bg);
}
details.day > ol,
details.day > ul {
    margin: 0;
    padding: 1.1rem 1.5rem 1.1rem 3rem;
}
details.day > ol { columns: 16rem auto; column-gap: 2.5rem; }
details.day > ol li,
details.day > ul li {
    list-style: revert;
    margin: 0 0 .4rem;
    line-height: 1.5;
    break-inside: avoid;
}

/* framed screenshots / figures */
.course-figure { text-align: center; margin: 2rem 0; }
.course-figure img {
    max-width: min(100%, 720px) !important;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
/* plain centered image — no framing panel (border/shadow) behind it */
.course-figure.no-frame img {
    border: none;
    box-shadow: none;
    border-radius: 0;
}

/* ============================================================
   BOOK PAGES (Books section)
   ============================================================ */
p.book-format {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted);
    margin: 0 0 .25rem;
}
.book-cover { text-align: center; margin: 1.5rem 0 1.75rem; }
.book-cover img {
    max-width: min(85%, 460px) !important;
    max-height: none !important;
    height: auto;
    box-shadow: 0 18px 44px rgba(14,19,32,.24), 0 4px 12px rgba(14,19,32,.12);
}
p.book-meta {
    text-align: center;
    color: var(--ink-soft);
    line-height: 1.7;
    margin-top: 0;
}
p.book-meta b { font-family: var(--font-disp); font-size: 1.1rem; }

/* highlighted publication-details block (ISBN, credits) */
.book-pub {
    max-width: 32rem;
    margin: 0 auto 2.5rem;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    color: var(--ink-soft);
    font-size: .92rem;
    line-height: 1.7;
}
.book-pub p { margin: 0; }
.book-pub p + p { margin-top: .7rem; }
.book-pub .isbn {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .02em;
    color: var(--ink);
}
.book-pub .isbn .fmt {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .72rem;
    color: var(--muted);
    margin-left: .4rem;
}
.book-pub .barcode {
    margin: .8rem 0 .2rem;
}
/* space between stacked ISBN/barcode pairs */
.book-pub .barcode + .isbn { margin-top: 1.4rem; }
.book-pub .barcode svg {
    width: 200px;
    max-width: 70%;
    height: auto;
    display: inline-block;
}

/* table of contents — clean multi-column list with dividers */
ul.book-contents {
    list-style: none;
    margin: 1rem 0 2.5rem;
    padding: 0;
    columns: 17rem auto;
    column-gap: 2.75rem;
}
ul.book-contents li {
    break-inside: avoid;
    margin: 0;
    padding: .6rem 1.4rem .6rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--ink-soft);
    line-height: 1.4;
}
ul.book-contents li:hover { color: var(--ink); }

/* prominent resource buttons (free PDF download, GitHub code examples) */
p.resource-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 1rem 0 2rem;
}
a.btn-pdf, a.btn-pdf:visited,
a.btn-github, a.btn-github:visited {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .8em 1.5em;
    border-radius: var(--radius-pill);
    font-weight: 600;
    text-decoration: none;
    color: #fff;
}
a.btn-pdf::before, a.btn-github::before {
    content: "";
    width: 1.2em;
    height: 1.2em;
    background: currentColor;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center;  mask-position: center;
    -webkit-mask-size: contain;     mask-size: contain;
}
/* free PDF — brand gradient */
a.btn-pdf {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 8px 22px var(--ring);
}
a.btn-pdf:hover { color: #fff; filter: brightness(1.06); }
a.btn-pdf::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2z'/%3E%3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2z'/%3E%3C/svg%3E");
}
/* GitHub — dark, with a soft glow so it stands out */
a.btn-github {
    background: #1f2328;
    box-shadow: 0 8px 24px rgba(31,35,40,.4);
}
a.btn-github:hover { color: #fff; background: #2c333a; }
a.btn-github::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 .5C5.7.5.5 5.7.5 12c0 5.1 3.3 9.4 7.9 10.9.6.1.8-.3.8-.6v-2c-3.2.7-3.9-1.5-3.9-1.5-.5-1.3-1.3-1.7-1.3-1.7-1.1-.7.1-.7.1-.7 1.2.1 1.8 1.2 1.8 1.2 1 1.8 2.8 1.3 3.5 1 .1-.8.4-1.3.8-1.6-2.6-.3-5.3-1.3-5.3-5.8 0-1.3.5-2.3 1.2-3.1-.1-.3-.5-1.5.1-3.1 0 0 1-.3 3.3 1.2a11.5 11.5 0 0 1 6 0C17 4.7 18 5 18 5c.6 1.6.2 2.8.1 3.1.8.8 1.2 1.8 1.2 3.1 0 4.5-2.7 5.5-5.3 5.8.4.4.8 1.1.8 2.2v3.3c0 .3.2.7.8.6 4.6-1.5 7.9-5.8 7.9-10.9C23.5 5.7 18.3.5 12 .5z'/%3E%3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 .5C5.7.5.5 5.7.5 12c0 5.1 3.3 9.4 7.9 10.9.6.1.8-.3.8-.6v-2c-3.2.7-3.9-1.5-3.9-1.5-.5-1.3-1.3-1.7-1.3-1.7-1.1-.7.1-.7.1-.7 1.2.1 1.8 1.2 1.8 1.2 1 1.8 2.8 1.3 3.5 1 .1-.8.4-1.3.8-1.6-2.6-.3-5.3-1.3-5.3-5.8 0-1.3.5-2.3 1.2-3.1-.1-.3-.5-1.5.1-3.1 0 0 1-.3 3.3 1.2a11.5 11.5 0 0 1 6 0C17 4.7 18 5 18 5c.6 1.6.2 2.8.1 3.1.8.8 1.2 1.8 1.2 3.1 0 4.5-2.7 5.5-5.3 5.8.4.4.8 1.1.8 2.2v3.3c0 .3.2.7.8.6 4.6-1.5 7.9-5.8 7.9-10.9C23.5 5.7 18.3.5 12 .5z'/%3E%3C/svg%3E");
}

/* ============================================================
   BLOG
   ============================================================ */
.blog-list, .blog-article { max-width: 720px; }
.blog-article h2, .blog-article h3 { font-family: var(--font-disp); letter-spacing: -.01em; }
.blog-preview h2 a { color: var(--ink); }
.blog-preview h2 a:hover { color: var(--brand); }
.blog-article blockquote { border-left: 4px solid var(--brand); }
.blog-article pre {
    background: #0d1020;
    color: #e7e9f3;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}
.blog-article pre code { color: inherit; }
.blog-article code { background: var(--surface-2); }

/* ============================================================
   FOOTER  (.short-footer)
   ============================================================ */
.short-footer-holder {
    border-top: 1px solid var(--border);
    background: var(--surface);
    margin-top: 5rem;
    padding: 2rem 24px;
}
.short-footer {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: .25rem 0;
    max-width: var(--maxw);
}
.short-footer ul { display: flex !important; flex-wrap: wrap; justify-content: center; }
.short-footer ul li { display: inline-flex; }
.short-footer a, .short-footer a:visited {
    color: var(--ink-soft);
    padding: .4rem .9rem;
    border-radius: var(--radius-pill);
}
.short-footer a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.short-footer span {
    background: linear-gradient(135deg, var(--brand), var(--brand-2)) !important;
    color: #fff !important;
    border-radius: var(--radius-pill) !important;
    padding: .4rem .9rem !important;
}

/* floating cart pill */
div.cart-link {
    background: linear-gradient(135deg, var(--brand), var(--brand-2)) !important;
    color: #fff !important;
    border-radius: var(--radius-pill) !important;
    padding: .6em 1em !important;
    box-shadow: var(--shadow);
}
div.cart-link a { color: #fff !important; }
div.cart-link:hover { filter: brightness(1.06); }

/* status pills */
.success { background: #d6f5e4 !important; color: #0a6b3b; }
.error   { background: var(--accent) !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media screen and (max-width: 980px) {
    div.global1 { grid-template-columns: repeat(2, 1fr); }
}
@media screen and (max-width: 850px) {
    /* hamburger menu: brand stays in the bar, everything else stacks when open */
    .header { flex-wrap: wrap; padding-left: 56px; }
    .header ul#MainMenu { display: block !important; }
    .header ul#MainMenu li { display: none; }
    .header ul#MainMenu li:first-child { display: flex; margin: 0; }
    .header ul#MainMenu li:first-child a { padding-left: 2.1rem; }

    /* vertically center the sandwich with the brand row (a 2rem-tall box
       anchored at the header's top padding — stays put when the menu opens) */
    .header .sandwich {
        top: .7rem;
        left: 20px;
        height: 3rem;        /* matches the brand link's box (text + .5rem padding) */
        display: flex;
        flex-direction: column;
        justify-content: center;
        margin: 0;
        cursor: pointer;
    }
    .header .sandwich div {
        width: 24px;
        height: 2.5px;
        margin: 2.5px 0;
        border-radius: 2px;
    }

    /* breadcrumb is desktop-only context — hide it inside the mobile menu */
    .header ul#MainMenu li.sep,
    .header ul#MainMenu li.crumb-item { display: none !important; }

    /* open menu: section nav as stacked rows, then actions on one row */
    .header ul#MainMenu.open li.section-link { display: block; }
    .header ul#MainMenu li.section-link a {
        display: block;
        padding: .8rem .2rem;
        border-bottom: 1px solid var(--border);
        border-radius: 0;
        font-size: 1.05rem;
        color: var(--ink);
    }
    .header ul#MainMenu li.section-link a:hover { background: transparent; }
    .header ul#MainMenu li.section-link.current a { color: var(--brand); font-weight: 600; }

    /* theme toggle + Contact share a single row */
    .header ul#MainMenu.open li.nav-toggle,
    .header ul#MainMenu.open li.nav-cta {
        display: inline-flex;
        align-items: center;
        vertical-align: middle;
        margin: 1.2rem 0 .3rem;
    }
    .header ul#MainMenu li.nav-toggle { margin-right: .8rem; }
    .header ul#MainMenu li.nav-cta a { display: inline-block; }
}
@media screen and (max-width: 640px) {
    div.global1 { grid-template-columns: 1fr; }
    div.content { padding: 0 18px; }
    div.wide-content { padding: 0 14px; }
    .wide-content .front { border-radius: 22px; }
}

/* phone-screencast videos (mobile section) use a fixed 443px width — scale
   them down to the viewport on small screens, keeping their aspect ratio */
@media screen and (max-width: 640px) {
    .content video {
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
    }
}

/* never let a content image overflow its column. More specific rules and
   inline-sized icons are unaffected. */
.content img {
    max-width: 100%;
    height: auto;
}
/* escape-room product shots live in .big-photo, capped at 1000px — also cap
   to the container so they don't overflow narrow screens */
div.big-photo img {
    max-width: min(100%, 1000px);
    height: auto;
}
