@font-face {
  font-family: Bricolage;
  src: url("/assets/BricolageGrotesque.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --canvas: #000000;
  --paper: #171314;
  --field: #20191b;
  --field-border: #846b70;
  --selection: #341418;
  --line: #3e3033;
  --ink: #f5eded;
  --muted: #bdabae;
  --accent: #ff696e;
  --red: #d72323;
  --red-hover: #ba1d25;
  --radius: 18px;
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.08; }
h1, h2 { font-family: Bricolage, system-ui, sans-serif; font-weight: 780; letter-spacing: -.035em; }
h1 { font-size: clamp(2.65rem, 5.8vw, 5.55rem); }
h2 { font-size: clamp(1.65rem, 3vw, 2.55rem); }
p { line-height: 1.55; }
.shell { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only, .skip-link:not(:focus) { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: absolute; z-index: 3; inset: 12px auto auto 12px; background: var(--paper); padding: 10px; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header-inner { min-height: 92px; }
.brand { display: inline-block; }
.brand img { width: 118px; height: auto; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; font-size: .91rem; }
nav a:not(.button) { text-decoration: none; font-weight: 620; }
nav a:not(.button):hover { text-decoration: underline; text-underline-offset: 4px; }
.button {
  display: inline-flex; min-height: 44px; justify-content: center; align-items: center; gap: 11px;
  padding: 10px 17px; border-radius: 11px; border: 1px solid transparent;
  text-align: center; text-decoration: none; font-weight: 700; font-size: .9rem;
}
.button-primary { color: white; background: var(--red); }
.button-primary:hover:not(:disabled) { background: var(--red-hover); }
.button-outline { background: var(--paper); border-color: var(--line); }
.button-outline:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.button-danger { color: var(--accent); border-color: var(--line); background: var(--paper); }

.public-main { padding-block: 52px 64px; flex: 1; }
.hero { display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: clamp(28px, 5vw, 84px); padding-block: 11px 54px; }
.hero-copy { display: grid; gap: 19px; justify-items: start; }
.hero-copy h1 { max-width: 10ch; }
.section-label { color: var(--accent); font-size: .76rem; font-weight: 750; text-transform: uppercase; letter-spacing: .11em; }
.hero-copy > p { max-width: 32ch; font-size: clamp(1rem, 1.9vw, 1.2rem); color: var(--muted); }
.hero-art { background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; gap: 3px; }
.hero-art img { filter: brightness(.88); }
.hero-art > img { width: 100%; height: auto; aspect-ratio: 2.85; object-fit: cover; }
.hero-art-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.hero-art-bottom img { width: 100%; height: auto; aspect-ratio: 2.1; object-fit: cover; }

.help-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(285px, .48fr); align-items: start; gap: 28px; border-top: 1px solid var(--line); padding-top: 34px; }
.help-layout h2 { margin-bottom: 17px; }
.faq { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; display: flex; gap: 18px; align-items: center; justify-content: space-between; padding: 18px 21px; font-weight: 690; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.2rem; flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 21px 18px; color: var(--muted); max-width: 68ch; }
.contact-card { padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.contact-card h2 { margin-block: 15px 9px; font-size: 1.7rem; }
.contact-card > p { color: var(--muted); margin-bottom: 15px; }
.contact-card > p:last-child { margin-bottom: 0; }
.contact-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 12px; background: var(--selection); color: var(--accent); font-size: 1.25rem; }
.contact-card .button { max-width: 100%; overflow-wrap: anywhere; }
.contact-link { display: block; color: var(--accent); margin-top: 10px; font-weight: 650; }
.site-footer { border-top: 1px solid var(--line); margin-top: auto; }
.footer-inner { padding-block: 22px; color: var(--muted); font-size: .87rem; }
.footer-inner > span { font-weight: 700; color: var(--ink); }
.policy { max-width: 760px; padding-block: 45px 64px; }
.policy h1 { font-size: clamp(2.7rem, 5vw, 4.1rem); }
.policy-lead { margin-top: 14px; font-size: 1.12rem; color: var(--muted); }
.policy section { margin-top: 32px; }
.policy section h2 { font-size: 1.55rem; margin-bottom: 11px; }
.policy section p { margin-bottom: 10px; color: var(--muted); }

.staff-main { flex: 1; padding-block: 42px 60px; }
.login-card { width: min(100%, 450px); margin: clamp(18px, 6vh, 70px) auto 0; padding: clamp(22px, 5vw, 38px); border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); }
.login-card h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.login-card > p { color: var(--muted); margin: 9px 0 22px; }
.login-card form, .dialog-form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: .85rem; font-weight: 680; min-width: 0; }
input, select { width: 100%; min-height: 44px; padding: 8px 11px; border: 1px solid var(--field-border); border-radius: 10px; background: var(--field); font-size: .97rem; font-weight: 450; }
input::placeholder { color: var(--muted); }
.dashboard-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 24px; }
.dashboard-heading h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); }
.dashboard-heading p { margin-top: 6px; color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.metrics > div { display: grid; gap: 6px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.metrics span { color: var(--muted); font-size: .84rem; font-weight: 650; }
.metrics strong { font-family: Bricolage, system-ui, sans-serif; font-size: 1.8rem; font-weight: 780; line-height: 1; }
.appointment-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, .38fr) minmax(140px, .37fr); gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.list-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 20px 11px; }
.list-heading h2 { font-size: 1.35rem; }
.list-heading p { color: var(--muted); font-size: .83rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { background: var(--field); color: var(--muted); font-size: .77rem; font-weight: 680; }
td, th { padding: 12px 15px; }
td { border-top: 1px solid var(--line); font-size: .89rem; vertical-align: middle; }
td:first-child, th:first-child { padding-left: 20px; }
td:last-child, th:last-child { padding-right: 20px; text-align: right; }
.cell-title { font-weight: 660; }
.cell-secondary { display: block; margin-top: 4px; color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.status { display: inline-flex; padding: 4px 8px; border-radius: 99px; white-space: nowrap; color: var(--muted); background: var(--field); font-size: .75rem; font-weight: 700; }
.status.pending { color: #ffc585; background: #332417; }
.status.confirmed, .status.completed { color: #8fdeb8; background: #182b23; }
.status.in-progress { color: #c4bfff; background: #25223a; }
.empty { padding: 28px 20px; color: var(--muted); text-align: center; }
.error { color: var(--accent); font-size: .89rem; }
.notice { padding: 10px 14px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }

dialog { width: min(570px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: 22px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
dialog::backdrop { background: rgba(0, 0, 0, .72); }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.dialog-header h2 { margin-top: 5px; font-size: 1.85rem; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); font-size: 1.45rem; flex: 0 0 auto; }
.detail-fields { margin-block: 16px; }
.detail-fields > div { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.detail-fields dt { font-size: .84rem; color: var(--muted); font-weight: 670; }
.detail-fields dd { margin: 0; font-size: .91rem; line-height: 1.42; white-space: pre-line; overflow-wrap: anywhere; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dialog-form { margin-top: 14px; padding: 15px; background: var(--canvas); border: 1px solid var(--line); border-radius: 14px; }
.dialog-form .dialog-actions { margin-top: 0; }
.dialog-form p { color: var(--muted); font-size: .88rem; }

@media (max-width: 780px) {
  .shell { width: calc(100% - 38px); }
  .public-main { padding-block: 25px 35px; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding-bottom: 30px; }
  .hero-copy { gap: 12px; }
  .hero-copy h1 { max-width: none; }
  .hero-art { max-width: 590px; }
  .help-layout { grid-template-columns: 1fr; padding-top: 24px; gap: 23px; }
  .staff-main { padding-top: 26px; }
  td, th { padding-inline: 10px; }
  table { min-width: 620px; }
}
@media (max-width: 480px) {
  .shell { width: calc(100% - 28px); }
  .header-inner { min-height: 68px; }
  .brand img { width: 83px; }
  nav { gap: 10px; font-size: .82rem; }
  .header-inner nav a[href="#questions"] { display: none; }
  .header-inner .button { padding-inline: 11px; }
  .dashboard-heading { align-items: start; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metrics > div { padding: 11px 12px; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 13px; }
  .filters label:first-child { grid-column: 1 / -1; }
  .list-heading { padding-inline: 13px; }
}
