/* ==========================================================================
   SECRET CAMPUS BOARD — base layer
   Modern digital college notice board: off-white paper, black ink, thin
   borders, hard shadows, stickers, stamps, index cards, notebook grid.

   Mobile-first. Everything below 760px is the primary design; wider
   viewports are the adaptation (design.md 44).
   ========================================================================== */

:root {
  /* Paper + ink (design.md 5) */
  --paper: #F7F6F1;
  --paper-2: #FBFAF5;
  --white: #FFFFFF;
  --ink: #111111;
  --ink-70: #3B3B39;
  --muted: #6C6B64;
  --rule: #111111;
  --rule-soft: #D9D5C8;

  /* Accent stickers */
  --red: #FF5C5C;
  --pink: #FFB6C1;
  --yellow: #FFF05A;
  --blue: #BFD7FF;
  --green: #6EE7B7;

  --red-ink: #C42B2B;

  /* Physicality */
  --radius: 4px;
  --radius-sm: 3px;
  --border: 1.5px;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --shadow-xs: 2px 2px 0 var(--ink);

  /* Rhythm */
  --container: 1080px;
  --nav-h: 56px;
  --bottom-h: 62px;
  --tap: 46px;
  --gutter: 18px;

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --fast: 160ms;
  --normal: 240ms;
  --slow: 800ms;

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Segoe Script", cursive;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--paper);
  /* faint graph-paper grid — cheap, GPU-friendly texture */
  background-image: radial-gradient(rgba(17, 17, 17, 0.055) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(16px, 0.95rem + 0.15vw, 17px);
  line-height: 1.62;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: inherit;
  text-decoration-color: var(--ink);
  text-underline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.4em;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.95rem, 1.3rem + 3.1vw, 3.4rem);
  text-transform: uppercase;
}
h2 {
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem);
  text-transform: uppercase;
}
h3 {
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.3rem);
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.15em;
}

hr {
  border: 0;
  border-top: var(--border) dashed var(--rule-soft);
  margin: 28px 0;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

::selection {
  background: var(--yellow);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.container.narrow {
  --container: 720px;
}

main {
  display: block;
  /* clear the fixed mobile tab bar */
  padding-bottom: calc(var(--bottom-h) + 28px + env(safe-area-inset-bottom));
}

.section {
  padding-block: clamp(44px, 8vw, 84px);
  border-top: var(--border) dashed var(--rule-soft);
}

.section:first-of-type {
  border-top: 0;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 26px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.82rem;
  line-height: 1.5;
}

.hand {
  font-family: var(--hand);
  font-weight: 700;
  letter-spacing: normal;
}

.tiny-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.doodle {
  display: inline-block;
  opacity: 0.55;
  font-size: 1rem;
  line-height: 1;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
}

.skip-link:focus {
  left: 12px;
}

.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;
}

/* --------------------------------------------------------------------------
   Paper surfaces
   -------------------------------------------------------------------------- */

.paper {
  position: relative;
  background: var(--white);
  border: var(--border) solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.paper-flat {
  background: var(--white);
  border: var(--border) solid var(--rule);
  border-radius: var(--radius);
  padding: 20px;
}

.paper-ruled {
  background-color: var(--white);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 33px,
    rgba(17, 17, 17, 0.07) 33px,
    rgba(17, 17, 17, 0.07) 34px
  );
  background-position: 0 12px;
  line-height: 34px;
}

.index-card {
  background: var(--white);
  border: var(--border) solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 14px 14px 30px;
  background-image: linear-gradient(
    to right,
    var(--red) 0,
    var(--red) 10px,
    transparent 10px
  );
  background-repeat: no-repeat;
}

.tape {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 88px;
  height: 24px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(255, 240, 90, 0.72);
  border: 1.5px solid var(--rule);
  opacity: 0.9;
}

/* --------------------------------------------------------------------------
   Stickers + stamps
   -------------------------------------------------------------------------- */

.sticker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--white);
  border: var(--border) solid var(--rule);
  border-radius: 999px;
  box-shadow: var(--shadow-xs);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.sticker-pink { background: var(--pink); }
.sticker-yellow { background: var(--yellow); }
.sticker-blue { background: var(--blue); }
.sticker-green { background: var(--green); }
.sticker-red { background: var(--red); }

.stamp {
  display: inline-block;
  padding: 4px 9px;
  border: 2px solid var(--red-ink);
  outline: 1px solid var(--red-ink);
  outline-offset: 2px;
  color: var(--red-ink);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: rotate(-4deg);
  opacity: 0.9;
  white-space: nowrap;
}

.stamp-ink {
  border-color: var(--ink);
  outline-color: var(--ink);
  color: var(--ink);
  transform: rotate(2deg);
}

.stamp-green {
  border-color: #0F7A52;
  outline-color: #0F7A52;
  color: #0F7A52;
  transform: rotate(-2deg);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 12px 20px;
  background: var(--white);
  color: var(--ink);
  border: var(--border) solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease), background var(--fast) var(--ease);
}

.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-pink {
  background: var(--pink);
}

.btn-yellow {
  background: var(--yellow);
}

.btn-danger {
  background: var(--white);
  color: var(--red-ink);
  border-color: var(--red-ink);
}

.btn-sm {
  min-height: 38px;
  padding: 7px 13px;
  font-size: 0.82rem;
  box-shadow: var(--shadow-xs);
}

.btn-lg {
  min-height: 56px;
  padding: 15px 26px;
  font-size: clamp(0.98rem, 0.94rem + 0.2vw, 1.08rem);
  box-shadow: var(--shadow);
}

.icon {
  display: inline-block;
  flex: none;
  vertical-align: -0.15em;
}

.btn-block {
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-xs);
}

.btn-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 4px 2px;
  background: none;
  border: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-btn.is-danger {
  color: var(--red-ink);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.field {
  margin-bottom: 20px;
}

.field > label,
.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="number"],
input[type="tel"],
input[type="url"],
select,
textarea {
  display: block;
  width: 100%;
  /* 16px floor stops iOS Safari zooming on focus */
  font-size: max(16px, 0.98rem);
  font-family: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--white);
  border: var(--border) solid var(--rule);
  border-radius: var(--radius);
  padding: 12px 13px;
  min-height: var(--tap);
  line-height: 1.4;
  transition: box-shadow var(--fast) var(--ease);
  appearance: none;
}

textarea {
  min-height: 116px;
  resize: vertical;
  line-height: 1.55;
}

select {
  /* chunky inline arrow, no external asset */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

input::placeholder,
textarea::placeholder {
  color: #A5A399;
  font-weight: 500;
}

.input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: var(--shadow-xs);
}

.field.has-error .input,
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--red-ink);
  box-shadow: 3px 3px 0 rgba(196, 43, 43, 0.35);
}

.field-error,
.helptext,
.field .help {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  line-height: 1.45;
}

.field-error {
  color: var(--red-ink);
  font-weight: 700;
}

ul.errorlist,
.field-errors {
  margin: 0 0 16px;
  padding: 12px 14px;
  list-style: none;
  background: rgba(255, 92, 92, 0.12);
  border: var(--border) solid var(--red-ink);
  border-radius: var(--radius);
  color: var(--red-ink);
  font-size: 0.85rem;
  font-weight: 700;
}

.field-row {
  display: grid;
  gap: 0 var(--gutter);
}

.check-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: var(--white);
  border: var(--border) solid var(--rule);
  border-radius: var(--radius);
  min-height: var(--tap);
}

.check-field input[type="checkbox"] {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--ink);
}

.check-field label {
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.check-field ul.errorlist {
  margin: 6px 0 0;
  padding: 0;
  border: 0;
  background: none;
}

.radio-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background: var(--white);
  border: var(--border) solid var(--rule);
  border-radius: var(--radius);
  cursor: pointer;
}

.radio-field input {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--ink);
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 22px;
}

.form-errors {
  margin-bottom: 18px;
}

/* --------------------------------------------------------------------------
   Toasts
   -------------------------------------------------------------------------- */

.messages {
  position: fixed;
  top: calc(var(--nav-h) + 8px);
  left: 10px;
  right: 10px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 12px 14px;
  background: var(--yellow);
  border: var(--border) solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 0.86rem;
  font-weight: 700;
  animation: rise var(--normal) var(--ease) both;
}

.toast-error {
  background: var(--red);
  color: var(--white);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Header + navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: var(--border) solid var(--rule);
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
  text-transform: lowercase;
  margin-right: auto;
  padding: 4px 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  background: var(--yellow);
  border: var(--border) solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  font-size: 0.82rem;
  font-weight: 800;
}

.brand-word {
  white-space: nowrap;
}

.brand-word b {
  text-transform: uppercase;
}

.nav-links {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 2px;
  padding: 12px var(--gutter) 18px;
  background: var(--paper);
  border-bottom: var(--border) solid var(--rule);
  box-shadow: 0 12px 0 rgba(17, 17, 17, 0.08);
}

.nav-links.is-open {
  display: flex;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.is-active {
  background: var(--yellow);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  background: var(--white);
  border: var(--border) solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  flex: none;
}

.badge-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: var(--white);
  border: var(--border) solid var(--rule);
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.nav-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

.nav-signin {
  display: none;
}

/* Bottom tab bar — mobile only */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  display: flex;
  background: var(--paper);
  border-top: var(--border) solid var(--rule);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: var(--bottom-h);
  padding: 6px 2px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.bottom-item span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-item.is-active {
  background: var(--yellow);
}

.bottom-item-ask {
  background: var(--ink);
  color: var(--paper);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 40px 0 32px;
}

.site-footer a {
  color: var(--paper);
  text-decoration-color: rgba(247, 246, 241, 0.45);
}

.footer-grid {
  display: grid;
  gap: 28px;
}

.footer-brand {
  max-width: 34ch;
  font-size: 0.9rem;
}

.footer-brand .brand {
  color: var(--paper);
  margin-bottom: 10px;
}

.footer-col h2 {
  margin-bottom: 10px;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: rgba(247, 246, 241, 0.6);
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li + li {
  margin-top: 8px;
}

.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 0.88rem;
  font-weight: 600;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(247, 246, 241, 0.22);
  font-size: 0.76rem;
  color: rgba(247, 246, 241, 0.62);
}

/* --------------------------------------------------------------------------
   Bottom sheet (confirm / report)
   -------------------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(17, 17, 17, 0.5);
}

.modal.is-open {
  display: flex;
  animation: fade var(--fast) var(--ease) both;
}

.modal-card {
  width: min(100%, 460px);
  max-height: 86dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--paper);
  border: var(--border) solid var(--rule);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  animation: slide-up var(--normal) var(--ease) both;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--white);
  border: var(--border) solid var(--rule);
  border-radius: var(--radius);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Empty + error states
   -------------------------------------------------------------------------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 34px 20px;
  text-align: center;
  background: var(--white);
  border: var(--border) dashed var(--rule);
  border-radius: var(--radius);
}

.empty-state .btn {
  margin-top: 6px;
}

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: clamp(48px, 12vw, 110px) 0;
  text-align: center;
}

.error-code {
  font-size: clamp(3rem, 2rem + 8vw, 5rem);
  line-height: 1;
}

.error-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 16px;
}

/* --------------------------------------------------------------------------
   Prose (static pages)
   -------------------------------------------------------------------------- */

.prose {
  max-width: 68ch;
}

.prose h2 {
  margin-top: 1.6em;
}

.prose ul,
.prose ol {
  padding-left: 1.2em;
}

.prose li + li {
  margin-top: 0.35em;
}

.prose-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.lede {
  font-size: clamp(1.02rem, 0.96rem + 0.3vw, 1.15rem);
  color: var(--ink-70);
}

/* ==========================================================================
   Tablet — 560px: two comfortable columns, inline button rows
   ========================================================================== */

@media (min-width: 560px) {
  :root {
    --gutter: 24px;
  }

  .btn-row,
  .form-actions,
  .prose-cta,
  .error-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .field-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    gap: 16px;
  }

  .nav-signin {
    display: inline-flex;
  }

  .section-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
  }
}

/* ==========================================================================
   Desktop — 760px: real navigation, roomier spacing, drop the tab bar
   ========================================================================== */

@media (min-width: 760px) {
  :root {
    --nav-h: 64px;
    --gutter: 28px;
  }

  main {
    padding-bottom: 0;
  }

  .bottom-nav {
    display: none;
  }

  .site-footer {
    padding: 56px 0 32px;
  }

  .nav {
    position: relative;
  }

  .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    order: 3;
    margin-left: 6px;
  }

  .nav-link {
    padding: 8px 11px;
    font-size: 0.76rem;
  }

  .nav-toggle {
    display: none;
  }

  .brand {
    margin-right: 4px;
    font-size: 1.08rem;
  }

  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 40px;
  }

  .paper {
    padding: 26px;
  }

  .index-card {
    padding: 18px 18px 18px 38px;
  }
}

/* Very wide screens get a little more air */
@media (min-width: 1024px) {
  .nav-link {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   Landscape phones — reclaim the vertical space
   ========================================================================== */

@media (max-height: 480px) and (orientation: landscape) {
  .site-header {
    position: static;
  }

  .bottom-nav {
    display: none;
  }

  main {
    padding-bottom: 0;
  }
}

/* ==========================================================================
   Motion + print
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .bottom-nav,
  .site-footer,
  .messages,
  .modal,
  .btn {
    display: none !important;
  }

  body {
    background: #fff;
  }
}