.service-entry-link { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 0; border-top: 1px solid #edf2ef; text-decoration: none; line-height: 1.5; }
.service-entry-link > span { font-size: .92rem; }
.service-entry-link > small { color: #245a4d; white-space: nowrap; font-size: .76rem; }
.service-entry-link:hover { background: #f4f7f5; }
.service-breadcrumb { line-height: 1.6; margin-bottom: 25px; color: #68736f; font-size: .88rem; }
.service-guide { max-width: 880px; }
.service-guide .files-heading h1 { font-size: clamp(1.8rem,5vw,2.6rem); }
.service-guide-card { background: white; border: 1px solid #dce3df; border-radius: 12px; padding: 22px 26px; margin: 14px 0; line-height: 1.65; }
.service-guide-card h2 { margin: 0 0 12px; font-size: 1.05rem; }
.service-guide-card p { color: #52625a; margin: 8px 0; }
.service-guide-card li { margin-bottom: 10px; }
.service-guide-card ul { padding-left: 22px; margin-bottom: 0; }
.service-duration { color: #183d35 !important; font-weight: 700; font-size: 1.6rem; }
.service-guide-actions { display: flex; justify-content: space-between; gap: 15px; margin-top: 24px; flex-wrap: wrap; }
.service-delay-label { margin: 14px 0; }
@media(max-width:480px) { .service-entry-link { align-items: flex-start; flex-direction: column; gap: 4px; } .service-guide-card { padding: 18px; } .service-guide-actions > a { width: 100%; } }
.nav-unread { margin-left: 4px; padding: 1px 5px; border-radius: 8px; background: #e1f2eb; color: #183d35; font-size: .7rem; }
.nav-unread[hidden] { display: none; }
.services-shell { width: min(1120px, calc(100% - 28px)); margin: 32px auto 60px; }
.services-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; align-items: start; }
.service-office { background: white; border: 1px solid #dce3df; border-radius: 12px; overflow: hidden; }
.service-office > summary { display: flex; gap: 12px; align-items: center; cursor: pointer; padding: 20px; list-style: none; }
.service-office > summary::-webkit-details-marker { display: none; }
.service-office strong, .service-office small { display: block; }
.service-office small { color: #68736f; margin-top: 5px; line-height: 1.5; }
.service-chevron { margin-left: auto; color: #68736f; }
.service-office[open] > summary .service-chevron { transform: rotate(180deg); }
.service-badge { color: #245a4d; font-size: .75rem; white-space: nowrap; }
.service-content { border-top: 1px solid #dce3df; padding: 6px 20px 18px; }
.service-inbox { display: inline-block; margin: 12px 0; color: #245a4d; }
.service-entry { border-top: 1px solid #edf2ef; }
.service-entry > summary { padding: 13px 0; cursor: pointer; font-size: .9rem; }
.service-form { display: grid; gap: 12px; padding-bottom: 16px; }
.service-form textarea { width: 100%; min-width: 0; }
.service-form .primary { justify-self: start; }
.service-history { margin-top: 30px; }
.service-history article { background: white; border: 1px solid #dce3df; border-radius: 10px; padding: 16px; margin: 10px 0; overflow-wrap: anywhere; }
.service-history p { color: #68736f; font-size: .86rem; }
.service-history a { display: inline-block; margin-left: 15px; }
@media(max-width:720px) { .services-grid { grid-template-columns: 1fr; } .app-topbar { flex-wrap: wrap; min-height: 86px; padding-block: 8px !important; } .top-nav { width: 100%; justify-content: center; order: 4 !important; } .app-shell { grid-template-rows: auto 1fr !important; } }
:root {
  --ink: #17211f;
  --muted: #68736f;
  --line: #dce3df;
  --paper: #f4f7f5;
  --surface: #ffffff;
  --forest: #183d35;
  --forest-2: #245a4d;
  --teal: #2d7b68;
  --gold: #b88a3b;
  --danger: #9e3c35;
  --shadow: 0 20px 55px rgba(17, 39, 33, .11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
button, input, textarea, select { font: inherit; }
select { padding: 10px; border: 1px solid #cfd8d3; border-radius: 9px; max-width: 100%; background: white; }
.teacher-panel { margin-bottom: 18px; }
.teacher-panel p { line-height: 1.6; }
.teacher-panel details { margin: 14px 0; }
.teacher-panel summary { cursor: pointer; font-weight: 700; }
.teacher-panel .settings-form { max-width: 700px; }
.new-activity { position: fixed; top: 78px; left: 50%; transform: translateX(-50%); z-index: 20; background: #183d35; color: white; padding: 12px 18px; border: 1px solid white; border-radius: 12px; cursor: pointer; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.login-page { background: radial-gradient(circle at 20% 10%, #2b6b5a 0, #173b33 35%, #102822 100%); display: grid; place-items: center; padding: 24px; }
.login-page::before { content: ""; position: fixed; inset: 0; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 38px 38px; pointer-events: none; }
.login-shell { width: min(100%, 460px); position: relative; z-index: 1; }
.login-card { background: rgba(255,255,255,.98); border-radius: 18px; padding: 42px; box-shadow: 0 35px 90px rgba(0,0,0,.28); border-top: 4px solid var(--gold); }
.seal, .brand-mark { display: grid; place-items: center; background: var(--forest); color: white; font-family: Georgia, serif; letter-spacing: .04em; }
.seal { width: 58px; height: 58px; border-radius: 50%; font-size: 1.2rem; margin-bottom: 28px; box-shadow: inset 0 0 0 4px rgba(255,255,255,.13); }
.eyebrow { color: var(--teal); font-weight: 800; letter-spacing: .13em; font-size: .75rem; margin: 0 0 8px; }
.login-card h1, .admin-heading h1 { font-family: Georgia, serif; font-size: clamp(2rem, 5vw, 2.65rem); margin: 0 0 10px; font-weight: 500; }
.login-copy { color: var(--muted); line-height: 1.65; margin: 0 0 24px; }
.login-form, .settings-form { display: grid; gap: 16px; }
label { display: grid; gap: 7px; font-size: .88rem; font-weight: 700; color: #394640; }
input, textarea { border: 1px solid #cfd8d3; border-radius: 9px; background: white; padding: 12px 13px; color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s; }
input:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(45,123,104,.13); }
.primary, .secondary, .danger-quiet, .send-button { border: 0; border-radius: 9px; padding: 12px 16px; font-weight: 800; cursor: pointer; text-decoration: none; text-align: center; }
.primary { background: var(--forest); color: white; }
.primary:hover { background: var(--forest-2); }
.prototype-note { margin: 24px 0 0; color: #8a9590; text-align: center; font-size: .78rem; }
.notice { padding: 12px 14px; border-radius: 8px; margin: 0 0 18px; font-size: .9rem; }
.notice.error { background: #fae9e7; color: #7b2f29; }
.notice.success { background: #e1f2eb; color: #185741; }

.app-shell { min-height: 100vh; display: grid; grid-template-rows: 68px 1fr; }
.app-topbar { background: var(--forest); color: white; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; box-shadow: 0 2px 12px rgba(0,0,0,.18); position: relative; z-index: 4; }
.app-brand, .student-meta, .admin-top > div { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.app-brand strong { display: block; font-family: Georgia, serif; font-size: 1.05rem; letter-spacing: .02em; }
.app-brand small { display: block; opacity: .65; margin-top: 2px; }
.student-meta { font-size: .84rem; }
.student-meta > span { color: #b9cdc6; }
.student-meta a, .admin-top a { color: white; opacity: .78; text-decoration: none; border-left: 1px solid rgba(255,255,255,.2); padding-left: 13px; }
.top-nav { align-self: stretch; display: flex; align-items: center; gap: 4px; margin-left: auto; margin-right: 20px; }
.top-nav a { color: #c8d9d3; text-decoration: none; font-size: .8rem; font-weight: 700; padding: 9px 11px; border-radius: 7px; }
.top-nav a:hover, .top-nav a.active { color: white; background: rgba(255,255,255,.11); }
.workspace { min-height: 0; display: grid; grid-template-columns: 260px minmax(420px, 1fr) 320px; height: calc(100vh - 68px); }
.contacts-panel, .case-panel { background: #f8faf9; overflow-y: auto; }
.contacts-panel { border-right: 1px solid var(--line); }
.case-panel { border-left: 1px solid var(--line); }
.panel-title { height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line); font-weight: 800; }
.panel-title small, .section-row > span { background: #e4ece8; color: var(--forest); min-width: 25px; height: 25px; display: grid; place-items: center; border-radius: 999px; font-size: .75rem; padding: 0 7px; }
.contact-list { padding: 8px; display: grid; gap: 3px; }
.contact-item { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; text-decoration: none; }
.contact-item:hover { background: #edf3f0; }
.contact-item.active { background: #dfece7; box-shadow: inset 3px 0 0 var(--teal); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #d7e4df; color: var(--forest); font-weight: 800; }
.avatar.large { width: 44px; height: 44px; }
.contact-copy { min-width: 0; }
.contact-copy strong, .contact-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-copy strong { font-size: .9rem; }
.contact-copy small { color: var(--muted); font-size: .74rem; margin-top: 3px; }
.unread { background: var(--teal); color: white; font-size: .72rem; font-weight: 800; min-width: 22px; height: 22px; border-radius: 99px; display: grid; place-items: center; padding: 0 6px; }
.conversation-panel { min-width: 0; min-height: 0; background: #eef2ef; display: grid; grid-template-rows: 64px 1fr auto; }
.conversation-head { background: white; border-bottom: 1px solid var(--line); padding: 9px 18px; display: flex; align-items: center; gap: 12px; }
.conversation-head h1 { font-size: 1rem; margin: 0; }
.conversation-head p { color: var(--muted); font-size: .78rem; margin: 3px 0 0; }
.message-stream { min-height: 0; overflow-y: auto; padding: 22px clamp(18px, 4vw, 58px); background-image: radial-gradient(#d7ded9 1px, transparent 1px); background-size: 24px 24px; }
.date-divider { display: flex; justify-content: center; margin-bottom: 20px; }
.date-divider span { background: rgba(255,255,255,.9); border: 1px solid var(--line); color: var(--muted); border-radius: 99px; padding: 5px 11px; font-size: .72rem; }
.message { width: fit-content; max-width: min(76%, 620px); background: white; border-radius: 4px 14px 14px 14px; padding: 10px 12px 7px; margin: 0 0 12px; box-shadow: 0 4px 14px rgba(25,48,40,.07); }
.message.student { margin-left: auto; background: #d9eee6; border-radius: 14px 4px 14px 14px; }
.message.system { margin-inline: auto; background: #fff7df; border: 1px solid #ead8a6; max-width: 88%; }
.message small { display: block; font-size: .7rem; font-weight: 800; color: var(--teal); margin-bottom: 4px; }
.message p { margin: 0; line-height: 1.48; font-size: .91rem; }
.message time { display: block; text-align: right; color: #7f8985; font-size: .66rem; margin-top: 5px; }
.attachment { display: flex; align-items: center; margin-top: 9px; padding: 9px 10px; background: rgba(255,255,255,.65); border: 1px solid rgba(33,72,61,.16); border-radius: 8px; color: var(--forest); font-size: .8rem; font-weight: 800; text-decoration: none; }
.composer { background: white; border-top: 1px solid var(--line); padding: 10px 16px 12px; display: grid; grid-template-columns: 1fr auto; gap: 9px 10px; align-items: end; }
.composer textarea { min-height: 48px; max-height: 110px; resize: vertical; background: #f7f9f8; }
.send-button { background: var(--teal); color: white; min-height: 48px; }
.send-button:disabled, .composer textarea:disabled { opacity: .5; cursor: not-allowed; }

.side-section { padding: 18px; border-bottom: 1px solid var(--line); }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.side-section h2, .panel h2 { margin: 0; font-size: .93rem; }
.empty-copy { color: var(--muted); font-size: .8rem; line-height: 1.5; margin: 12px 0 0; }
.pending-list, .document-list, .admin-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 9px; }
.pending-list li { background: white; border: 1px solid var(--line); border-radius: 9px; padding: 10px; }
.pending-list strong, .pending-list span, .pending-list time { display: block; }
.pending-list strong { font-size: .8rem; line-height: 1.35; }
.pending-list span { color: var(--muted); font-size: .69rem; margin-top: 4px; }
.pending-list time { color: var(--teal); font-size: .73rem; font-weight: 800; margin-top: 7px; }
.document-list a { display: grid; grid-template-columns: 38px 1fr; gap: 9px; align-items: center; padding: 9px; border-radius: 9px; text-decoration: none; background: white; border: 1px solid var(--line); }
.document-list a:hover { border-color: #9fb9af; }
.file-icon { width: 36px; height: 40px; display: grid; place-items: center; background: #e4eee9; color: var(--forest); border-radius: 5px; font-size: .58rem; font-weight: 900; }
.document-list strong, .document-list small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.document-list strong { font-size: .73rem; white-space: nowrap; }
.document-list small { color: var(--muted); font-size: .67rem; margin-top: 4px; }
.close-section p { color: var(--muted); font-size: .78rem; line-height: 1.5; }
.danger-quiet { width: 100%; background: #f7e8e6; color: var(--danger); border: 1px solid #ebc5c1; }
.status-closed { display: inline-block; background: #e1f2eb; color: #176046; border-radius: 99px; padding: 6px 10px; font-size: .72rem; font-weight: 800; }
.secondary { background: var(--forest); color: white; }
.secondary.block { display: block; }
.text-link { display: block; text-align: center; color: var(--teal); font-size: .78rem; margin-top: 10px; }
.toast { position: fixed; z-index: 10; top: 78px; left: 50%; transform: translateX(-50%); background: #142e28; color: white; border-radius: 9px; padding: 10px 16px; box-shadow: var(--shadow); font-size: .84rem; transition: opacity .3s, transform .3s; }
.toast.hide { opacity: 0; transform: translate(-50%, -8px); pointer-events: none; }

.admin-page { background: #eef2f0; }
.admin-top { height: 64px; background: var(--forest); color: white; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; }
.admin-shell { width: min(1180px, calc(100% - 36px)); margin: 34px auto 60px; }
.admin-heading { margin-bottom: 24px; }
.admin-heading p:last-child { color: var(--muted); margin: 4px 0 0; }
.admin-grid { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
.panel { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: 0 10px 35px rgba(22,48,40,.06); }
.panel.wide { grid-column: 2; }
.settings-form { margin-top: 18px; }
.table-wrap { overflow-x: auto; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
th { color: var(--muted); text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); }
.admin-list li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .8rem; }
.admin-list span { color: var(--muted); }

.guide-page, .listing-page, .files-page { background: #edf2ef; }
.guide-page > .app-topbar, .listing-page > .app-topbar, .files-page > .app-topbar { min-height: 68px; }
.guide-shell, .listing-shell, .files-shell { width: min(1120px, calc(100% - 34px)); margin: 34px auto 64px; }
.guide-heading, .files-heading { max-width: 760px; margin-bottom: 24px; }
.guide-heading h1, .files-heading h1 { font-family: Georgia, serif; font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 500; margin: 0 0 10px; }
.guide-heading > p:last-child, .files-heading > p:last-child { color: var(--muted); line-height: 1.65; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.guide-card { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 20px; box-shadow: 0 8px 26px rgba(24,61,53,.055); }
.guide-card.numbered { display: grid; grid-template-columns: 38px 1fr; gap: 14px; }
.guide-card > span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--forest); color: white; font-family: Georgia, serif; }
.guide-card h2 { margin: 2px 0 7px; font-size: 1rem; }
.guide-card p, .guide-note p { margin: 0; color: var(--muted); line-height: 1.55; font-size: .88rem; }
.guide-note { margin-top: 16px; padding: 18px 20px; border-left: 4px solid var(--gold); background: #fffaf0; border-radius: 0 10px 10px 0; }
.guide-note strong { display: block; margin-bottom: 6px; }
.guide-action { margin-top: 22px; display: flex; justify-content: flex-end; }
.guide-action .primary { display: inline-block; text-decoration: none; }

.listing-shell { width: min(920px, calc(100% - 28px)); }
.magazine-bar { display: grid; grid-template-columns: 1fr auto auto; align-items: end; gap: 16px; border-bottom: 4px solid var(--forest); padding: 0 4px 9px; }
.magazine-bar span { font-family: Georgia, serif; color: var(--forest); font-size: 1.45rem; font-weight: 700; letter-spacing: .05em; }
.magazine-bar small { color: var(--muted); }
.magazine-bar b { color: var(--teal); font-size: .76rem; }
.rural-ad { background: #f8f1df; border: 1px solid #d8c9a9; margin-top: 18px; padding: clamp(26px, 6vw, 64px); position: relative; overflow: hidden; box-shadow: var(--shadow); }
.rural-ad::after { content: "HZ"; position: absolute; right: -14px; bottom: -58px; font-family: Georgia, serif; font-size: 15rem; font-weight: 700; color: rgba(24,61,53,.055); pointer-events: none; }
.ad-kicker { color: #725b2e; font-size: .75rem; letter-spacing: .13em; text-transform: uppercase; font-weight: 800; }
.rural-ad h1 { font-family: Georgia, serif; font-weight: 500; font-size: clamp(3.6rem, 11vw, 7.6rem); line-height: .78; letter-spacing: -.06em; color: var(--forest); margin: 24px 0 16px; }
.ad-location { color: #5b674f; font-size: 1.08rem; margin: 0 0 30px; }
.ad-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid #cdbf9f; padding: 20px 0; position: relative; z-index: 1; }
.ad-facts div { padding: 0 18px; border-right: 1px solid #cdbf9f; }
.ad-facts div:first-child { padding-left: 0; }
.ad-facts div:last-child { border-right: 0; }
.ad-facts strong, .ad-facts span { display: block; }
.ad-facts strong { font-family: Georgia, serif; font-size: 1.75rem; color: var(--forest); }
.ad-facts span { color: #776d59; font-size: .72rem; margin-top: 4px; }
.ad-copy { max-width: 650px; color: #4f5748; line-height: 1.65; margin-top: 24px; position: relative; z-index: 1; }
.ad-contact { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-top: 38px; padding-top: 18px; border-top: 2px solid var(--forest); position: relative; z-index: 1; }
.ad-contact small, .ad-contact strong { display: block; }
.ad-contact small { color: #776d59; font-size: .68rem; letter-spacing: .12em; }
.ad-contact strong { color: var(--forest); margin-top: 4px; }
.ad-contact > span { color: #776d59; font-size: .78rem; }
.listing-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.listing-actions a { text-decoration: none; }
.listing-disclaimer { color: var(--muted); font-size: .78rem; text-align: right; }

.file-grid { display: grid; gap: 12px; }
.file-card { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 16px; }
.file-card h2 { margin: 0; font-size: .95rem; }
.file-card p { margin: 4px 0; color: var(--muted); font-size: .8rem; }
.file-card small { color: #89938f; font-size: .7rem; }
.file-card .secondary { text-decoration: none; white-space: nowrap; }
.file-icon.large { width: 50px; height: 56px; }
.empty-files { background: white; border: 1px dashed #b8c6c0; border-radius: 12px; padding: 46px; text-align: center; color: var(--muted); }

@media (max-width: 1050px) {
  .workspace { grid-template-columns: 230px 1fr; }
  .case-panel { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .workspace { height: auto; min-height: calc(100vh - 68px); grid-template-rows: minmax(500px, calc(100vh - 68px)) auto; }
  .admin-grid { grid-template-columns: 1fr; }
  .panel.wide { grid-column: 1; }
}

@media (max-width: 720px) {
  .app-topbar { padding: 0 12px; }
  .app-brand > div, .student-meta > strong { display: none; }
  .top-nav { order: 2; margin: 0; gap: 0; }
  .top-nav a { padding: 8px 7px; font-size: .68rem; }
  .student-meta { order: 3; }
  .workspace { grid-template-columns: 1fr; grid-template-rows: 76px minmax(500px, calc(100vh - 144px)) auto; }
  .contacts-panel { overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--line); }
  .panel-title { display: none; }
  .contact-list { padding: 7px; display: flex; gap: 6px; }
  .contact-item { min-width: 146px; display: grid; grid-template-columns: 38px 1fr auto; padding: 7px; position: relative; }
  .contact-item.active { box-shadow: inset 0 -3px 0 var(--teal); }
  .contact-copy { display: block; }
  .unread { position: absolute; right: 3px; top: 3px; }
  .message { max-width: 90%; }
  .composer { padding: 9px; }
  .send-button { padding-inline: 12px; }
  .login-card { padding: 30px 24px; }
  .guide-grid { grid-template-columns: 1fr; }
  .magazine-bar { grid-template-columns: 1fr auto; }
  .magazine-bar small { display: none; }
  .ad-facts { grid-template-columns: 1fr; gap: 14px; }
  .ad-facts div { border-right: 0; border-bottom: 1px solid #cdbf9f; padding: 0 0 14px; }
  .ad-facts div:last-child { border-bottom: 0; padding-bottom: 0; }
  .listing-actions { flex-direction: column; }
  .file-card { grid-template-columns: 46px 1fr; }
  .file-card .secondary { grid-column: 1 / -1; }
}

/* Keep filenames, the composer and all five navigation destinations usable. */
.file-card > div, .document-list a > span, .guide-card > div { min-width: 0; }
.file-card h2, .attachment, .message p, .guide-note, .pending-list strong { overflow-wrap: anywhere; }
.file-card h2 { line-height: 1.4; }
.guide-shortcuts { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 20px; }
.guide-shortcuts a { color: var(--teal); text-underline-offset: 4px; }
.help-template { margin-top: 28px; background: white; padding: 24px; border: 1px solid var(--line); border-radius: 14px; }
.help-template h2 { font-family: Georgia, serif; font-weight: 500; font-size: 1.8rem; margin-top: 0; }
.help-template details { border-top: 1px solid var(--line); padding: 14px 0; }
.help-template summary { cursor: pointer; font-weight: 700; }
.help-template p { color: var(--muted); line-height: 1.65; }
.help-template .table-wrap { max-width: 100%; }
.help-template th, .help-template td { vertical-align: top; min-width: 130px; }
:focus-visible { outline: 3px solid #c49a3b; outline-offset: 3px; }
.logout-form { margin: 0; }
.logout-form button { border: 0; border-radius: 0; border-left: 1px solid rgba(255,255,255,.2); color: white; padding: 4px 0 4px 13px; background: transparent; font-size: .82rem; font-weight: 400; }
[hidden] { display: none !important; }
@media (max-width: 720px) {
  .app-shell { grid-template-rows: auto 1fr; min-height: 100dvh; }
  .app-topbar { min-height: 0; flex-wrap: wrap; gap: 4px; padding: 8px 12px 6px; }
  .app-brand { margin-right: auto; }
  .app-brand > div { display: block; }
  .app-brand strong { font-size: .88rem; }
  .app-brand small { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; }
  .brand-mark { width: 30px; height: 30px; }
  .student-meta { order: 2; }
  .top-nav { order: 3; flex: 0 0 100%; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 2px; }
  .top-nav a { padding: 9px 2px; text-align: center; font-size: .69rem; }
  .top-nav a { position: relative; }
  .nav-unread { position: absolute; right: 0; top: 0; margin-left: 0; padding: 0 3px; font-size: .59rem; max-width: 28px; overflow: hidden; }
  .workspace { height: auto; min-height: 0; grid-template-rows: 76px auto auto; }
  .conversation-panel { height: clamp(350px,calc(100dvh - 165px),900px); grid-template-rows: auto minmax(0,1fr) auto; }
  .conversation-head { min-height: 64px; padding: 9px 12px; }
  .message-stream { padding: 18px 12px; }
  .composer { padding-bottom: max(9px,env(safe-area-inset-bottom)); }
  .composer textarea { width: 100%; min-width: 0; }
  .composer textarea { font-size: .87rem; }
  .file-card { gap: 12px; padding: 14px; }
  .file-card h2 { font-size: .84rem; }
  .guide-shell, .files-shell { width: calc(100% - 24px); margin-top: 22px; }
  .help-template { padding: 18px; }
  .toast { max-width: calc(100% - 24px); width: max-content; top: 105px; }
}
