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

/* KynnectED "clean" design.
   Loaded after style.css and redesign.css, so every existing page keeps its markup and behaviour and picks up this look.
   Same palette as before (warm paper, ink brown, sunflower yellow, terracotta, peach).
   Identity: editorial serif headlines with italic emphasis, a "connection" motif (dashed paths, linked dots),
   numbered section labels, softly tinted surfaces, rounded-rectangle buttons and no hard shadows.
   To go back to the previous design, set KYNNECTED_DESIGN=classic (see design_backup/README.md). */

:root {
  --bg: #FAF7F5;
  --paper: #FFFDFA;
  --paper-2: #FCF8F3;
  --soft: #F3ECE4;
  --ink: #463828;
  --ink-2: #6B5A48;
  --ink-3: #8E7B68;
  --ink-soft: #6B5A48;
  --line: #ECE2D7;
  --line-2: #DCCDBE;
  --primary: #F4D875;
  --primary-2: #EFCB5A;
  --accent: #CF7B4D;
  --accent-ink: #A0552C;
  --surface: #EDDABE;
  --cards-bg: #FBE5CE;
  --yellow-soft: #FBEFBD;
  --peach-soft: #FFF0E1;
  --terracotta-soft: #F3D8C7;
  --shadow-sm: 0 1px 2px rgba(70, 56, 40, .05);
  --shadow: 0 1px 2px rgba(70, 56, 40, .04), 0 6px 20px rgba(70, 56, 40, .06);
  --shadow-lg: 0 2px 4px rgba(70, 56, 40, .04), 0 18px 44px rgba(70, 56, 40, .10);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-main: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-secondary: var(--font-main);
  --font-ui: var(--font-main);
  --swoosh: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 16' preserveAspectRatio='none'%3E%3Cpath d='M3 11c40-7 92-9 194-4' fill='none' stroke='%23CF7B4D' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Base */
html { scroll-padding-top: 84px; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15.5px/1.65 var(--font-main);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { color: var(--ink); text-wrap: balance; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; font-variation-settings: 'opsz' 96; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.5rem); line-height: 1.08; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.15; }
h3 { font-family: var(--font-main); font-size: 1.02rem; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
h1 em, h2 em { font-style: italic; font-weight: 500; }
p { color: var(--ink-2); text-wrap: pretty; }
::selection { background: var(--primary); color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1160px, calc(100% - 32px)); }
.muted { color: var(--ink-3); }

/* Small shared atoms */
.eyebrow, .label {
  display: flex; align-items: center; gap: 10px; margin: 0 0 16px;
  font: 700 .74rem/1.4 var(--font-main); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink);
}
.label::before { content: ''; width: 22px; height: 2px; border-radius: 2px; background: var(--accent); }
.label .num { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 8px;
  background: var(--soft); color: var(--ink); font-size: .74rem; font-weight: 600; white-space: nowrap;
}
.chip.yellow { background: var(--yellow-soft); }
.chip.peach { background: var(--peach-soft); }
.chip.clay { background: var(--terracotta-soft); }
.ic {
  display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--yellow-soft); color: var(--ink);
}
.ic svg { width: 19px; height: 19px; }
.ic.peach { background: var(--peach-soft); }
.ic.clay { background: var(--terracotta-soft); }
.ic.tan { background: var(--cards-bg); }
.ic.ink { background: var(--ink); color: var(--paper); }

/* Buttons: soft rounded rectangles, no outline */
.button, .btn-signin {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border: 0; border-radius: 12px;
  background: var(--primary); color: var(--ink); box-shadow: none;
  font: 700 .88rem/1.2 var(--font-main); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.button:hover, .btn-signin:hover { background: var(--primary-2); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(207, 160, 40, .22); }
.button:active, .btn-signin:active { transform: none; box-shadow: none; }
.button:disabled, .btn-signin:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.button-outline { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.button-outline:hover { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink); }
.button-dark { background: var(--ink); color: var(--paper); }
.button-dark:hover { background: #5B4936; box-shadow: 0 6px 16px rgba(70, 56, 40, .2); }
.button-small { min-height: 36px; padding: 0 14px; border-radius: 10px; font-size: .78rem; gap: 6px; }
.button-lg { min-height: 52px; padding: 0 26px; font-size: .95rem; }
.button .arrow { transition: transform .15s; }
.button:hover .arrow { transform: translateX(3px); }
.button-row { gap: 10px; }
.text-link {
  gap: 6px; padding: 0 0 3px; border: 0; border-bottom: 2px solid var(--primary); font-size: .88rem; font-weight: 700; color: var(--ink); text-decoration: none;
}
.text-link:hover { color: var(--accent-ink); border-color: var(--accent); }
.room-text-link, .room-link-button {
  font-size: .84rem; text-decoration-color: var(--line-2); text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.room-text-link:hover, .room-link-button:hover { text-decoration-color: var(--accent); }

/* Header */
.site-header { background: rgba(250, 247, 245, .92); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { min-height: 72px; max-width: 1192px; padding: 10px 16px; gap: 20px; }
.brand, .brand img { flex-basis: 138px; width: 138px; }
.main-nav { gap: 4px; }
.main-nav > a:not(.button), .nav-logout {
  position: relative; padding: 8px 12px; border-radius: 0; color: var(--ink-2); font: 600 .84rem/1.4 var(--font-main); text-decoration: none;
}
.main-nav > a:not(.button):hover, .nav-logout:hover { background: none; color: var(--ink); text-decoration: none; }
.main-nav > a[aria-current="page"] { background: none; color: var(--ink); text-decoration: none; }
.main-nav > a[aria-current="page"]::after {
  content: ''; position: absolute; left: 50%; bottom: 0; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--accent);
}
.main-nav .button { margin-left: 10px; min-height: 40px; }
.nav-logout { border: 0; background: transparent; cursor: pointer; }
.message-notifications summary {
  list-style: none; padding: 8px 14px; border: 0; border-radius: 10px; background: var(--soft); font: 600 .8rem/1.4 var(--font-main);
}
.message-notifications summary::-webkit-details-marker { display: none; }
.message-notifications-panel { border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow-lg); }

/* Notices */
.site-notice {
  max-width: 1160px; width: calc(100% - 32px); margin: 16px auto 0; padding: 12px 16px;
  border: 0; border-left: 3px solid var(--primary-2); border-radius: var(--radius-sm); background: var(--yellow-soft); font-size: .88rem;
}
.notification-prompt { border: 0; border-radius: var(--radius); background: var(--peach-soft); }
.room-notice { border: 0; border-radius: var(--radius-sm); background: var(--peach-soft); }
.recording-policy { border: 0; border-left: 3px solid var(--primary-2); border-radius: var(--radius-sm); background: var(--yellow-soft); }

/* ---------- Home ---------- */
.home-intro { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; padding: 64px 0 24px; }
.home-intro h1 { margin: 0 0 22px; font-size: clamp(2.6rem, 5.4vw, 4.4rem); line-height: 1.04; letter-spacing: -.03em; }
.home-intro h1 em { position: relative; white-space: nowrap; color: var(--ink); }
.home-intro h1 em::after {
  content: ''; position: absolute; left: 2%; right: 2%; bottom: -.08em; height: .22em; background: var(--swoosh) center / 100% 100% no-repeat;
}
.home-intro .lead { max-width: 520px; margin: 0 0 30px; font-size: 1.1rem; line-height: 1.7; }
.facts { display: flex; flex-wrap: wrap; gap: 14px 34px; margin: 40px 0 0; padding: 22px 0 0; list-style: none; border-top: 1px solid var(--line); }
.facts li { display: grid; gap: 2px; }
.facts strong { font: 600 1.5rem/1.1 var(--font-display); color: var(--ink); }
.facts span { color: var(--ink-3); font-size: .8rem; }

/* Connection illustration: a mentor and a student linked by a session */
.connect { position: relative; aspect-ratio: 1 / .92; max-width: 520px; width: 100%; justify-self: end; }
.connect-bg { position: absolute; inset: 6% 4% 4% 8%; border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%; background: var(--cards-bg); }
.connect-ring { position: absolute; right: 2%; top: 0; width: 84px; height: 84px; border: 14px solid var(--primary); border-radius: 50%; }
.connect svg.path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.person {
  position: absolute; display: flex; align-items: center; gap: 12px; width: 62%; padding: 14px 16px;
  border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-lg);
}
.person .face { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; font: 600 1.1rem var(--font-display); }
.person strong { display: block; font-size: .92rem; }
.person span { display: block; color: var(--ink-3); font-size: .76rem; }
.person.mentor { left: 0; top: 9%; }
.person.mentor .face { background: var(--primary); }
.person.student { right: 0; bottom: 9%; }
.person.student .face { background: var(--terracotta-soft); }
.session {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 12px 16px; border-radius: 14px;
  background: var(--ink); color: var(--paper); box-shadow: var(--shadow-lg); text-align: center; white-space: nowrap;
}
.session small { display: block; color: var(--primary); font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.session strong { display: block; font: 600 1.05rem/1.3 var(--font-display); }
.session .dots { display: flex; justify-content: center; gap: 4px; margin-top: 6px; }
.session .dots i { width: 6px; height: 6px; border-radius: 50%; background: #ffffff40; }
.session .dots i.on { background: var(--primary); }

.subjects-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 48px; padding: 18px 22px; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-sm); }
.subjects-line h3 { margin: 0 12px 0 0; font-size: .86rem; color: var(--ink-3); font-weight: 600; }

.section { padding: 112px 0 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { margin: 0 0 12px; font-size: clamp(2rem, 3.8vw, 2.9rem); line-height: 1.08; }
.section-head p { margin: 0; font-size: 1.02rem; }
.section-head.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; max-width: none; }
.section-head.split > div { max-width: 620px; }
.section-head .more { margin-top: 22px; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 26px; border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow);
}
.card .ic { margin-bottom: 14px; }
.card h3 { margin: 0; }
.card p { margin: 0; font-size: .92rem; }
.card.tint-yellow { background: var(--yellow-soft); box-shadow: none; }
.card.tint-peach { background: var(--peach-soft); box-shadow: none; }
.card.tint-clay { background: var(--terracotta-soft); box-shadow: none; }
.card .big-num { font: 500 2.6rem/1 var(--font-display); color: var(--ink); opacity: .9; margin-bottom: 18px; }

/* Solution: a checked list beside the heading */
.split-block { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.split-block .section-head { margin: 0; position: sticky; top: 110px; }
.ticks { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.ticks li { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.ticks .ic { grid-row: span 2; }
.ticks h3 { margin: 6px 0 0; font-size: 1.05rem; }
.ticks p { margin: 0; font-size: .92rem; }

/* How it works: a connected path of steps */
.path-steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.path-steps::before { content: ''; position: absolute; left: 22px; right: calc((100% - 72px) / 4 - 22px); top: 22px; border-top: 2px dashed var(--line-2); }
.path-steps li { position: relative; }
.path-steps .dot {
  position: relative; display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 20px; border-radius: 50%;
  background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink); font: 600 1.05rem var(--font-display); color: var(--ink);
}
.path-steps li:last-child .dot { background: var(--primary); box-shadow: none; }
.path-steps h3 { margin: 0 0 6px; font-size: 1.05rem; }
.path-steps p { margin: 0; font-size: .9rem; }

/* Centres panel */
.band {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px;
  padding: 48px; border-radius: 28px; background: var(--peach-soft);
}
.band::after { content: ''; position: absolute; right: -60px; bottom: -90px; width: 260px; height: 260px; border: 26px solid var(--cards-bg); border-radius: 50%; pointer-events: none; }
.band > * { position: relative; z-index: 1; }
.band h2 { margin: 0 0 10px; font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.band p { max-width: 600px; margin: 0; }

/* Join banner (shared partial): a dark closing panel */
.join-banner { padding: 112px 0 0; background: transparent; }
.join-banner .wrap {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px;
  padding: 52px 48px; border-radius: 28px; background: var(--ink);
}
.join-banner .wrap::before { content: ''; position: absolute; left: -40px; top: -70px; width: 200px; height: 200px; border: 22px solid #ffffff10; border-radius: 50%; }
.join-banner .wrap > * { position: relative; }
.join-banner h2 { margin: 0 0 8px; color: var(--paper); font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.join-banner p { margin: 0; color: #E9DCCB; font-size: 1.02rem; }
.join-banner .button { background: var(--primary); color: var(--ink); }
.join-banner .button:hover { background: var(--primary-2); }

/* Older public components, restyled for the other public pages */
.challenge-card, .team-routes article, .belief-grid article, .people-grid article, .safeguarding-grid article, .benefit {
  border: 0; border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow);
}
.challenge-card::before, .team-routes article::before { display: none; }
.team-routes article { padding: 26px; }
.team-routes article:nth-child(n) { background: var(--paper); }
.team-routes article h3::before { content: ''; display: block; width: 28px; height: 4px; margin-bottom: 18px; border-radius: 4px; background: var(--primary); }
.team-routes article:nth-child(2) h3::before { background: var(--accent); }
.team-routes article:nth-child(3) h3::before { background: var(--surface); }
.team-routes article:nth-child(4) h3::before { background: var(--ink); }
.editorial-hero { padding-block: 72px 32px; }
.editorial-hero::after { display: none; }
.editorial-hero h1 { font-size: clamp(2.4rem, 5.6vw, 4rem); }
.large-intro { font-size: 1.08rem; line-height: 1.75; color: var(--ink-2); }
.team-section, .centres-section { background: transparent; }
.person-initial { background: var(--primary); box-shadow: none; font: 600 1.5rem var(--font-display); }
.people-grid article:nth-child(n) .person-initial { box-shadow: none; }
.partnership-columns article { padding: 26px; border: 0; border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); }
.safety-contact { border: 0; border-left: 3px solid var(--accent); border-radius: var(--radius-sm); background: var(--paper); }
.centre-banner { border: 0; border-radius: 28px; background: var(--peach-soft); }
.check-list li::before { content: '✓'; display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--yellow-soft); font-size: .7rem; font-weight: 700; }
.contact-card, .contact-card.peach { border: 0; border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); }
.contact-card.peach { background: var(--peach-soft); box-shadow: none; }
.library-notice { border: 0; border-radius: var(--radius); }
.folder-card { border: 0; border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); }
.folder-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.folder-icon { color: var(--primary-2); }
.folder-empty, .empty-state { border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: transparent; }
.breadcrumb a { color: var(--ink-2); }
.conduct-document { border: 0; border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); }
.conduct-expectations, .mentor-declaration { border-radius: var(--radius); }
dialog { border: 0; border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(46, 37, 30, .55); }
.conduct-close { border: 0; background: var(--soft); }
.conduct-dialog-footer { background: var(--paper-2); }

/* Footer */
.site-footer, .interior-page .site-footer { margin-top: 112px; padding: 56px 0 0; border-top: 1px solid var(--line); background: var(--paper-2); }
#main-content:has(.join-banner) + .site-footer { margin-top: 72px; }
.footer-main { grid-template-columns: 1.2fr .8fr .8fr 1.3fr; gap: 32px; padding-bottom: 40px; }
.footer-logo { width: 140px; }
.footer-main > div:first-child p { font: italic 500 1.05rem/1.5 var(--font-display); color: var(--ink-2); }
.footer-col h4, .footer-contact .eyebrow { margin: 0 0 12px; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.footer-col ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer-col a, .footer-nav a, .footer-contact a { color: var(--ink-2); font-size: .9rem; text-decoration: none; }
.footer-col a:hover, .footer-nav a:hover, .footer-contact a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.footer-contact .contact-email-row { justify-content: flex-start; }
.footer-contact .contact-email-row a:first-child { overflow-wrap: normal; word-break: normal; }
.footer-contact .message-link { width: 36px; height: 36px; border: 0; }
.footer-contact .message-link svg { width: 18px; height: 18px; }
.footer-bottom { padding: 20px 0 28px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .78rem; }

/* ---------- Interior pages (room, coordinator, resources, forms) ---------- */
.page-hero, .interior-page .page-hero { width: min(1160px, calc(100% - 32px)); max-width: none; padding-top: 48px; }
.page-hero h1, .interior-page .page-hero h1 { font-size: clamp(2.1rem, 4vw, 3rem); }
.page-hero .tagline, .tagline { color: var(--ink-2); font-size: 1rem; }
.page-body, .interior-page .page-body, .interior-page .workspace-body, .interior-page .signup-body, .interior-page .export-body {
  width: min(1160px, calc(100% - 32px)); max-width: none;
}
.workspace-nav { gap: 4px; padding: 4px; border: 0; border-radius: 12px; background: var(--soft); width: fit-content; max-width: 100%; }
.workspace-nav a { padding: 7px 14px; border: 0; border-radius: 9px; background: transparent; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.workspace-nav a:hover { background: var(--paper); color: var(--ink); }
.workspace-nav a[aria-current="page"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }
.workspace-panel { padding: 22px 24px; border: 0; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.workspace-panel h2 { font-size: 1.3rem; }
.workspace-panel h3 { font-size: 1.05rem; }
.workspace-panel p { font-size: .9rem; }
.workspace-panel .btn-signin { display: inline-flex; }
.workspace-label { margin-bottom: 6px; color: var(--accent-ink); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.workspace-stats { gap: 14px; }
.workspace-stat, .workspace-stat:first-child, .workspace-stat:nth-child(3) {
  gap: 6px; padding: 20px; border: 0; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow);
}
.workspace-stat:first-child { background: var(--yellow-soft); box-shadow: none; }
.workspace-stat strong { font: 600 2.1rem/1 var(--font-display); letter-spacing: -.02em; }
.workspace-stat span { color: var(--ink-2); font-size: .82rem; }
.workspace-stat small { color: var(--ink-3); font-size: .74rem; }
.lesson-add summary, .lesson-tools summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lesson-add summary::-webkit-details-marker, .lesson-tools summary::-webkit-details-marker { display: none; }
.lesson-add summary::after, .lesson-tools summary::after {
  content: ''; flex: none; width: 9px; height: 9px; margin-right: 6px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.lesson-add[open] summary::after, .lesson-tools[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.chat-message { border: 0; border-radius: 16px 16px 16px 4px; background: var(--paper); box-shadow: var(--shadow-sm); }
.chat-own { border-radius: 16px 16px 4px 16px; background: var(--yellow-soft); box-shadow: none; }
.lesson-video, .private-recording-video { border-radius: var(--radius); }

/* Form controls */
.account-form input, .lesson-form textarea, .pairing-form select, .missing-recording-form select,
.material-submission-form select, .signup-contact input, .signup-contact select,
.interior-page input[type="text"], .interior-page input[type="email"], .interior-page input[type="password"],
.interior-page input[type="url"], .interior-page input[type="datetime-local"], .interior-page input[type="number"],
.interior-page input[type="search"], .interior-page input[type="tel"], .interior-page textarea, .interior-page select {
  min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink); font: inherit; font-size: .94rem; transition: border-color .15s, box-shadow .15s;
}
.interior-page textarea, .lesson-form textarea { min-height: 96px; }
.account-form input:focus, .lesson-form textarea:focus, .interior-page input:focus, .interior-page textarea:focus, .interior-page select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--peach-soft);
}
.account-form label, .lesson-form label, .auth-card label { color: var(--ink); font-size: .84rem; font-weight: 700; }
.form-error { color: #A8361B; }

/* Tables */
.table-scroll table, .export-body table {
  border-collapse: separate; border-spacing: 0; overflow: hidden; border: 0; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow);
}
.table-scroll th, .export-body th { background: var(--soft); color: var(--ink); font-size: .78rem; font-weight: 700; text-align: left; }
.table-scroll th, .table-scroll td, .export-body th, .export-body td { padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); }
.table-scroll tr:last-child td, .export-body tr:last-child td { border-bottom: 0; }

/* Auth */
.auth-layout { min-height: calc(100vh - 72px - 260px); align-items: center; background: none; }
.auth-card { padding: 34px; border: 0; border-top: 5px solid var(--primary); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 2.1rem; }
.auth-card .button { width: 100%; }
.account-switch a, .auth-help a { color: var(--ink); font-weight: 700; text-decoration-color: var(--primary-2); text-decoration-thickness: 2px; }

/* Signup */
.signup-body .signup-form { padding: 32px; border: 0; border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); }
.signup-options > .subject, .signup-options > .role {
  border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--paper); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.signup-options > .subject:hover, .signup-options > .role:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
.signup-options > .subject[aria-pressed="true"], .signup-options > .role[aria-pressed="true"] { background: var(--yellow-soft); border-color: var(--primary-2); box-shadow: 0 0 0 3px var(--primary); }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; width: min(1240px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 0; }
.dash-side { position: sticky; top: 96px; align-self: start; display: grid; gap: 16px; }
.dash-nav { display: grid; gap: 2px; padding: 0; }
.dash-nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-size: .88rem; font-weight: 600; text-decoration: none;
}
.dash-nav a svg { width: 18px; height: 18px; flex: none; color: var(--ink-3); }
.dash-nav a:hover { background: var(--soft); color: var(--ink); }
.dash-nav a[aria-current="page"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.dash-nav a[aria-current="page"]::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--accent); }
.dash-nav a[aria-current="page"] svg { color: var(--accent-ink); }
.dash-nav hr { width: 100%; margin: 8px 0; border: 0; border-top: 1px solid var(--line); }
.dash-profile { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; padding: 16px; border-radius: var(--radius); background: var(--peach-soft); overflow-wrap: anywhere; }
.avatar {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: var(--ink); font: 600 1.1rem var(--font-display); grid-row: span 2;
}
.dash-profile strong { font-size: .9rem; line-height: 1.3; }
.dash-profile small { color: var(--ink-3); font-size: .76rem; }
.dash-profile .chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.dash-profile .chip { background: var(--paper); }

.dash-main { min-width: 0; display: grid; gap: 28px; align-content: start; }
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.dash-head .eyebrow { margin-bottom: 8px; }
.dash-head h1 { margin: 0 0 6px; font-size: clamp(2.1rem, 4vw, 3rem); }
.dash-head p { margin: 0; }
.dash-head .button-row { flex-shrink: 0; }
.dash-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { display: flex; flex-direction: column; gap: 16px; padding: 18px; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.stat span.ic { display: grid; margin: 0; width: 36px; height: 36px; }
.stat .ic svg { width: 18px; height: 18px; }
.stat strong { display: block; font: 600 2.1rem/1 var(--font-display); letter-spacing: -.02em; color: var(--ink); }
.stat span { display: block; margin-top: 6px; color: var(--ink-2); font-size: .8rem; }
.stat.feature { background: var(--ink); box-shadow: none; }
.stat.feature .ic { background: var(--primary); }
.stat.feature strong { color: var(--primary); }
.stat.feature span:not(.ic) { color: #E9DCCB; }
.dash-note { margin: -14px 0 0; color: var(--ink-3); font-size: .78rem; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.dash-col { display: grid; gap: 24px; min-width: 0; }
.panel, .dash .dashboard-upcoming { min-width: 0; margin: 0; padding: 24px; border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.panel-head h2 { margin: 0; font-size: 1.35rem; }
.panel-head p { flex-basis: 100%; margin: 0; font-size: .86rem; }
.panel .recording-policy, .dash .dashboard-upcoming .recording-policy { margin: 0 0 16px; }
.list { display: grid; gap: 0; }
.item {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; padding: 16px 0;
  border-top: 1px solid var(--line); overflow-wrap: anywhere;
}
.list > .item:first-child { border-top: 0; padding-top: 4px; }
.item > div:first-child { display: flex; gap: 14px; align-items: flex-start; min-width: 0; flex: 1 1 260px; }
.item h3 { margin: 2px 0 2px; font-size: 1rem; }
.item p { margin: 0; font-size: .84rem; }
.item .meta { color: var(--ink-3); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.date-tile {
  display: grid; place-items: center; align-content: center; flex: none; width: 52px; height: 56px; border-radius: 12px;
  background: var(--yellow-soft); color: var(--ink); line-height: 1.05; text-align: center;
}
.date-tile b { font: 600 1.3rem/1 var(--font-display); }
.date-tile small { margin-top: 3px; font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.date-tile.done { background: var(--soft); }
.item .lesson-actions { gap: 8px 14px; }
.item .recording-upload, .item .recording-dashboard-tools, .item .recording-review-summary, .item > p, .item > ul, .item > div:not(:first-child):not(.lesson-actions) { flex-basis: 100%; }
.item .recording-upload { border-top: 1px dashed var(--line-2); }
.item .lesson-tools { margin-top: 4px; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.status-dot.ok { background: #6E9E5A; }
.empty { padding: 26px 20px; border: 1.5px dashed var(--line-2); border-radius: var(--radius-sm); text-align: center; }
.empty h3 { margin: 0 0 6px; font-size: 1rem; }
.empty p { margin: 0 auto; max-width: 420px; font-size: .86rem; }

.pair { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; padding: 16px; border-radius: var(--radius); background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; overflow-wrap: anywhere; }
.list > .pair + .pair { margin-top: 10px; }
.pair:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1.5px var(--accent), var(--shadow); }
.pair .avatar { width: 42px; height: 42px; background: var(--terracotta-soft); }
.pair strong { font-size: .94rem; line-height: 1.3; }
.pair small { color: var(--ink-3); font-size: .78rem; }
.pair small .participant-username { display: inline; margin: 0; }
.pair .pair-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-2); font-size: .8rem; color: var(--ink-2); }
.pair .pair-foot + .pair-foot { margin-top: 0; padding-top: 6px; border-top: 0; }
.pair .pair-foot b { color: var(--ink); }
.pair .go { font-weight: 700; color: var(--accent-ink); }

.guide { padding: 0; overflow: hidden; }
.guide > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 18px 22px; cursor: pointer; }
.guide > summary::-webkit-details-marker { display: none; }
.guide > summary h2 { margin: 0; font-size: 1.25rem; }
.guide > summary p { margin: 2px 0 0; font-size: .84rem; }
.guide > summary::after {
  content: ''; flex: none; width: 9px; height: 9px; margin: 0 6px 0 auto; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.guide[open] > summary::after { transform: rotate(-135deg) translateY(-3px); }
.guide-body { padding: 0 22px 22px; }
.guide .learner-guidelines-list { margin: 0; }
.guide-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; padding: 0; list-style: none; counter-reset: guide; }
.guide-steps li { counter-increment: guide; padding: 16px; border-radius: var(--radius-sm); background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); }
.guide-steps li::before { content: counter(guide, decimal-leading-zero); display: block; margin-bottom: 8px; font: 600 1.3rem/1 var(--font-display); color: var(--accent); }
.guide-steps strong { display: block; margin-bottom: 4px; font-size: .9rem; }
.guide-steps p { margin: 0; font-size: .82rem; }
.guide-reminder { margin: 0; padding: 12px 16px; border-left: 3px solid var(--primary-2); border-radius: var(--radius-sm); background: var(--yellow-soft); color: var(--ink); font-size: .86rem; }

.quick { display: grid; gap: 4px; }
.quick a { display: flex; align-items: center; gap: 12px; padding: 10px; margin: 0 -10px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; transition: background .15s; }
.quick a:hover { background: var(--soft); }
.quick a .ic { width: 38px; height: 38px; }
.quick a .ic svg { width: 18px; height: 18px; }
.quick a strong { display: block; font-size: .9rem; }
.quick a small { display: block; color: var(--ink-3); font-size: .78rem; line-height: 1.4; }
.quick a::after { content: '→'; margin-left: auto; padding-left: 8px; color: var(--ink-3); transition: transform .15s; }
.quick a:hover::after { transform: translateX(3px); color: var(--accent-ink); }
.coord-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: var(--radius); background: var(--peach-soft); }
.coord-banner p { margin: 0; color: var(--ink); font-size: .9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .header-inner { min-height: 64px; }
  .menu-toggle { border: 0; border-radius: 10px; background: var(--soft); padding: 8px 14px; font: 600 .8rem var(--font-main); }
  .main-nav { gap: 0; padding: 10px 0 6px; }
  .main-nav > a[aria-current="page"]::after { left: 0; top: 50%; bottom: auto; margin: -3px 0 0; }
  .main-nav .button { margin: 8px 0 0; }
  .wrap, .page-hero, .interior-page .page-hero, .page-body, .interior-page .page-body { width: calc(100% - 32px); }
  .home-intro { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; }
  .connect { justify-self: center; }
  .dash { grid-template-columns: 1fr; gap: 20px; }
  .dash-side { position: static; }
  .dash-nav { display: flex; flex-wrap: nowrap; overflow-x: auto; padding: 4px; border-radius: 12px; background: var(--soft); scrollbar-width: none; }
  .dash-nav a { white-space: nowrap; padding: 8px 12px; }
  .dash-nav a[aria-current="page"]::before { display: none; }
  .dash-nav hr, .dash-profile { display: none; }
  .split-block { grid-template-columns: 1fr; gap: 28px; }
  .split-block .section-head { position: static; }
  .cards { grid-template-columns: 1fr 1fr; }
  .path-steps { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .path-steps::before { display: none; }
  .guide-steps { grid-template-columns: 1fr 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-main > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .header-inner { padding-inline: 16px; }
  .main-nav > a:not(.button), .nav-logout { padding: 11px 16px; }
  .home-intro h1 { font-size: clamp(2.4rem, 11vw, 3rem); }
  .person { width: 74%; }
  .section, .join-banner { padding-top: 80px; }
  .section-head.split { display: block; }
  .section-head.split .text-link { margin-top: 16px; }
  .cards, .cards.two, .cards.four, .guide-steps, .path-steps { grid-template-columns: 1fr; }
  .path-steps li { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; }
  .path-steps .dot { grid-row: span 2; margin: 0; }
  .dash-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat strong { font-size: 1.7rem; }
  .band, .join-banner .wrap { grid-template-columns: 1fr; padding: 32px 22px; border-radius: 22px; }
  .panel, .dash .dashboard-upcoming { padding: 18px 16px; }
  .dash-head .button-row { width: 100%; }
  .site-footer, .interior-page .site-footer { margin-top: 80px; }
  .auth-card { padding: 26px 20px; }
}

/* Neutralise legacy rules in style.css that share these class names */
.cards { flex-wrap: initial; justify-content: initial; padding: 0; background: none; }
.card { width: auto; max-width: none; }

/* Mentee dashboard: small-group invitation */
.group-callout { display: grid; gap: 8px; justify-items: start; background: var(--peach-soft); box-shadow: none; }
.group-callout h2 { margin: 6px 0 0; font-size: 1.3rem; }
.group-callout p { margin: 0 0 8px; font-size: .9rem; }
.group-callout .ic { background: var(--paper); }
