/* College of the Coast & Environment Assistant ("Clawdia")
   Fonts are self-hosted (SIL Open Font License, see static/fonts/OFL-*.txt) because the site's
   security policy only allows files served by the site itself. */
@font-face { font-family: "Nunito"; src: url("fonts/nunito-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito-latin-900-normal.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito-latin-900-italic.woff2") format("woff2"); font-weight: 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Kaushan Script"; src: url("fonts/kaushan-script-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --purple: #461d7c;        /* LSU purple */
  --purple-dark: #2e1252;
  --purple-mid: #5b2a9e;
  --purple-tint: #f1ebfa;
  --purple-tint-2: #e6dcf5;
  --gold: #fdd023;          /* LSU gold */
  --gold-soft: #fff3b8;
  --ink: #1f1830;
  --muted: #5d566b;
  --line: #ddd5ea;
  --field-border: #857b99;  /* text box edges: 3.6:1 or better on white and the page background (WCAG 1.4.11) */
  --bg: #f6f3fb;
  --card: #ffffff;
  --warn-bg: #fff4cc;
  --error-bg: #fde8e8;
  --shadow: 0 10px 30px rgba(46, 18, 82, 0.16);
  --shadow-sm: 0 3px 10px rgba(46, 18, 82, 0.12);
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --script: "Kaushan Script", "Brush Script MT", cursive;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 12px; }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--purple); }
/* Keyboard focus: a dark purple ring with a gold band inside it, so it stands out (3:1 or better, WCAG 1.4.11)
   on every background the site uses: white cards, lavender chips, the purple header and the underwater picture. */
a:focus-visible, button:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible,
summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--purple-dark);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--gold);
}
/* On the purple header and bars the gold band carries the contrast, so it is made wider there. */
.topbar a:focus-visible, .topbar button:focus-visible, .conversation-head button:focus-visible {
  outline-color: var(--gold); box-shadow: 0 0 0 2px var(--purple-dark);
}
main:focus, main:focus-visible { outline: none; box-shadow: none; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--gold); color: var(--purple-dark); padding: 8px 14px; border-radius: 8px; font-weight: 800; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.script { font-family: var(--script); font-weight: 400; color: var(--purple); }

/* ---------- Header ---------- */
.topbar { position: relative; z-index: 2; color: #fff; }
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px clamp(16px, 4vw, 56px) 10px; background: var(--purple);
}
.topbar-wave { display: block; width: 100%; height: 30px; margin-bottom: -16px; }
.brand { display: flex; align-items: center; gap: 16px; color: #fff; text-decoration: none; min-width: 0; }
/* The official LSU logo exactly as supplied (issue #36): only its size is set, never its shape or colors. Without it,
   "LSU" is plain text that matches the title beside it, so nothing imitates the logo. */
.lsu-logo { display: block; flex: none; height: 44px; width: auto; max-width: 160px; }
.lsu-text { flex: none; font-weight: 800; font-size: clamp(18px, 2.3vw, 30px); line-height: 1.15; }
.brand-divider { width: 2px; align-self: stretch; min-height: 36px; background: rgba(255, 255, 255, 0.75); border-radius: 2px; }
.brand-title { font-weight: 800; font-size: clamp(18px, 2.3vw, 30px); line-height: 1.15; }
.brand-short { display: none; }
.nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); white-space: nowrap; }
.nav a, .nav .linklike {
  display: inline-flex; align-items: center; gap: 6px;
  color: #fff; text-decoration: none; font-weight: 700; font-size: 17px;
}
.nav a:hover span, .nav .linklike:hover span { text-decoration: underline; }
.nav form { margin: 0; }
.icon { width: 22px; height: 22px; flex: none; }

/* ---------- Buttons and forms ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.card h1 { margin-top: 0; font-size: 26px; color: var(--purple); }
.card h2 { margin-top: 0; font-size: 21px; color: var(--purple); }
label { font-weight: 700; }
input[type=email], input[type=password], input[type=file], textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--field-border); border-radius: 10px; background: #fff; color: var(--ink);
}
.btn-primary, .btn-secondary {
  font: inherit; font-weight: 800; padding: 10px 20px; border-radius: 999px; cursor: pointer; border: 2px solid var(--purple);
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }
.btn-secondary { background: #fff; color: var(--purple); }
.linklike { background: none; border: none; padding: 0; font: inherit; color: var(--purple); text-decoration: underline; cursor: pointer; }
.alert { background: var(--error-bg); padding: 10px 12px; border-radius: 10px; }
.notice { background: var(--warn-bg); padding: 10px 12px; border-radius: 10px; }

/* Plain pages (admin) */
.page-plain main { max-width: 900px; margin: 0 auto; padding: 32px 16px 16px; }

/* Sign-in page: underwater backdrop */
.page-login { background: #9fdef2 url("img/underwater.webp") center bottom / cover no-repeat fixed; min-height: 100vh; }
.page-login main { padding: 48px 16px; }
.login { max-width: 440px; margin: 0 auto; text-align: center; box-shadow: var(--shadow); }
.login h1 { font-size: 24px; }
.login h1 .script { font-size: 1.35em; }
.login form { display: grid; gap: 8px; text-align: left; }
.login form .btn-primary { margin-top: 8px; }
.login-avatar { display: block; margin: 0 auto 8px; width: 96px; height: 96px; border-radius: 50%; box-shadow: var(--shadow-sm); }

/* ---------- Hero ---------- */
/* Gold "sparkle" strokes and the brush swoosh under the script lettering, as in the design reference. */
:root {
  --sparkle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg stroke='%23fdc21a' stroke-width='5' stroke-linecap='round'%3E%3Cpath d='M8 20 16 4'/%3E%3Cpath d='M18 24 34 12'/%3E%3Cpath d='M20 34 36 31'/%3E%3C/g%3E%3C/svg%3E");
  --swoosh: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 24' preserveAspectRatio='none'%3E%3Cpath d='M4 17C80 6 190 3 296 9C200 9 110 14 10 21Z' fill='%23fdc21a'/%3E%3C/svg%3E");
}
.hero {
  position: relative; isolation: isolate;
  background:
    linear-gradient(180deg, rgba(236, 203, 147, 0) calc(100% - 60px), #eccb93), /* blends into the sand under the conversation */
    #2db6e3 url("img/underwater.webp") center 65% / cover no-repeat;
  padding: 34px clamp(16px, 3vw, 44px) 26px;
  overflow: hidden;
  min-height: calc(100vh - 78px); /* fill the first screen, like the reference */
  display: grid; align-content: center;
}
/* Seagrass, coral, shells and starfish in the bottom corners. Purely decorative. */
.hero::before, .hero::after {
  content: ""; position: absolute; bottom: 0; z-index: -1; pointer-events: none;
  height: min(100%, 1000px); aspect-ratio: 820 / 1200;
  background: center bottom / contain no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 88%, transparent); mask-image: linear-gradient(180deg, #000 88%, transparent);
}
.hero::before { left: -2%; background-image: url("img/reef-left.webp"); }
.hero::after { right: -2%; background-image: url("img/reef-right.webp"); }
.hero-inner {
  width: 100%; max-width: 1520px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(280px, 1fr) minmax(440px, 1.22fr) minmax(250px, 0.62fr);
  grid-template-areas: "mascot main panel";
  align-items: center; gap: clamp(12px, 1.8vw, 28px);
}
.hero-mascot { grid-area: mascot; align-self: end; margin-bottom: -10px; }
.hero-mascot img {
  display: block; width: 104%; max-width: 600px; height: auto; margin: 0 -2% 0 auto;
  filter: drop-shadow(0 18px 14px rgba(20, 60, 80, 0.3));
}
.hero-main { grid-area: main; display: grid; gap: 16px; position: relative; z-index: 1; }

.bubble {
  position: relative; background: rgba(255, 255, 255, 0.97); border-radius: 44px;
  padding: 24px clamp(20px, 3vw, 44px) 26px; text-align: center;
  box-shadow: 0 14px 34px rgba(16, 58, 92, 0.22), inset 0 -4px 0 rgba(70, 29, 124, 0.06);
}
.bubble::before { /* speech-bubble tail pointing at Clawdia */
  content: ""; position: absolute; left: -30px; top: 50%; width: 62px; height: 56px;
  background: inherit; clip-path: polygon(0 82%, 100% 0, 92% 100%);
}
.bubble h1 { margin: 0; line-height: 1.05; color: var(--purple-dark); }
.bubble .hi { font-weight: 900; font-style: italic; font-size: clamp(34px, 3.6vw, 58px); letter-spacing: -0.01em; white-space: nowrap; }
/* Script name with a gold brush swoosh underneath and a sparkle beside it */
.script-mark { position: relative; display: inline-block; white-space: nowrap; line-height: 1.15; padding: 0 0.08em 0.16em; }
.script-mark .script { font-size: 1em; color: var(--purple-dark); }
.script-mark::before {
  content: ""; position: absolute; left: 0.1em; right: 0; bottom: 0.04em; height: 0.24em;
  background: var(--swoosh) center / 100% 100% no-repeat;
}
.script-mark::after {
  content: ""; position: absolute; right: -0.36em; top: 0.02em; width: 0.42em; height: 0.42em;
  background: var(--sparkle) center / contain no-repeat;
}
.bubble h1 .script-mark { font-size: clamp(48px, 5.2vw, 84px); margin-right: 0.3em; }
.bubble-sub { margin: 8px 0 6px; font-weight: 900; font-size: clamp(20px, 2vw, 30px); color: var(--purple-dark); line-height: 1.15; }
.bubble-text { margin: 0 auto; max-width: 33em; font-size: clamp(16px, 1.25vw, 19px); font-weight: 600; color: #2a2140; line-height: 1.45; }

/* Question boxes */
.ask {
  display: flex; align-items: flex-end; gap: 8px; background: #fff; border-radius: 999px;
  padding: 6px 6px 6px 24px; box-shadow: 0 10px 26px rgba(16, 58, 92, 0.22); border: 2px solid var(--field-border);
}
.ask:focus-within { border-color: var(--purple-dark); box-shadow: 0 0 0 3px var(--gold), 0 10px 26px rgba(16, 58, 92, 0.22); }
.ask textarea {
  flex: 1; border: none; padding: 12px 0; resize: none; min-height: 48px; max-height: 200px;
  background: transparent; line-height: 1.4;
}
.ask textarea::placeholder { color: #6f6880; }
.ask textarea:focus-visible { outline: none; box-shadow: none; } /* the whole box shows focus instead (.ask:focus-within) */
.send {
  flex: none; width: 64px; height: 48px; border-radius: 999px; border: none; cursor: pointer;
  background: linear-gradient(180deg, var(--purple-mid), var(--purple)); color: #fff; display: grid; place-items: center;
  box-shadow: 0 3px 8px rgba(46, 18, 82, 0.3);
}
.send svg { width: 24px; height: 24px; }
.send:hover { background: var(--purple-dark); }
.send:disabled { opacity: 0.6; cursor: wait; }
.send:focus-visible { outline: 3px solid var(--purple-dark); outline-offset: 2px; box-shadow: 0 0 0 2px var(--gold); }

.try h2 { margin: 0 0 8px; font-size: 24px; font-weight: 900; color: var(--purple-dark); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); }
.suggestions { display: flex; flex-wrap: wrap; gap: 10px; }
.try .suggestions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.chip {
  font: inherit; font-size: 15px; font-weight: 800; line-height: 1.3; text-align: left;
  padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(70, 29, 124, 0.14);
  background: rgba(246, 241, 253, 0.96); color: var(--purple-dark); cursor: pointer; box-shadow: var(--shadow-sm);
}
.try .chip { text-align: center; padding: 11px 16px; background: rgba(255, 255, 255, 0.92); }
.chip:hover { background: #fff; border-color: var(--purple); }

/* "What I can help with" panel */
.help-panel {
  grid-area: panel; align-self: stretch; margin: 6px 0;
  display: flex; flex-direction: column; justify-content: center;
  background: rgba(255, 255, 255, 0.97); border-radius: 200px 200px 34px 34px;
  padding: 34px 18px 20px; text-align: center; box-shadow: 0 14px 34px rgba(16, 58, 92, 0.22);
}
.panel-logo { display: flex; flex-direction: column; align-items: center; }
.panel-logo img { width: 84px; height: auto; margin-bottom: -12px; filter: drop-shadow(0 4px 4px rgba(46, 18, 82, 0.2)); }
.panel-logo .script-mark { font-size: clamp(46px, 4.3vw, 62px); margin-right: 0.25em; }
.panel-title { margin: 10px 0 14px; font-size: 22px; font-weight: 900; color: var(--purple-dark); line-height: 1.2; }
.checks { list-style: none; margin: 0; padding: 16px 14px; background: var(--purple-tint); border-radius: 20px; display: grid; gap: 14px; text-align: left; }
.checks li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; font-weight: 800; font-size: 16px; line-height: 1.3; color: var(--purple-dark); }
.checks li::before {
  content: ""; width: 36px; height: 36px; border-radius: 50%;
  background: var(--purple-mid) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.panel-note { margin: 12px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }

/* ---------- Conversation ---------- */
/* The seafloor continues under the conversation so it keeps the underwater feel. */
.conversation {
  padding: 30px clamp(16px, 3vw, 40px) 48px;
  background: linear-gradient(180deg, #eccb93 0, #f6e2bd 70px, #fbf1de 220px, var(--bg) 520px);
}
.conversation[hidden] { display: none; }
.conversation-card {
  max-width: 980px; margin: 0 auto; background: var(--card); border: 1px solid var(--line);
  border-radius: 28px; box-shadow: var(--shadow); overflow: hidden;
}
.conversation-head {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 24px 18px; background: var(--purple); color: #fff;
}
.conversation-head::after { /* gold wave, like the site header */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 10' preserveAspectRatio='none'%3E%3Cpath d='M0 5C150 0 300 10 450 4S580 3 600 5V10H0Z' fill='%23fdd023'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.conversation-head h2 { margin: 0; font-size: 20px; font-weight: 900; display: flex; align-items: center; gap: 10px; }
.conversation-head h2::before {
  content: ""; width: 34px; height: 31px; flex: none;
  background: url("img/claw-icon.webp") center / contain no-repeat;
}
.conversation-head .linklike { color: #fff; font-size: 15px; font-weight: 700; }
.messages { display: flex; flex-direction: column; gap: 18px; padding: 24px; }
.ask-followup { margin: 0 24px 24px; box-shadow: 0 4px 14px rgba(46, 18, 82, 0.1); border: 2px solid var(--field-border); }
.ask-followup:focus-within { border-color: var(--purple-dark); box-shadow: 0 0 0 3px var(--gold); }

.msg { padding: 14px 18px; border-radius: 18px; max-width: 100%; overflow-wrap: anywhere; }
.msg p { margin: 0 0 8px; }
.msg p:last-child { margin-bottom: 0; }
.msg.user {
  position: relative; align-self: flex-end; background: #e9def8;
  color: var(--purple-dark); font-weight: 800; max-width: 80%; white-space: pre-wrap;
  border-radius: 26px; padding: 12px 22px; margin-right: 8px; box-shadow: var(--shadow-sm);
}
.msg.user::after { /* bubble tail */
  content: ""; position: absolute; right: -9px; top: 0; width: 22px; height: 20px;
  background: #e9def8; clip-path: polygon(0 0, 100% 0, 30% 100%);
}
.msg-row { display: flex; align-items: flex-start; gap: 12px; }
.avatar {
  flex: none; width: 64px; height: 64px; border-radius: 50%; margin-top: 4px;
  background: #fff; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--gold), var(--shadow-sm);
}
.msg.bot {
  position: relative; flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(46, 18, 82, 0.1); border-radius: 24px; padding: 16px 20px; margin-left: 6px;
}
.msg.bot::before { /* bubble tail pointing at Clawdia */
  content: ""; position: absolute; left: -8px; top: 24px; width: 14px; height: 14px;
  background: inherit; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transform: rotate(45deg); border-radius: 0 0 0 3px;
}
.msg.error { background: var(--error-bg); }
.msg.not-found { border-left: 5px solid var(--gold); }
/* A referral: no handbook passage answers, so Clawdia shows who to contact instead (never as an answer) */
.msg.referral { border-left: 5px solid var(--purple-mid); }
.referral-tag {
  display: inline-block; margin: 0 0 8px; padding: 3px 12px; border-radius: 999px; background: var(--purple-tint);
  color: var(--purple-dark); font-size: 13px; font-weight: 800;
}
/* Thinking indicator: three purple dots that gently rise and fade while Clawdia looks up an answer */
.msg.bot.thinking {
  flex: 0 1 auto; display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 20px; color: var(--purple-dark); font-weight: 700; font-style: italic;
  background: linear-gradient(180deg, #fff, var(--purple-tint));
}
.thinking-dots {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 6px 10px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 2px var(--gold);
}
.thinking-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--purple-mid);
  animation: thinking-bob 1.2s ease-in-out infinite;
}
.thinking-dot:nth-child(2) { animation-delay: 0.15s; }
.thinking-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes thinking-bob {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30% { transform: translateY(-5px); opacity: 1; }
}
.lead { font-weight: 700; }
.quote { margin: 10px 0; padding: 12px 18px; border-left: 5px solid var(--purple-mid); background: #f8f5fc; border-radius: 4px 16px 16px 4px; }
.quote p, .passage-body p { margin: 0 0 6px; }
.quote p:last-child { margin-bottom: 0; }
.quote ul, .passage-body ul { margin: 4px 0 6px; padding-left: 22px; }
.also { font-size: 15px; color: var(--muted); }
.msg .suggestions .chip { box-shadow: none; background: var(--purple-tint); font-size: 14px; }
.chip:focus-visible, .msg .suggestions .chip:focus-visible { box-shadow: 0 0 0 2px var(--gold); }

/* Clawdia's follow-up question and quick answers */
.ask-block { margin-top: 12px; padding: 12px 16px; background: var(--gold-soft); border-left: 5px solid var(--gold); border-radius: 0 14px 14px 0; }
.ask-text { font-weight: 800; color: var(--purple-dark); }
.answer-choices { margin-top: 10px; gap: 8px; }
.msg .answer-chip { background: #fff; border-color: var(--purple-mid); }
.msg .answer-chip:hover:not(:disabled) { background: var(--purple-tint); }
.msg .answer-chip.chosen { background: var(--purple); border-color: var(--purple); color: #fff; }
.msg .answer-chip:disabled { cursor: default; opacity: 0.6; }
.msg .answer-chip.chosen:disabled { opacity: 1; }

/* Official websites outside the handbook */
.external { margin-top: 12px; padding: 10px 14px; background: #fff; border: 2px dashed var(--purple-tint-2); border-radius: 14px; font-size: 15px; }
.external h3 { margin: 0 0 4px; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.external a { font-weight: 800; }
.external-note { color: var(--muted); }

/* Approved linked resources (job aids, policies, forms), each kept apart from the handbook's words */
.resource { margin-top: 12px; padding: 10px 14px; background: #fff; border: 2px solid var(--purple-tint-2); border-left-width: 6px; border-radius: 14px; font-size: 15px; }
.resource h3 { margin: 0 0 4px; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.resource-title { margin: 0 0 4px; }
.resource-title a { font-weight: 800; overflow-wrap: anywhere; }
.resource-covers, .resource-note { margin: 4px 0; color: var(--muted); }
.form-open { display: inline-block; margin: 6px 0 4px; padding: 10px 16px; border-radius: 999px; background: var(--purple); color: #fff; font-weight: 800; text-decoration: none; overflow-wrap: anywhere; min-height: 44px; box-sizing: border-box; line-height: 24px; }
.form-open:hover, .form-open:focus-visible { background: var(--purple-dark, var(--purple)); color: var(--gold, #fdd023); text-decoration: underline; }
.form-open::after { content: " \2197"; }
/* Verified direct form links under the quoted handbook text (direct_forms.py) */
.form-links { margin: 10px 0 4px; }
.form-link { margin: 0 0 8px; }
.form-link .form-open { margin: 0; max-width: 100%; }
.form-link-source { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.resource-quote { margin: 8px 0; }
.resource-secondary { border-style: dashed; }
.resource-meta { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; }
.resource-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 12px; }
.resource-table th, .resource-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }

/* Contacts from the Who to Contact page, and university-wide LSU resources kept apart from them */
.contacts { margin-top: 12px; padding: 10px 14px; background: #fff; border: 2px solid var(--purple-tint-2); border-left: 6px solid var(--purple); border-radius: 14px; font-size: 15px; }
.contacts h3 { margin: 0 0 4px; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.contacts-university { border-left-color: var(--gold); border-style: dashed solid dashed solid; }
.contacts-for { margin: 0 0 4px; }
.contacts-for a { font-weight: 800; }
.contacts-note, .contact-note, .contacts-cite { margin: 4px 0; color: var(--muted); }
.contacts-cite { font-size: 13px; }
.contact-list { list-style: none; margin: 6px 0; padding: 0; }
.contact { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.contact:last-child { border-bottom: 0; }
.contact-name { color: var(--purple-dark); }
.contact-role { color: var(--muted); font-size: 14px; }
.contact-email { font-weight: 700; overflow-wrap: anywhere; }
.contact-note { font-size: 14px; }
.contact-quote-page { color: var(--muted); font-size: 13px; }

/* Org charts: people from the Admin-maintained transcription, then the chart picture from the handbook itself */
.research { margin-top: 12px; padding: 10px 14px; background: #fff; border: 2px solid var(--purple-tint-2); border-left: 6px solid var(--purple); border-radius: 14px; font-size: 15px; }
.research h3 { margin: 0 0 4px; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.research-group { margin: 10px 0 0; font-size: 14px; font-weight: 800; color: var(--purple-dark); }
.research-other { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 4px; }
.research-other > summary { cursor: pointer; padding: 6px 0; list-style: none; }
.research-other > summary::-webkit-details-marker { display: none; }
.research-other > summary::before { content: "▸"; display: inline-block; width: 1.1em; color: var(--purple); font-weight: 900; }
.research-other[open] > summary::before { content: "▾"; }
.research-other .research-group { display: inline; margin: 0; }
.research-group-emeritus > summary, .research-group-adjunct > summary { color: var(--muted); }
.researcher-list { list-style: none; margin: 4px 0 6px; padding: 0; }
.researcher { padding: 8px 0; border-bottom: 1px solid var(--line); }
.researcher:last-child { border-bottom: 0; }
.researcher-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.researcher-name { font-weight: 800; color: var(--purple-dark); }
a.researcher-name { color: var(--purple); }
.researcher-title { color: var(--muted); font-size: 14px; }
.researcher-interests { margin: 4px 0 2px; line-height: 1.45; overflow-wrap: anywhere; }
.researcher-interests mark { background: var(--gold-soft); color: inherit; padding: 0 2px; border-radius: 3px; }
.researcher-label { font-weight: 700; color: var(--purple-dark); }
.researcher-note { margin: 4px 0; padding: 4px 8px; background: #fff8e1; border: 1px solid #f1d27a; border-radius: 8px; color: #6b4e00; font-size: 13.5px; }
.researcher-cite { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.researcher-cite a { font-weight: 700; }
.research-more { margin: 4px 0; }
.research-coverage { margin: 8px 0 2px; color: var(--muted); font-size: 13.5px; }

.org { margin-top: 12px; padding: 10px 14px; background: #fff; border: 2px solid var(--purple-tint-2); border-left: 6px solid var(--gold); border-radius: 14px; font-size: 15px; }
.org h3 { margin: 0 0 4px; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.org-group { margin: 8px 0 0; font-weight: 800; color: var(--purple-dark); font-size: 14px; }
.org-list { list-style: none; margin: 4px 0 6px; padding: 0; }
.org-person { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.org-person:last-child { border-bottom: 0; }
.org-name { color: var(--purple-dark); }
.org-vacant .org-name { color: var(--muted); font-style: italic; }
.org-title { color: var(--ink); font-size: 14px; }
.org-group-current { color: #6b4e00; }
.org-list-current { background: #fff8e1; border: 1px solid #f1d27a; border-radius: 10px; padding: 0 10px; }
.org-correction { flex-basis: 100%; color: #6b4e00; font-size: 13.5px; }
.org-boss { flex-basis: 100%; color: var(--muted); font-size: 13.5px; }
.org-email { flex-basis: 100%; font-size: 14px; }
.org-email a { font-weight: 700; overflow-wrap: anywhere; }
.org-email-from { color: var(--muted); font-size: 12.5px; }
.org-note, .org-cite { margin: 6px 0; color: var(--muted); font-size: 14px; }
.org-cite { font-size: 13px; }
.org-chart { margin: 10px 0 4px; }
.org-chart-link { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; cursor: zoom-in; }
.org-chart-img { display: block; width: 100%; height: auto; }
.org-chart figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }
.org-admin-chart { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; }

/* Live GSA rates and the travel policy behind them, each kept apart from the handbook's words */
.quote-label, .policy h3, .rates h3 { margin: 12px 0 4px; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.policy { margin-top: 12px; padding: 10px 14px; background: #fff; border: 2px solid var(--purple-tint-2); border-radius: 14px; font-size: 15px; }
.policy h3, .rates h3 { margin-top: 0; }
.policy ul { margin: 0; padding-left: 20px; }
.policy li { margin-bottom: 6px; }
.policy-cite { display: block; color: var(--muted); font-size: 13px; }
.policy-cite a { font-weight: 700; }
.holidays { margin-top: 12px; padding: 10px 14px; background: #fff; border: 2px solid var(--purple-tint-2); border-left: 6px solid var(--gold); border-radius: 14px; font-size: 15px; }
.holidays h3 { margin: 0 0 6px; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.holiday-scroll { overflow-x: auto; }
.holiday-table { width: 100%; border-collapse: collapse; }
.holiday-table th, .holiday-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.holiday-table th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.holiday-table tr:last-child td { border-bottom: 0; }
.holiday-name { font-weight: 700; color: var(--ink); }
.holiday-date { font-weight: 800; color: var(--purple-dark); }
/* The holiday asked about: not shown by color alone (WCAG 1.4.1), it also gets a purple bar and bolder text. */
.holiday-match td { background: var(--gold-soft); font-weight: 800; }
.holiday-match td:first-child { box-shadow: inset 5px 0 0 var(--purple); padding-left: 13px; }
.holiday-past td { color: var(--muted); font-weight: 600; }
.holiday-today td { background: var(--gold); }
.holiday-tag { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: 999px; background: var(--purple); color: #fff; font-size: 12px; font-weight: 800; }
.holiday-tag-past { background: var(--line); color: var(--muted); }
.holiday-cite { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.holiday-cite a { font-weight: 700; }
.holiday-note { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.calendar-note { margin-top: 12px; padding: 8px 14px; background: var(--purple-tint); border-left: 5px solid var(--purple-mid); border-radius: 0 14px 14px 0; font-size: 14.5px; }
.calendar-note p { margin: 0; }
.rates { margin-top: 12px; padding: 10px 14px; background: var(--gold-soft); border: 2px solid var(--gold); border-radius: 14px; font-size: 15px; }
.rates-head { margin: 0 0 6px; }
.rates h4 { margin: 10px 0 4px; font-size: 15px; color: var(--purple-dark); }
.rates-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
.rates-table th, .rates-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.rates-table th { font-weight: 700; color: var(--ink); }
.rates-table td { font-weight: 800; color: var(--purple-dark); }
.rates-table tr:last-child th, .rates-table tr:last-child td { border-bottom: 0; }
.calc { margin: 0; padding-left: 20px; }
.calc li { margin-bottom: 4px; overflow-wrap: anywhere; }
.calc-label { font-weight: 700; }
.rates-note { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.rates-note a { font-weight: 700; }
@media (max-width: 520px) {
  .rates-table th, .rates-table td { display: block; padding: 4px 10px; border: 0; }
  .rates-table td { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
}

/* Handbook sources */
.sources { margin-top: 14px; display: grid; gap: 10px; }
.sources h3 { margin: 0; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.source {
  background: #fff; border: 1px solid var(--purple-tint-2); border-radius: 18px; padding: 0; font-size: 15px;
  overflow: hidden; box-shadow: 0 3px 10px rgba(46, 18, 82, 0.07);
}
.source-head { display: flex; align-items: center; gap: 10px; padding: 11px 16px; background: var(--purple-tint); }
.source-meta, .source > a, .passage { margin-left: 16px; margin-right: 16px; }
.source-meta { padding-top: 8px; }
.source > :last-child { margin-bottom: 12px; }
.source-head::before {
  content: ""; flex: none; width: 20px; height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2.5h8l4.5 4.5v14.5H6z' fill='none' stroke='%23461d7c' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M14 2.5V7h4.5M9 12h6M9 16h6' fill='none' stroke='%23461d7c' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.source-path { font-weight: 800; color: var(--purple-dark); }
.source-meta { color: var(--muted); font-size: 14px; margin-top: 2px; }
.source-meta a { font-weight: 700; }
.page-thumb-note { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.page-thumb { display: block; max-width: 100%; max-height: 420px; margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.passage { margin-top: 8px; }
.passage summary {
  cursor: pointer; color: var(--purple); font-weight: 800; font-size: 14px;
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 8px 14px; background: var(--purple-tint); border-radius: 12px;
}
.passage summary:hover { background: var(--purple-tint-2); }
.passage summary::-webkit-details-marker { display: none; }
.passage summary::after {
  content: ""; width: 9px; height: 9px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.15s;
}
.passage[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.passage-body {
  margin-top: 8px; padding: 14px 16px; background: #fff; border: 1px solid var(--purple-tint-2); border-radius: 14px;
  font-size: 15px; max-height: 360px; overflow-y: auto;
}
.passage-title { display: block; margin: 0 0 8px; padding: 2px 8px; background: var(--gold-soft); font-weight: 800; font-size: 16px; color: var(--purple-dark); border-radius: 4px; }
.footnote { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* Original handbook pages (DES Graduate Handbook): pictures of the PDF pages, in page order */
.page-images { margin: 8px 16px 0; }
.page-images summary {
  cursor: pointer; color: var(--purple); font-weight: 800; font-size: 14px;
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 8px 14px; background: var(--purple-tint); border-radius: 12px;
}
.page-images summary:hover { background: var(--purple-tint-2); }
.page-images summary::-webkit-details-marker { display: none; }
.page-images summary::after {
  content: ""; flex: none; width: 9px; height: 9px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.15s;
}
.page-images[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.page-image-list { display: grid; gap: 14px; margin-top: 10px; }
.page-image { margin: 0; }
.page-image-open {
  display: block; width: 100%; max-width: 760px; padding: 0; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: #fff; cursor: zoom-in; box-shadow: var(--shadow-sm);
}
.page-image-open:focus-visible { outline: 3px solid var(--purple-dark); outline-offset: 2px; box-shadow: 0 0 0 2px var(--gold); }
.page-image-img { display: block; width: 100%; height: auto; background: #fff; }
.page-image figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }
.page-image figcaption a { font-weight: 700; }
.page-image-error {
  margin: 0; padding: 12px 14px; background: var(--warn-bg); border-left: 5px solid #c98a00; border-radius: 0 12px 12px 0;
  font-size: 14px;
}
.page-image-error a { font-weight: 700; }

/* The enlarged page */
.page-viewer {
  width: min(1100px, 100vw - 24px); max-width: none; height: calc(100vh - 24px); max-height: none; padding: 0;
  border: 0; border-radius: 18px; background: var(--card); color: var(--ink); box-shadow: var(--shadow);
  overflow: hidden;
}
.page-viewer[open] { display: flex; flex-direction: column; }
.page-viewer::backdrop { background: rgba(20, 8, 40, 0.72); }
.viewer-bar, .viewer-foot {
  flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--purple-tint);
}
.viewer-title { flex: 1; margin: 0; font-weight: 800; color: var(--purple-dark); }
.viewer-close, .viewer-step {
  flex: none; padding: 8px 14px; border: 0; border-radius: 999px; background: var(--purple); color: #fff;
  font: inherit; font-weight: 800; font-size: 14px; cursor: pointer;
}
.viewer-step { background: var(--card); color: var(--purple); border: 1px solid var(--purple-tint-2); }
.viewer-step:disabled { opacity: 0.4; cursor: default; }
.viewer-close:focus-visible, .viewer-step:focus-visible { outline: 3px solid var(--purple-dark); outline-offset: 2px; box-shadow: 0 0 0 2px var(--gold); }
.viewer-body { flex: 1; overflow: auto; padding: 12px; background: #ece6f4; }
.viewer-img { display: block; width: 100%; max-width: 1000px; height: auto; margin: 0 auto; background: #fff; box-shadow: var(--shadow-sm); }
.viewer-status { margin: 12px auto; max-width: 1000px; text-align: center; color: var(--muted); }
.viewer-links { flex: 1; margin: 0; text-align: center; font-size: 14px; }
.viewer-links a { font-weight: 700; }
.page-viewer [hidden] { display: none !important; }

/* Which handbook an answer comes from (each handbook is answered on its own) */
.answer-book {
  display: inline-block; margin: 0 0 8px; padding: 3px 12px; border-radius: 999px; background: var(--gold-soft);
  color: var(--purple-dark); font-size: 13px; font-weight: 800;
}
.source-book {
  flex: none; padding: 2px 10px; border-radius: 999px; background: var(--purple); color: #fff; font-size: 12px; font-weight: 800;
}
.source-head { flex-wrap: wrap; }
.owner-note { margin-top: 12px; padding: 10px 14px; background: var(--purple-tint); border-left: 5px solid var(--purple); border-radius: 0 14px 14px 0; }
.owner-note h3 { margin: 0 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--purple-dark); }
.owner-note p { margin: 0; }
.owner-note .owner-note-meta { margin-top: 4px; font-size: 13px; color: var(--muted); }
.also-in { margin-top: 10px; }

/* Answers from the CC&E website: a teal badge and globe icon, so they never look like a handbook page */
.answer-web { background: #d9f2ef; color: #0b4f4a; }
.source-web .source-book { background: #0b6b63; }
.source-web .source-head { background: #e8f6f4; }
.source-web .source-head::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%230b6b63' stroke-width='2'/%3E%3Cpath d='M3 12h18M12 3c2.6 2.6 3.8 5.6 3.8 9s-1.2 6.4-3.8 9c-2.6-2.6-3.8-5.6-3.8-9S9.4 5.6 12 3z' fill='none' stroke='%230b6b63' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.source-conflict { margin-top: 12px; padding: 10px 14px; background: var(--warn-bg); border-left: 5px solid #c98a00; border-radius: 0 14px 14px 0; }
.source-conflict h3 { margin: 0 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: #6b4a00; }
.source-conflict p { margin: 0 0 8px; }
.quote-heading { font-weight: 800; color: var(--purple-dark); margin-bottom: 2px; }
.source-stale { background: #f3f0f7; border-left-color: var(--muted); }
.source-stale h3 { color: var(--muted); }
.website-check { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.website-check a { font-weight: 700; }
.book-list { margin: 6px 0 0; padding-left: 20px; }

/* ---------- Admin ---------- */
.book-card { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.book-card h2 { margin: 0 0 6px; font-size: 20px; }
.notice { margin: 6px 0; padding: 8px 12px; background: var(--warn-bg); border-radius: 10px; font-size: 14px; }
.details-form { display: grid; gap: 10px; }
.details-form label { display: grid; gap: 4px; font-size: 14px; font-weight: 700; }
.details-form input:not([type=file]), .topic-body input[name=title] { width: 100%; padding: 8px 10px; border: 1px solid var(--field-border); border-radius: 10px; font: inherit; }
.upload { display: grid; gap: 8px; }
.topic { border-top: 1px solid var(--line); padding: 8px 0; }
.topic summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.topic-body { display: grid; gap: 8px; padding: 8px 0; }
.topic-body form { display: grid; gap: 8px; }
.topic-body textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
.tag { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: #ece6f5; color: var(--purple); }
.tag.warn { background: var(--warn-bg); color: #6b4e00; }
.check { font-weight: 400; }

/* ---------- Responsive ---------- */
/* Small laptops: panel moves under the question area */
@media (max-width: 1180px) {
  .hero-inner {
    grid-template-columns: minmax(260px, 0.9fr) minmax(380px, 1.2fr);
    grid-template-areas: "mascot main" "panel panel";
  }
  .try .suggestions { grid-template-columns: 1fr; }
  .help-panel { border-radius: 30px; display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; text-align: left; align-items: center; padding: 18px 24px; margin: 18px 0 0; }
  .panel-logo { grid-row: span 2; }
  .panel-title { margin: 0; }
  .checks { grid-column: 2; grid-template-columns: repeat(3, 1fr); }
  .panel-note { grid-column: 1 / -1; text-align: center; }
}

/* Tablets */
@media (max-width: 860px) {
  .brand-long { display: none; }
  .brand-short { display: inline; }
  .hero { padding-top: 18px; min-height: 0; }
  /* Stacked layout: the seabed sits right under Clawdia, framed by seagrass, and the sand continues below. */
  .hero {
    background:
      linear-gradient(180deg, rgba(231, 193, 137, 0) 400px, #e7c189 515px, #f3dcb0 820px, #ecca95),
      url("img/underwater.webp") center top / auto 520px no-repeat;
  }
  .hero::before, .hero::after {
    bottom: auto; top: 20px; height: 380px;
    -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 96%); mask-image: linear-gradient(180deg, #000 72%, transparent 96%);
  }
  .hero-inner { grid-template-columns: 1fr; grid-template-areas: "mascot" "main" "panel"; gap: 0; }
  .hero-mascot { margin: 0 0 -26px; position: relative; z-index: 2; }
  .hero-mascot img { width: 100%; max-width: 320px; margin: 0 auto; }
  .hero-main { gap: 16px; }
  .bubble { padding-top: 30px; }
  .bubble::before { /* tail points up at Clawdia */
    left: 50%; top: -22px; width: 50px; height: 30px; transform: translateX(-50%);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
  }
  .try .suggestions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-panel { margin-top: 22px; grid-template-columns: 1fr; text-align: center; }
  .panel-logo { grid-row: auto; }
  .checks { grid-column: auto; grid-template-columns: 1fr; }
}

/* Phones: keep the question box near the top of the screen, and the conversation full width */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .topbar-inner { padding: 10px 14px 4px; gap: 10px; }
  .lsu-logo { height: 30px; max-width: 110px; }
  .lsu-text { font-size: 17px; }
  .brand { gap: 10px; }
  .brand-divider { min-height: 28px; }
  .brand-title { font-size: 17px; }
  .nav { gap: 12px; }
  .nav span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .icon { width: 26px; height: 26px; }
  .hero { padding: 12px 14px 24px; }
  .hero {
    background:
      linear-gradient(180deg, rgba(231, 193, 137, 0) 300px, #e7c189 395px, #f3dcb0 700px, #ecca95),
      url("img/underwater.webp") center top / auto 400px no-repeat;
  }
  .hero::before, .hero::after { top: 10px; height: 300px; }
  .hero-mascot { margin-bottom: -20px; }
  .hero-mascot img { max-width: 210px; }
  .bubble { border-radius: 30px; padding: 24px 16px 18px; }
  .bubble h1 .script-mark { font-size: 52px; }
  .bubble-sub { font-size: 19px; }
  .bubble-text { font-size: 15px; }
  .ask { padding-left: 16px; }
  .ask textarea { font-size: 15.5px; }
  .send { width: 52px; }
  .try h2 { font-size: 20px; }
  .try .suggestions { grid-template-columns: 1fr; gap: 8px; }
  .chip { font-size: 14px; padding: 8px 14px; }
  .try .chip { text-align: left; padding: 9px 16px; }
  .help-panel { border-radius: 120px 120px 26px 26px; padding: 24px 16px 18px; }
  .panel-logo .script-mark { font-size: 48px; }
  .conversation { padding: 18px 0 24px; }
  .conversation-card { border-radius: 22px 22px 0 0; border-left: none; border-right: none; }
  .conversation-head { padding: 12px 16px 16px; }
  .conversation-head h2 { font-size: 18px; }
  .messages { padding: 16px 10px; gap: 14px; }
  .msg .contacts, .msg .org, .msg .resource, .msg .policy, .msg .rates, .msg .external { padding: 10px 10px 10px 12px; }
  .msg .org { border-left-width: 4px; }
  .msg .contacts { border-left-width: 4px; }
  .msg .quote { padding: 10px 12px; }
  .ask-followup { margin: 0 12px 16px; }
  .msg-row { gap: 6px; }
  .avatar { width: 38px; height: 38px; border-width: 2px; }
  .msg { padding: 12px 14px; }
  .msg.bot { padding: 12px 12px; margin-left: 2px; border-radius: 20px; }
  .msg.bot::before { top: 12px; }
  .msg.user { max-width: 88%; padding: 10px 16px; }
  .msg.bot.thinking { padding: 10px 14px; gap: 10px; font-size: 15px; }
  .thinking-dots { padding: 5px 8px; gap: 5px; }
  .thinking-dot { width: 8px; height: 8px; }
  .source-head { padding: 10px 12px; }
  .source-meta, .source > a, .passage { margin-left: 12px; margin-right: 12px; }
  .page-images { margin-left: 8px; margin-right: 8px; }
  .page-viewer { width: 100vw; height: 100dvh; border-radius: 0; }
  .viewer-body { padding: 6px; }
  .viewer-foot { flex-wrap: wrap; padding: 8px 10px; }
  .viewer-links { order: -1; flex-basis: 100%; }
  .viewer-step { flex: 1; }
  .viewer-title { font-size: 15px; }
}

/* ---------- Clawdia follows the visitor (desktops and laptops) ---------- */
/* The rail is only used on screens wider than 860px; phones and tablets keep the picture in the welcome section. */
.mascot-rail { display: none; }
@media (width > 860px) {
  .page-chat {
    --side-pad: clamp(16px, 3vw, 44px);  /* the welcome section's side padding */
    --rail-gap: clamp(12px, 1.8vw, 28px); /* the gap between its columns */
    /* Clawdia's width: about a quarter of the window, and never taller than the window leaves room for */
    --rail: clamp(220px, min(27vw, calc((100vh - 90px) * 1.11)), 520px);
  }
  /* A zero-height strip at the top of the page that sticks to the top of the window, so Clawdia sits high on the
     first screen and stays beside the conversation as the visitor scrolls. It lines up with the welcome section's
     left column, and clicks pass through it. */
  .mascot-rail { display: block; position: sticky; top: 0; height: 0; z-index: 3; pointer-events: none; }
  .mascot-rail-inner { max-width: calc(1520px + 2 * var(--side-pad)); margin: 0 auto; padding: 30px var(--side-pad) 0; }
  .mascot-rail img {
    display: block; width: var(--rail); height: auto;
    filter: drop-shadow(0 18px 14px rgba(20, 60, 80, 0.3));
  }
  /* The welcome section keeps Clawdia's column empty; the picture inside it is for phones and tablets only. */
  .hero-mascot { align-self: stretch; margin: 0; }
  .hero-mascot img { display: none; }
  .hero-inner { grid-template-columns: var(--rail) minmax(440px, 1.22fr) minmax(250px, 0.62fr); }
  /* The conversation starts to the right of Clawdia, so she never covers a question, an answer or its buttons. */
  .conversation {
    padding-left: calc(max(var(--side-pad), (100% - 1520px) / 2 + var(--side-pad)) + var(--rail) + var(--rail-gap));
    padding-right: max(var(--side-pad), (100% - 1520px) / 2 + var(--side-pad));
  }
}
/* Small laptops: the "What I can help with" panel moves under the question area, still right of Clawdia. */
@media (width > 860px) and (max-width: 1180px) {
  .hero-inner { grid-template-columns: var(--rail) minmax(0, 1fr); grid-template-areas: "mascot main" "mascot panel"; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .passage summary::after, .page-images summary::after { transition: none; }
  /* Still dots, shaded light to dark, so the indicator reads as "working" without moving */
  .thinking-dot { animation: none; }
  .thinking-dot:nth-child(1) { opacity: 0.45; }
  .thinking-dot:nth-child(2) { opacity: 0.7; }
}

/* LSU's holiday schedule on a phone: a smaller table, so each date fits on one or two lines. */
@media (max-width: 520px) {
  .holidays { padding: 8px 10px; }
  .holiday-table { font-size: 14px; }
  .holiday-table th, .holiday-table td { padding: 5px 6px; }
}

/* ---------- Report to my administrators (unanswered questions) ---------- */
.report-box { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #f6f1fb; border: 1px solid #e3d7f1; }
.report-box p { margin: 0 0 8px; }
.report-box .report-button { margin-top: 2px; max-width: 100%; white-space: normal; }
.report-button[aria-disabled="true"] { opacity: 0.6; cursor: wait; }
.report-box .report-error { color: #8a1c1c; margin: 8px 0 0; }
.report-box .report-thanks { margin: 0; font-weight: 700; color: var(--purple); }

/* Admin: unanswered questions */
.report-list { list-style: none; padding: 0; margin: 12px 0 0; }
.report-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.report-item.report-resolved { opacity: 0.75; }
.report-question { font-weight: 700; margin: 0 0 4px; overflow-wrap: anywhere; }
.report-item p { margin: 0 0 6px; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.report-actions form { margin: 0; }
.report-remove summary { cursor: pointer; color: #8a1c1c; padding: 6px 0; }
.report-remove form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.report-category { margin: 0 0 4px; }
.report-cat-answer .report-cat-tag { background: #fde9d9; color: #7a3a00; }
.report-answer { margin: 6px 0 8px; }
.report-answer summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.report-answer-text { white-space: pre-line; overflow-wrap: anywhere; max-height: 360px; overflow-y: auto; padding: 8px 10px;
  border-left: 3px solid var(--line); background: #faf8fc; margin: 4px 0 6px; }
.report-sources { margin: 2px 0 6px; padding-left: 20px; overflow-wrap: anywhere; }
.report-sources-label { margin: 0; }
.report-explanations { margin: 0 0 8px; }
.report-explanations ul { margin: 2px 0 0; padding-left: 20px; overflow-wrap: anywhere; }

/* ---------- "Not the answer you were looking for?" (substantive answers, GitHub issue #51) ---------- */
.answer-report { margin-top: 12px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 14px; color: #4f4a57; }
.answer-report p { margin: 0; }
.answer-report .answer-report-open { font-size: inherit; }
.answer-report-form { margin-top: 8px; }
.answer-report-form label { display: block; font-weight: 700; margin-bottom: 2px; }
.answer-report-form .answer-report-hint { margin: 0 0 6px; font-size: 13px; }
.answer-report-form textarea { display: block; width: 100%; box-sizing: border-box; min-height: 64px; resize: vertical;
  font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.answer-report-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.answer-report-actions button[aria-disabled="true"] { opacity: 0.6; cursor: wait; }
.answer-report .report-error { color: #8a1c1c; margin: 8px 0 0; }
.answer-report .report-thanks { font-weight: 700; color: var(--purple); }
.btn-danger { background: #8a1c1c; color: #fff; border: 2px solid #8a1c1c; border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 800; cursor: pointer; }
.storage-temporary { color: #8a1c1c; font-weight: 700; }
