:root {
    --ink-navy: #0E1116;
    --ink-deep: #070A10;
    --ink-panel: #11151D;
    --cream: #EDE4CE;
    --cream-dim: #B8AE94;
    --cream-faint: rgba(237, 228, 206, 0.18);
    --cream-rule: rgba(237, 228, 206, 0.10);
    --r1: #E63946;
    --r2: #F2884B;
    --r3: #F4C430;
    --r4: #3FB950;
    --r5: #3FC1C9;
    --display: "Bricolage Grotesque", system-ui, sans-serif;
    --body: "Familjen Grotesk", system-ui, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
/* Always reserve the vertical scrollbar gutter so navigating between a tall page
   (library, with a scrollbar) and a short one (e.g. "No survey yet.", without)
   doesn't shift the centered column sideways. scrollbar-gutter is not honoured by
   this document's scroll model, so force the track instead. */
html { overflow-y: scroll; }
body {
    font-family: var(--body);
    margin: 0; padding: 0; min-height: 100vh; color: var(--cream);
    background-color: var(--ink-deep);
    background-image:
        radial-gradient(ellipse 55% 50% at 78% 38%, rgba(63, 193, 201, 0.18), transparent 70%),
        radial-gradient(ellipse 40% 30% at 82% 62%, rgba(242, 136, 75, 0.14), transparent 70%),
        radial-gradient(ellipse at 50% 50%, var(--ink-navy) 0%, var(--ink-deep) 100%);
    background-attachment: fixed;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMDAgMjAwIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgYXJpYS1oaWRkZW49InRydWUiPgogIDxmaWx0ZXIgaWQ9Im4iPgogICAgPGZlVHVyYnVsZW5jZSB0eXBlPSJmcmFjdGFsTm9pc2UiIGJhc2VGcmVxdWVuY3k9IjEuNiIgbnVtT2N0YXZlcz0iMiIgc2VlZD0iNyIgc3RpdGNoVGlsZXM9InN0aXRjaCIvPgogICAgPGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDAuOTMKICAgICAgICAgICAgICAgICAgICAgICAgICAgMCAwIDAgMCAwLjg5CiAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgMCAwIDAgMC44MQogICAgICAgICAgICAgICAgICAgICAgICAgICAwIDAgMCAwLjA0NSAwIi8+CiAgPC9maWx0ZXI+CiAgPHJlY3Qgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiIGZpbHRlcj0idXJsKCNuKSIvPgo8L3N2Zz4K");
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.5;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 9000;
}
.header { padding: 28px 30px; position: relative; z-index: 1; }
.header-content { display: flex; justify-content: space-between; align-items: center; max-width: 1080px; margin: 0 auto; }
.logo { display: inline-block; line-height: 0; text-decoration: none; }
.logo img { height: 80px; width: auto; display: block; }
.sessions-link {
    font-family: var(--mono); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--ink-deep); background: var(--r5);
    border-radius: 4px; padding: 10px 18px; text-decoration: none;
}
.sessions-link:hover { background: #5fd4db; }
.rainbow-band {
    height: 6px; position: relative; z-index: 1;
    background: linear-gradient(90deg,
        var(--r1) 0 20%, var(--r2) 20% 40%, var(--r3) 40% 60%, var(--r4) 60% 80%, var(--r5) 80% 100%);
}
.main-content { max-width: 1080px; margin: 0 auto; padding: 3rem 30px 4rem; position: relative; z-index: 1; }
.main-content.materials-narrow { max-width: 560px; }
h1 { font-family: var(--display); font-size: 3rem; font-weight: 800; color: var(--cream); margin-top: 0; margin-bottom: 1.25rem; line-height: 0.95; letter-spacing: -0.02em; }
.subtitle {
    display: inline-block; font-family: var(--mono); font-size: 0.85rem; font-weight: 500;
    letter-spacing: 0.4em; text-transform: uppercase; color: var(--cream-dim);
    margin: 0 0 3rem; padding-left: 14px; border-left: 3px solid var(--r2);
}
.subtitle a { color: var(--r5); text-decoration: none; }
.subtitle a:hover { text-decoration: underline; }
.section-header {
    display: flex; align-items: center; gap: 0.85rem; font-family: var(--display);
    font-size: 1.6rem; font-weight: 800; color: var(--cream); letter-spacing: -0.01em;
    margin-top: 3rem; margin-bottom: 1.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--cream-rule);
}
.section-header:first-of-type { margin-top: 0; }
.section-no { font-family: var(--mono); font-size: 1.05rem; font-weight: 700; letter-spacing: 0.2em; color: var(--cream-dim); }
.section-no.n1 { color: var(--r1); }
.section-no.n2 { color: var(--r2); }
.section-no.n3 { color: var(--r3); }
.section-no.n4 { color: var(--r4); }
.section-no.n5 { color: var(--r5); }
.subsection-header { font-family: var(--display); font-size: 1.2rem; font-weight: 800; color: var(--cream); margin: 1.5rem 0 0.75rem; }
.resource-list { display: block; grid-template-columns: none; list-style: none; padding: 0; margin: 0 0 1rem; }
.resource-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--cream-rule); }
.resource-list li:last-child { border-bottom: none; }
.resource-list a { color: var(--r5); font-weight: 600; text-decoration: none; }
.resource-list a:hover { text-decoration: underline; }
.resource-domain { color: var(--cream-dim); font-size: 0.85rem; }
.by-me-badge {
    display: inline-block; font-family: var(--mono); font-size: 0.62rem; font-weight: 600;
    color: var(--r5); background: transparent; border: 1px solid var(--r5); border-radius: 999px;
    padding: 2px 10px; margin-left: 0.5rem; text-transform: uppercase; letter-spacing: 0.16em; vertical-align: middle;
}
.podcast-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.podcast-item { display: flex; flex-direction: column; gap: 0.4rem; padding: 1.5rem; background-color: var(--ink-panel); border: 1px solid var(--cream-faint); border-radius: 6px; }
.podcast-title { font-family: var(--display); font-weight: 800; font-size: 1.1rem; color: var(--r5); text-decoration: none; line-height: 1.2; }
.podcast-title:hover { text-decoration: underline; }
.podcast-show { font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cream-dim); }
.podcast-desc { margin: 0.25rem 0 0; color: var(--cream-dim); font-size: 0.95rem; line-height: 1.45; }
ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.material-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1rem; padding: 1.5rem; background-color: var(--ink-panel); border: 1px solid var(--cream-faint); border-radius: 6px; }
.material-thumbnail { width: 120px; height: auto; box-shadow: 0 4px 16px rgba(0,0,0,0.45); }
.material-info { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; width: 100%; }
.material-title { font-family: var(--display); font-weight: 800; font-size: 1.1rem; color: var(--cream); }
.material-subtitle { font-weight: 400; color: var(--cream-dim); font-size: 0.95rem; line-height: 1.4; }
.download-link {
    display: inline-block; padding: 10px 24px; background-color: var(--r5); color: var(--ink-deep);
    text-decoration: none; font-weight: 700; font-size: 0.9rem; border-radius: 4px;
    transition: background-color 0.2s, transform 0.1s; width: fit-content; border: none; cursor: pointer;
}
.download-link:hover { background-color: #5fd4db; transform: translateY(-1px); }
.login-form { display: flex; flex-direction: column; gap: 1rem; max-width: 360px; }
.login-form input {
    padding: 12px 16px; font-size: 1rem; font-family: var(--body);
    background-color: var(--ink-panel); border: 1px solid var(--cream-rule);
    border-radius: 4px; width: 100%; color: var(--cream);
}
.login-form input::placeholder { color: var(--cream-dim); }
.login-form input:focus { outline: none; border-color: var(--r5); box-shadow: 0 0 0 2px rgba(63, 193, 201, 0.35); }
.notice { background-color: var(--ink-panel); border: 1px solid var(--cream-faint); border-radius: 4px; padding: 1.5rem; font-size: 1.05rem; color: var(--cream); margin-bottom: 1.5rem; }
.intake-card { background-color: var(--ink-panel); border: 1px solid var(--cream-faint); border-radius: 6px; padding: 1.75rem 1.75rem 2rem; margin-bottom: 2.5rem; }
.intake-card .section-header { margin-top: 0; }
.intake-intro { color: var(--cream-dim); font-size: 1rem; line-height: 1.5; margin: 0 0 1.5rem; max-width: 48ch; }
.intake-note { background: rgba(244, 196, 48, 0.10); border: 1px solid rgba(244, 196, 48, 0.30); border-left: 3px solid var(--r3); border-radius: 4px; padding: 0.85rem 1.1rem; margin: 0 0 1.75rem; max-width: 48ch; color: var(--cream); font-size: 0.95rem; line-height: 1.45; }
.intake-form { display: flex; flex-direction: column; gap: 1.1rem; max-width: 420px; }
.intake-label { display: flex; flex-direction: column; gap: 0.4rem; font-family: var(--display); font-weight: 700; font-size: 0.95rem; color: var(--cream); }
.intake-form select {
    padding: 11px 14px; font-size: 1rem; font-family: var(--body);
    background-color: var(--ink-deep); border: 1px solid var(--cream-rule);
    border-radius: 4px; width: 100%; color: var(--cream); cursor: pointer;
}
.intake-form select:focus { outline: none; border-color: var(--r5); box-shadow: 0 0 0 2px rgba(63, 193, 201, 0.35); }
.intake-form .download-link { margin-top: 0.4rem; }
.intake-form .subsection-header { margin: 1rem 0 0.25rem; }
.intake-textarea {
    padding: 11px 14px; font-size: 1rem; font-family: var(--body);
    background-color: var(--ink-deep); border: 1px solid var(--cream-rule);
    border-radius: 4px; width: 100%; color: var(--cream); resize: vertical;
}
.intake-textarea:focus { outline: none; border-color: var(--r5); box-shadow: 0 0 0 2px rgba(63, 193, 201, 0.35); }
.intake-fieldset { border: none; padding: 0; margin: 0; }
.intake-fieldset .intake-label { margin-bottom: 0.6rem; padding: 0; }
.intake-checks { display: flex; flex-direction: column; gap: 0.5rem; }
.intake-check { display: flex; align-items: center; gap: 0.6rem; font-family: var(--body); font-weight: 400; font-size: 0.95rem; color: var(--cream); cursor: pointer; }
.intake-check input { width: 1rem; height: 1rem; accent-color: var(--r5); cursor: pointer; }
.footer { background-color: var(--ink-deep); border-top: 1px solid var(--cream-rule); color: var(--cream-dim); padding: 3rem 30px; margin-top: 4rem; position: relative; z-index: 1; }
.footer-content { max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.footer a { color: var(--cream-dim); text-decoration: none; }
.footer a:hover { color: var(--cream); }
.logout-form { margin: 0; }
.logout-btn {
    font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--cream-dim); background: transparent;
    border: 1px solid var(--cream-rule); border-radius: 4px; padding: 6px 14px; cursor: pointer;
}
.logout-btn:hover { color: var(--cream); border-color: var(--cream-faint); }
.deck-pattern {
    position: fixed; bottom: 60px; right: 0; width: 520px; height: 440px;
    z-index: 0; pointer-events: none; overflow: hidden;
    -webkit-mask-image: radial-gradient(ellipse at bottom right, #000 0%, #000 35%, rgba(0,0,0,0.6) 60%, transparent 95%);
    mask-image: radial-gradient(ellipse at bottom right, #000 0%, #000 35%, rgba(0,0,0,0.6) 60%, transparent 95%);
}
.deck-pattern .px { position: absolute; display: block; }
.deck-pattern .px.fade-out { animation: pxFadeOut 1000ms ease forwards; }
.deck-pattern .px.fade-in { animation: pxFadeIn 1000ms ease forwards; }
@keyframes pxFadeOut {
    0%   { opacity: 1; box-shadow: 0 0 0 0 rgba(77,223,255,0); }
    35%  { opacity: 1; background: #4ddfff; box-shadow: 0 0 10px 2px rgba(77,223,255,0.85); }
    100% { opacity: 0; background: #4ddfff; box-shadow: 0 0 0 0 rgba(77,223,255,0); }
}
@keyframes pxFadeIn {
    0%   { opacity: 0; background: #4ddfff; box-shadow: 0 0 0 0 rgba(77,223,255,0); }
    35%  { opacity: 1; background: #4ddfff; box-shadow: 0 0 10px 2px rgba(77,223,255,0.85); }
    100% { opacity: 1; background: var(--final-color); box-shadow: 0 0 0 0 rgba(77,223,255,0); }
}
@media (max-width: 900px) {
    ul, .podcast-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    h1 { font-size: 2rem; }
    ul, .podcast-list { grid-template-columns: 1fr; }
    .material-thumbnail { width: 100px; }
    .header, .main-content, .footer, .portal-layout { padding-left: 20px; padding-right: 20px; }
}

/* Authenticated portal: left nav + content. Shares the 1080px column with the
   single-column pages so the design line stays consistent. */
.portal-layout {
    max-width: 1080px; margin: 0 auto; padding: 3rem 30px 4rem; position: relative; z-index: 1;
    display: flex; gap: 2.5rem; align-items: flex-start;
}
.portal-nav { flex: 0 0 190px; display: flex; flex-direction: column; gap: 0.25rem; position: sticky; top: 2rem; }
.portal-nav-link {
    font-family: var(--mono); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--cream-dim); text-decoration: none;
    padding: 0.6rem 0.9rem; border-left: 3px solid transparent; border-radius: 0 4px 4px 0;
    transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.portal-nav-link:hover { color: var(--cream); background: var(--cream-faint); }
.portal-nav-link.is-active { color: var(--cream); background: var(--cream-faint); border-left-color: var(--r2); }
.portal-content { flex: 1 1 auto; min-width: 0; }

/* 360 survey results, deck-styled. */
.survey-message { color: var(--cream-dim); font-size: 1.05rem; line-height: 1.6; margin: 0; max-width: 40rem; }
.survey-lede { color: var(--cream-dim); font-size: 0.95rem; line-height: 1.5; margin: 0 0 2.5rem; max-width: 46rem; }
.survey-helper { color: var(--cream-dim); font-size: 0.9rem; line-height: 1.45; margin: -0.75rem 0 1rem; }
.survey-empty { color: var(--cream-dim); font-style: italic; }
.survey-answers { display: flex; flex-direction: column; gap: 0.75rem; }
.survey-answer {
    background: var(--ink-panel); border: 1px solid var(--cream-faint); border-left: 3px solid var(--r5);
    border-radius: 0 6px 6px 0; padding: 1rem 1.25rem; color: var(--cream); line-height: 1.5; white-space: pre-wrap;
}

@media (max-width: 760px) {
    .portal-layout { flex-direction: column; gap: 1.5rem; padding-top: 2rem; }
    .portal-nav { flex-basis: auto; position: static; flex-direction: row; flex-wrap: wrap; }
}
