@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,700;12..96,800&family=Archivo:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,800;1,9..144,400&display=swap');

/* ==========================================================================
   DESIGN TOKENS & SYSTEMS
   ========================================================================== */

:root {
    --ink: #13171d;
    --ink-2: #1b212a;
    --ink-3: #252d38;
    --paper: #f4f1ea;
    --paper-2: #ece7dc;
    --card: #fbf9f3;
    --line: rgba(19, 23, 29, .12);
    --muted: #5a6470;
    --accent: #c4ee45; /* acumen lime */
    
    /* Department Default Colors */
    --sales: #e6a13a;
    --dev: #27b6a2;
    --product: #dd6a47;
    
    --shadow: 0 24px 60px -38px rgba(19, 23, 29, .5);
    
    /* Active theme variables (overridden by body classes) */
    --dept: var(--accent);
    --dept-contrast: var(--ink);
    --transition-speed: 0.22s;
    --transition-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Page Themes via Body Classes */
body.page-home {
    --dept: var(--accent);
    --dept-contrast: var(--ink);
}

body.page-sales {
    --dept: var(--sales);
    --dept-contrast: var(--ink);
}

body.page-dev {
    --dept: var(--dev);
    --dept-contrast: var(--ink);
}

body.page-product {
    --dept: var(--product);
    --dept-contrast: #fff;
}

/* Serif/Dossier Theme (for RPL Personas) */
body.page-personas {
    --ink: #1d1a16;
    --ink-soft: #4a463f;
    --ink-faint: #7c7468;
    --paper: #f3ede1;
    --paper-2: #ece4d4;
    --card: #fbf7ee;
    --line: #d8cdb8;
    
    /* Colors specific to dossier page */
    --ochre: #bf5b2c;     /* ECEC */
    --clay: #a23c2c;      /* Aged Care */
    --teal: #2f5d54;      /* Nursing */
    --gold: #c79a3f;
    
    --shadow: 0 1px 0 rgba(29,26,22,.04), 0 18px 40px -28px rgba(29,26,22,.45);
}

/* ==========================================================================
   RESETS & GLOBAL STYLES
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Archivo', system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.5;
    transition: background-color var(--transition-speed) var(--transition-ease);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-speed) var(--transition-ease), 
                background-color var(--transition-speed) var(--transition-ease), 
                border-color var(--transition-speed) var(--transition-ease), 
                transform var(--transition-speed) var(--transition-ease),
                filter var(--transition-speed) var(--transition-ease);
}

.wrap {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 26px;
}

/* Custom background for personas page */
body.page-personas {
    background:
      radial-gradient(1200px 700px at 12% -10%, #fbf6ea 0%, transparent 55%),
      radial-gradient(1100px 800px at 105% 110%, #efe6d3 0%, transparent 50%),
      var(--paper);
    background-attachment: fixed;
    line-height: 1.45;
    padding: 38px 26px 64px;
}

body.page-personas::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(19, 23, 29, .92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.nav-in {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #fff;
}

.mark {
    width: 24px;
    height: 24px;
}

.brand b {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -.01em;
}

.brand span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 6px;
    align-items: center;
}

.nav-links a {
    color: #cfd5dd;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 13px;
    border-radius: 7px;
}

.nav-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .07);
}

/* For active link indicator (department subpages) */
.nav-links a.here {
    background: var(--dept);
    color: var(--dept-contrast);
    font-weight: 600;
}

/* Home page special link tags */
.nav-links a.tag {
    color: var(--ink);
    background: var(--accent);
    font-weight: 600;
}

.nav-links a.tag:hover {
    filter: brightness(1.05);
}

/* Breadcrumbs styling */
.crumb {
    background: var(--paper-2);
    border-bottom: 1px solid var(--line);
}

.crumb .wrap {
    padding: 11px 26px;
    font-size: 12px;
    color: var(--muted);
}

.crumb a:hover {
    color: var(--ink);
}

.crumb b {
    color: var(--dept);
}

/* Slim header bar for RPL personas page */
.portal-bar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: #14181d;
    color: #cfd5dd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 26px;
    font-size: 12.5px;
    margin: -38px -26px 38px; /* Negative margin to offset body padding */
}

.portal-bar .pb-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    font-weight: 700;
    letter-spacing: -.01em;
}

.portal-bar .pb-brand svg {
    width: 18px;
    height: 18px;
}

.portal-bar .pb-crumb a {
    color: #cfd5dd;
    text-decoration: none;
}

.portal-bar .pb-crumb a:hover {
    color: #fff;
}

.portal-bar .pb-crumb b {
    color: #dd6a47; /* product color */
}

.portal-bar .pb-back {
    color: #14181d;
    background: #c4ee45;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 13px;
    border-radius: 7px;
}

.portal-bar .pb-back:hover {
    filter: brightness(1.1);
}

/* ==========================================================================
   HERO SECTIONS
   ========================================================================== */

/* Main Home Hero */
.hero {
    background: var(--ink);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .5;
    background: radial-gradient(800px 380px at 88% -12%, rgba(196, 238, 69, .16), transparent 60%),
                radial-gradient(700px 500px at -8% 120%, rgba(39, 182, 162, .13), transparent 55%);
    pointer-events: none;
}

.hero .wrap {
    position: relative;
    z-index: 1;
    padding: 84px 26px 96px;
}

/* Department Hero */
.phero {
    padding: 60px 0 38px;
    border-bottom: 1px solid var(--line);
}

/* Kicker & Tagline text */
.kicker, .tagline {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--dept);
    font-weight: 700;
    margin-bottom: 24px;
}

.kicker::before, .tagline::before {
    content: "";
    width: 30px;
    height: 1.5px;
    background: var(--dept);
}

/* Home hero kicker specific color */
.page-home .kicker {
    color: var(--accent);
}
.page-home .kicker::before {
    background: var(--accent);
}

/* Headings */
h1 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: clamp(42px, 7vw, 86px);
    line-height: .95;
    letter-spacing: -.03em;
    max-width: 14ch;
}

h1 em {
    font-style: normal;
    color: var(--dept);
}

.page-home h1 em {
    color: var(--accent);
}

/* Sub-page H1 sizes */
.page-sales h1, .page-dev h1, .page-product h1 {
    font-size: clamp(38px, 6vw, 68px);
    line-height: .96;
    letter-spacing: -.025em;
    max-width: none;
}

/* Ledes */
.lede {
    margin-top: 24px;
    max-width: 56ch;
    font-size: 17px;
    color: #b9c1cb;
    line-height: 1.6;
}

.plede {
    margin-top: 18px;
    max-width: 60ch;
    font-size: 16px;
    color: var(--muted);
    line-height: 1.55;
}

/* Home Hero Meta metrics */
.hero-meta {
    margin-top: 38px;
    display: flex;
    flex-wrap: wrap;
    gap: 36px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding-top: 24px;
}

.hero-meta div b {
    display: block;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 26px;
    font-weight: 700;
}

.hero-meta div span {
    font-size: 12px;
    color: #8b95a1;
    letter-spacing: .04em;
}

/* Stats cards in subpages */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 36px 0 8px;
}

.stat {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    border-top: 4px solid var(--dept);
    box-shadow: var(--shadow);
    transition: transform var(--transition-speed) var(--transition-ease);
}

.stat:hover {
    transform: translateY(-2px);
}

.stat b {
    display: block;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--ink);
}

.stat span {
    font-size: 12px;
    color: var(--muted);
}

/* Status list in engineering */
.status {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 34px 0 8px;
}

.s {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 11px;
    box-shadow: var(--shadow);
    transition: transform var(--transition-speed) var(--transition-ease);
}

.s:hover {
    transform: translateY(-2px);
}

.led {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--dept);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--dept) 20%, transparent);
}

.led.warn {
    background: #e6a13a;
    box-shadow: 0 0 0 4px rgba(230, 161, 58, .2);
}

.s b {
    font-size: 13.5px;
    font-weight: 600;
    display: block;
    color: var(--ink);
}

.s span {
    font-size: 11.5px;
    color: var(--muted);
}

/* ==========================================================================
   SECTIONS & LAYOUT GRIDS
   ========================================================================== */

section {
    padding: 64px 0;
}

/* Hub pages use tighter spacing */
.page-sales section, .page-dev section, .page-product section {
    padding: 44px 0;
}

.sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 14px;
}

.sec-head h2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -.01em;
}

.sec-head p {
    font-size: 13px;
    color: var(--muted);
}

/* Grids */
.depts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.quick {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.grid3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.twocol {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
    align-items: start;
}

/* ==========================================================================
   COMPONENTS & CARDS
   ========================================================================== */

/* Home page department cards */
.dept {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 26px 24px 22px;
    overflow: hidden;
    transition: transform var(--transition-speed) var(--transition-ease), 
                box-shadow var(--transition-speed) var(--transition-ease);
    box-shadow: var(--shadow);
}

.dept:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 70px -30px rgba(19, 23, 29, .6);
}

.dept::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: var(--c);
}

.dept .ix {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--c);
    letter-spacing: .12em;
}

.dept h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 30px;
    margin: 10px 0 8px;
    letter-spacing: -.01em;
}

.dept p {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.55;
    min-height: 62px;
}

.dept ul {
    list-style: none;
    margin: 14px 0 18px;
}

.dept li {
    font-size: 12.5px;
    color: var(--ink);
    padding: 6px 0;
    border-top: 1px dashed var(--line);
    display: flex;
    gap: 8px;
}

.dept li::before {
    content: "›";
    color: var(--c);
    font-weight: 700;
}

.dept.sales {
    --c: var(--sales);
}

.dept.dev {
    --c: var(--dev);
}

.dept.product {
    --c: var(--product);
}

/* General CTA/Enter Button */
.enter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    background: var(--paper-2);
    padding: 9px 16px;
    border-radius: 8px;
    transition: background-color var(--transition-speed) var(--transition-ease),
                color var(--transition-speed) var(--transition-ease);
}

.enter:hover {
    background: var(--c, var(--dept));
    color: #fff;
}

/* Quick links cards */
.ql {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    box-shadow: var(--shadow);
    transition: border-color var(--transition-speed) var(--transition-ease), 
                transform var(--transition-speed) var(--transition-ease);
}

.ql:hover {
    border-color: var(--ink);
    transform: translateY(-2px);
}

.ql .ic {
    font-size: 18px;
}

.ql h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 10px 0 3px;
}

.ql span {
    font-size: 12px;
    color: var(--muted);
}

/* Announcement Banner */
.announce {
    background: var(--ink);
    color: #fff;
    border-radius: 14px;
    padding: 30px 32px;
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: var(--shadow);
}

.announce .badge {
    font-size: 10.5px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
    border: 1px solid rgba(196, 238, 69, .4);
    padding: 5px 10px;
    border-radius: 20px;
}

.announce p {
    flex: 1;
    min-width: 240px;
    font-size: 15px;
    color: #d7dde4;
}

.announce b {
    color: #fff;
}

/* Subpage resource tiles */
.tile {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 22px;
    box-shadow: var(--shadow);
    transition: transform var(--transition-speed) var(--transition-ease),
                border-color var(--transition-speed) var(--transition-ease);
}

.tile:hover {
    transform: translateY(-3px);
    border-color: var(--dept);
}

.tile .ic {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--dept) 18%, transparent);
    display: grid;
    place-items: center;
    font-size: 18px;
    margin-bottom: 13px;
}

.tile h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 19px;
    margin-bottom: 6px;
}

.tile p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

.tile a.link {
    display: inline-block;
    margin-top: 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--dept);
}

.tile code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    background: var(--paper-2);
    padding: 2px 4px;
    border-radius: 4px;
}

/* Data panels & list tables */
.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.panel h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 14px;
}

.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    font-size: 13.5px;
}

.row:first-of-type {
    border-top: none;
}

.row .name {
    font-weight: 500;
}

.pill {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    background: var(--paper-2);
    color: var(--muted);
}

.pill.win {
    background: color-mix(in srgb, var(--dept) 22%, transparent);
    color: #8a5a12;
}

/* Horizontal bar charts in team metrics */
.bar {
    height: 9px;
    border-radius: 6px;
    background: var(--paper-2);
    overflow: hidden;
    margin-top: 7px;
}

.bar i {
    display: block;
    height: 100%;
    background: var(--dept);
    border-radius: 6px;
}

/* Repository card in engineering */
.repo {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.repo h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 14px;
}

.rrow {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 0;
    border-top: 1px solid var(--line);
}

.rrow:first-of-type {
    border-top: none;
}

.rrow .nm {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    flex: 1;
}

.rrow .lang {
    font-size: 11px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.rrow .pill {
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--dept) 18%, transparent);
    color: #1c7a6e;
}

.rrow .pill.red {
    background: rgba(221, 106, 71, .18);
    color: #b14a2e;
}

/* Featured Card & Preview elements */
.feature {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--card);
}

.feature .meat {
    padding: 34px 34px 30px;
}

.feature .badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 10.5px;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--dept);
    background: color-mix(in srgb, var(--dept) 14%, transparent);
    padding: 5px 11px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.feature h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: 32px;
    line-height: 1.05;
    letter-spacing: -.02em;
}

.feature p {
    margin-top: 12px;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    max-width: 46ch;
}

.feature .meta {
    margin-top: 18px;
    display: flex;
    gap: 22px;
    font-size: 12px;
    color: var(--muted);
}

.feature .meta b {
    display: block;
    color: var(--ink);
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 17px;
}

.feature .cta {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 24px;
    background: var(--dept);
    color: var(--dept-contrast);
    font-weight: 600;
    font-size: 14px;
    padding: 12px 22px;
    border-radius: 9px;
    transition: filter var(--transition-speed) var(--transition-ease),
                transform var(--transition-speed) var(--transition-ease);
}

.feature .cta:hover {
    filter: brightness(1.06);
    transform: translateX(2px);
}

/* Mini Persona Preview */
.preview {
    background: #f3ede1;
    border-left: 1px solid var(--line);
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    justify-content: center;
}

.pchip {
    background: #fbf7ee;
    border: 1px solid #d8cdb8;
    border-radius: 7px;
    padding: 11px 13px;
    border-left: 4px solid var(--pc);
    transition: transform var(--transition-speed) var(--transition-ease);
}

.pchip:hover {
    transform: translateX(3px);
}

.pchip .a {
    font-size: 9px;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--pc);
}

.pchip .n {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 16px;
    margin-top: 1px;
}

.pchip .d {
    font-size: 11px;
    color: #7c7468;
}

/* ==========================================================================
   DOSSIER / SERIF THEME (RPL Personas Page)
   ========================================================================== */

.serif-theme .sheet {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
}

/* Masthead styling */
.serif-theme .mast {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: end;
    border-bottom: 2.5px solid var(--ink);
    padding-bottom: 16px;
}

.serif-theme .eyebrow {
    font-size: 11px;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: var(--clay);
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.serif-theme .eyebrow::after {
    content: "";
    height: 1px;
    width: 54px;
    background: var(--clay);
    opacity: .5;
}

.serif-theme h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: clamp(34px, 5.4vw, 62px);
    line-height: .96;
    letter-spacing: -.015em;
    max-width: none;
}

.serif-theme h1 em {
    font-style: italic;
    font-weight: 400;
    color: var(--clay);
}

.serif-theme .sub {
    margin-top: 12px;
    max-width: 60ch;
    color: var(--ink-soft);
    font-size: 14px;
}

.serif-theme .mast-meta {
    text-align: right;
    font-size: 11.5px;
    color: var(--ink-faint);
    line-height: 1.7;
}

.serif-theme .mast-meta b {
    color: var(--ink);
    font-weight: 600;
}

/* Legend styling */
.serif-theme .legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    margin: 14px 0 26px;
    font-size: 11.5px;
    color: var(--ink-soft);
    letter-spacing: .02em;
}

.serif-theme .key {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 500;
}

.serif-theme .dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

.serif-theme .d-ecec { background: var(--ochre); }
.serif-theme .d-aged { background: var(--clay); }
.serif-theme .d-nurse { background: var(--teal); }

.serif-theme .legend .spacer {
    flex: 1;
}

.serif-theme .legend .note {
    font-style: italic;
    color: var(--ink-faint);
}

/* Dossier Grid & Cards */
.serif-theme .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.serif-theme .card {
    grid-column: span 1;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 20px 20px 18px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(14px);
    animation: rise .7s cubic-bezier(.2, .7, .2, 1) forwards;
}

.serif-theme .card.wide {
    grid-column: span 3;
}

.serif-theme .card:nth-child(1) { animation-delay: .05s; }
.serif-theme .card:nth-child(2) { animation-delay: .13s; }
.serif-theme .card:nth-child(3) { animation-delay: .21s; }
.serif-theme .card:nth-child(4) { animation-delay: .29s; }
.serif-theme .card:nth-child(5) { animation-delay: .37s; }

@keyframes rise {
    to {
        opacity: 1;
        transform: none;
    }
}

.serif-theme .card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.serif-theme .card.ecec::before  { background: var(--ochre); }
.serif-theme .card.aged::before  { background: var(--clay); }
.serif-theme .card.nurse::before { background: var(--teal); }

/* Wide cards span the full row — no sector colour bar needed */
.serif-theme .card.wide::before  { display: none; }

.serif-theme .c-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 4px;
}

.serif-theme .pnum {
    font-family: 'Fraunces', serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-faint);
    border: 1px solid var(--line);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    flex: none;
}

.serif-theme .archetype {
    font-size: 10.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-weight: 700;
}

.serif-theme .ecec .archetype { color: var(--ochre); }
.serif-theme .aged .archetype { color: var(--clay); }
.serif-theme .nurse .archetype { color: var(--teal); }

.serif-theme .pname {
    font-family: 'Fraunces', serif;
    font-size: 27px;
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.04;
    margin: 2px 0 7px;
}

.serif-theme .pname em {
    font-style: italic;
    font-weight: 400;
}

.serif-theme .who {
    font-size: 12px;
    color: var(--ink-faint);
    margin-bottom: 11px;
}

.serif-theme .who b {
    color: var(--ink-soft);
    font-weight: 600;
}

.serif-theme .qual {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .02em;
    padding: 3px 9px;
    border-radius: 20px;
    margin-bottom: 13px;
    background: var(--paper-2);
    color: var(--ink-soft);
    border: 1px solid var(--line);
}

.serif-theme .field {
    margin-bottom: 11px;
}

.serif-theme .lbl {
    font-size: 9.5px;
    letter-spacing: .2em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ink-faint);
    margin-bottom: 4px;
}

.serif-theme .why {
    font-size: 12.5px;
    color: var(--ink);
    font-style: italic;
    font-family: 'Fraunces', serif;
    line-height: 1.4;
}

.serif-theme .ev {
    list-style: none;
    font-size: 11.5px;
    color: var(--ink-soft);
}

.serif-theme .ev li {
    padding-left: 13px;
    position: relative;
    margin-bottom: 3px;
    line-height: 1.35;
}

.serif-theme .ev li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--ink-faint);
}

.serif-theme .gem {
    margin-top: 13px;
    padding: 11px 12px;
    border-radius: 6px;
    background: linear-gradient(180deg, #fdfaf2, #f8f1e1);
    border: 1px solid var(--line);
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.serif-theme .gem .lbl {
    color: var(--clay);
    display: flex;
    align-items: center;
    gap: 6px;
}

.serif-theme .gem .lbl::before {
    content: "✦";
    font-size: 11px;
}

.serif-theme .gem p {
    font-size: 11.5px;
    color: var(--ink);
    line-height: 1.4;
}

.serif-theme .gem code {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 11px;
    color: var(--clay);
    background: rgba(162, 60, 44, .08);
    padding: 1px 5px;
    border-radius: 3px;
}

.serif-theme .nurse .gem .lbl { color: var(--teal); }
.serif-theme .nurse .gem code { color: var(--teal); background: rgba(47, 93, 84, .09); }
.serif-theme .ecec .gem .lbl { color: var(--ochre); }
.serif-theme .ecec .gem code { color: var(--ochre); background: rgba(191, 91, 44, .09); }

.serif-theme .flag {
    margin-top: 9px;
    font-size: 10.5px;
    color: var(--ink-soft);
    border-left: 2px solid var(--gold);
    padding: 2px 0 2px 9px;
    line-height: 1.35;
}

.serif-theme .flag b {
    color: var(--ink);
    font-weight: 700;
}

/* Eligibility Firewall section */
.serif-theme .firewall {
    margin-top: 18px;
}

.serif-theme .firewall .lbl {
    color: var(--ink);
    font-size: 10.5px;
    margin-bottom: 14px;
}

.serif-theme .fw-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.serif-theme .fw {
    padding-left: 13px;
    border-left: 3px solid;
}

.serif-theme .fw:nth-child(1) { border-color: var(--teal); }
.serif-theme .fw:nth-child(2) { border-color: var(--gold); }
.serif-theme .fw:nth-child(3) { border-color: var(--clay); }
.serif-theme .fw:nth-child(4) { border-color: var(--ink-faint); }

.serif-theme .fw h4 {
    font-family: 'Fraunces', serif;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.serif-theme .fw p {
    font-size: 11px;
    color: var(--ink-soft);
    line-height: 1.4;
}

.serif-theme .colophon {
    margin-top: 26px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 10.5px;
    color: var(--ink-faint);
}

.serif-theme .colophon b {
    color: var(--ink-soft);
    font-weight: 600;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

/* Tighter top padding — for sections that follow another section closely */
section.flush {
    padding-top: 6px;
}

/* Language dot colors in the repository list */
.lang-python     { background: var(--dev); }       /* teal  #27b6a2 */
.lang-typescript { background: var(--sales); }     /* gold  #e6a13a */
.lang-go         { background: var(--product); }   /* coral #dd6a47 */

/* Bar chart labels (sales quota panel) */
.bar-caption {
    font-size: 13px;
    color: var(--muted);
}

.bar-label {
    font-size: 13px;
    font-weight: 500;
    margin-top: 14px;
}

.bar-caption + .bar-label {
    margin-top: 16px; /* First label sits further from the caption */
}

/* Enter button — accent (lime) fill variant, used in announcement CTAs */
.enter.accent {
    background: var(--accent);
}

/* Persona chip colour variants — removes the need for inline --pc CSS vars */
.pchip.ecec  { --pc: #bf5b2c; }   /* ECEC / ochre */
.pchip.aged  { --pc: #a23c2c; }   /* Aged Care / clay */
.pchip.nurse { --pc: #2f5d54; }   /* Nursing / teal */

/* Sign-out link — sits in nav-links, styled as a subtle destructive action */
.nav-links .signout {
    margin-left: auto;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted) !important;
    opacity: .7;
    border: 1px solid var(--line);
    padding: 3px 10px;
    border-radius: 20px;
    transition: opacity .18s, color .18s;
    text-decoration: none !important;
}
.nav-links .signout:hover { opacity: 1; color: var(--ink) !important; }

/* ==========================================================================
   FOOTER
   ========================================================================== */

footer {
    background: var(--ink);
    color: #8b95a1;
    margin-top: 30px;
}

/* subpages might want slightly different margins */
.page-sales footer, .page-dev footer, .page-product footer {
    margin-top: 34px;
}

footer .wrap {
    padding: 34px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12px;
}

.page-sales footer .wrap, .page-dev footer .wrap, .page-product footer .wrap {
    padding: 30px 26px;
}

footer .brand b {
    font-size: 15px;
    color: #fff;
}

/* ==========================================================================
   RESPONSIVENESS (MEDIA QUERIES)
   ========================================================================== */

@media(max-width: 880px) {
    .depts {
        grid-template-columns: 1fr;
    }

    .quick {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid3 {
        grid-template-columns: 1fr;
    }

    .twocol {
        grid-template-columns: 1fr;
    }

    /* Collapse navigation links on mobile */
    .page-home .nav-links a:not(.tag) {
        display: none;
    }

    .page-sales .nav-links a:not(.here),
    .page-dev .nav-links a:not(.here),
    .page-product .nav-links a:not(.here) {
        display: none;
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .status {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .feature {
        grid-template-columns: 1fr;
    }

    .preview {
        border-left: none;
        border-top: 1px solid var(--line);
    }
}

@media(max-width: 900px) {
    .serif-theme .grid, 
    .serif-theme .fw-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .serif-theme .card.wide {
        grid-column: span 2;
    }
    .serif-theme .mast {
        grid-template-columns: 1fr;
    }
    .serif-theme .mast-meta {
        text-align: left;
    }
}

@media(max-width: 560px) {
    .serif-theme .grid,
    .serif-theme .fw-grid {
        grid-template-columns: 1fr;
    }
    .serif-theme .card.wide,
    .serif-theme .card {
        grid-column: span 1;
    }
}

/* Print styling for personas */
@media print {
    body.page-personas {
        background: #fff;
        padding: 0;
    }
    body.page-personas::before {
        display: none;
    }
    .serif-theme .card {
        box-shadow: none;
        break-inside: avoid;
    }
    .serif-theme .grid {
        gap: 10px;
    }
    .portal-bar {
        display: none;
    }
}
