/* The sign-in and the agenda. The room has its own sheet (room.css). */

/* ================================================================ sign-in */

/*
 * The sign-in is one screen that fits the window exactly: no page scroll in
 * either direction. Spacing and type shrink with the height; on a very short
 * window only the form column scrolls, and only then.
 */
.login {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(400px, 0.92fr);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--paper);
}

.login-hero {
  position: relative;
  overflow: hidden;
  background: var(--room-bg);
  color: var(--cream);
}

.login-hero-photo {
  position: absolute;
  inset: 0;
  background: url('../assets/room-scales.webp') center 46% / cover no-repeat;
  transform: scale(1.04);
  animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift {
  to {
    transform: scale(1.1) translateY(-1.5%);
  }
}

.login-hero-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(195, 154, 69, 0.12), transparent 70%),
    linear-gradient(
      180deg,
      rgba(22, 6, 10, 0.72) 0%,
      rgba(28, 8, 12, 0.35) 40%,
      rgba(22, 6, 10, 0.92) 100%
    );
}

.login-hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: clamp(24px, 5vh, 44px) clamp(28px, 4vw, 56px);
}

.login-hero-message {
  max-width: 560px;
  animation: rise 0.9s 0.2s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--gold-light);
  margin-bottom: 22px;
}

.kicker .rule {
  width: 38px;
  height: 1px;
  background: var(--gold-tint-60);
}

.login-headline {
  margin: 0;
  font-size: clamp(34px, min(4.4vw, 7vh), 64px);
  line-height: 1.02;
  color: var(--cream);
}

.login-headline em,
.greeting-title em {
  color: var(--gold);
  font-style: italic;
}

.login-lead {
  margin: 22px 0 0;
  max-width: 460px;
  font-size: 16px;
  color: var(--cream-muted);
}

.login-motto {
  margin: 0;
  color: rgba(226, 201, 140, 0.75);
  line-height: 1.7;
}

.login-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(20px, 5vh, 48px) clamp(16px, 3vw, 32px);
  background:
    radial-gradient(circle at 85% 8%, rgba(195, 154, 69, 0.1), transparent 40%), var(--paper);
}

.login-panel::before {
  content: '';
  position: absolute;
  /* Inside the column: a watermark hanging past the edge is what made the page scroll. */
  right: 0;
  bottom: 0;
  width: 300px;
  height: 275px;
  background: url('../assets/medallion.png') center / contain no-repeat;
  opacity: 0.08;
  pointer-events: none;
}

.login-card {
  position: relative;
  width: min(100%, 440px);
  display: grid;
  gap: clamp(12px, 2.2vh, 18px);
  animation: rise 0.8s var(--ease) both;
}

.login-card-brand {
  display: none;
}

.login-card-brand .wordmark {
  color: var(--ink);
}

.login-title {
  margin: -8px 0 0;
  font-size: clamp(34px, 5.4vh, 44px);
  line-height: 1.02;
}

.login-sub {
  margin: -10px 0 6px;
  color: var(--ink-soft);
}

.login-registration {
  display: grid;
  grid-template-columns: 1fr 118px;
  gap: 12px;
}

.btn-block {
  width: 100%;
}

.login-card .btn-primary {
  min-height: 54px;
  margin-top: 4px;
}

.trust {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0 0;
  padding: 16px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-soft);
}

.trust li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trust svg {
  width: 16px;
  height: 16px;
  color: var(--gold-ink);
}

/* The warning under the form: wine on parchment, not the protocol red (that is for real time). */
.legal-notice {
  display: grid;
  gap: 4px;
  padding: 12px 14px 12px 16px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(91, 26, 35, 0.22);
  border-left: 3px solid var(--wine);
  background: rgba(91, 26, 35, 0.05);
}

.legal-notice p {
  margin: 0;
}

.legal-notice-head {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--wine);
}

.legal-notice-head svg {
  width: 15px;
  height: 15px;
}

.legal-notice-lead {
  font-size: 14px;
  color: var(--ink);
}

.legal-notice-text {
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  font-size: 14px;
}

.notice svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.notice-error {
  color: var(--red-deep);
  background: rgba(196, 64, 44, 0.08);
  border: 1px solid rgba(196, 64, 44, 0.25);
}

@media (max-width: 920px) {
  .login {
    grid-template-columns: 1fr;
  }

  .login-hero {
    display: none;
  }

  .login-card-brand {
    display: inline-flex;
    margin-bottom: 0;
  }

  .login-panel {
    padding: 16px;
  }

  .login-card-brand .wordmark {
    font-size: 22px;
  }
}

/* A short window keeps the essentials: the fields, the button and the headline. */
@media (max-height: 700px) {
  .login-lead,
  .login-sub,
  .trust {
    display: none;
  }

  .login-card .btn-primary {
    min-height: 48px;
  }

  .control {
    min-height: 46px;
  }

  .control input,
  .control select {
    height: 44px;
  }
}

/* ================================================================ agenda */

.agenda {
  min-height: 100vh;
  background:
    radial-gradient(circle at 100% 0%, rgba(195, 154, 69, 0.1), transparent 34%), var(--paper);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(31, 21, 23, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(195, 154, 69, 0.35);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 28px;
}

.topbar .brand-mark {
  width: 34px;
  height: 34px;
}

.topbar .wordmark {
  font-size: 21px;
}

.topbar-tag {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--gold-tint-45);
  color: var(--gold-light);
  font-size: 10.5px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
}

.topbar-user-text {
  display: grid;
  line-height: 1.25;
}

.topbar-user-text strong {
  font-weight: 500;
  font-size: 14.5px;
}

.topbar-user-text span {
  font-size: 12px;
  color: var(--cream-muted);
}

.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 18px;
}

.avatar-brass {
  color: var(--wine-dark);
  background: radial-gradient(circle at 35% 30%, #f1dfae, var(--gold) 60%, var(--gold-ink));
  box-shadow:
    0 0 0 2px rgba(31, 21, 23, 1),
    0 0 0 3px var(--gold-tint-60);
}

.icon-btn-dark {
  background: transparent;
  color: var(--cream-muted);
  border-color: rgba(195, 154, 69, 0.3);
}

.icon-btn-dark:hover {
  background: rgba(195, 154, 69, 0.12);
  color: var(--cream);
}

.agenda-main {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 28px 40px;
}

.watermark {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 300px;
  height: 270px;
  background: url('../assets/medallion.png') center / contain no-repeat;
  opacity: 0.07;
  pointer-events: none;
}

.greeting {
  position: relative;
  margin-bottom: 22px;
}

.greeting .label {
  margin: 0 0 6px;
}

.greeting-title {
  margin: 0;
  font-size: clamp(36px, 4vw, 50px);
  line-height: 1.05;
}

/* ---------- The next Sessão ---------- */

.next {
  position: relative;
  margin-bottom: 26px;
}

.next-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  overflow: hidden;
  padding: 32px 34px;
  border-radius: var(--r-xl);
  color: var(--cream);
  background: linear-gradient(135deg, rgba(91, 26, 35, 0.35), transparent 60%), var(--ebony);
  border: 1px solid var(--gold-tint-45);
  box-shadow:
    inset 0 1px 0 rgba(226, 201, 140, 0.12),
    0 30px 60px -32px rgba(42, 12, 17, 0.75);
  animation: rise 0.7s var(--ease) both;
}

.next-card::after {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: calc(var(--r-xl) - 7px);
  border: 1px solid rgba(195, 154, 69, 0.14);
  pointer-events: none;
}

.next-glow {
  position: absolute;
  top: -120px;
  left: 30%;
  width: 520px;
  height: 320px;
  background: radial-gradient(ellipse, rgba(195, 154, 69, 0.18), transparent 70%);
  pointer-events: none;
}

.next-scales {
  position: absolute;
  right: 300px;
  bottom: -30px;
  width: 210px;
  opacity: 0.1;
  pointer-events: none;
}

.next-body,
.next-aside {
  position: relative;
}

.next-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--gold-light);
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(196, 64, 44, 0.7);
  animation: live 1.6s infinite;
}

@keyframes live {
  70% {
    box-shadow: 0 0 0 10px rgba(196, 64, 44, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(196, 64, 44, 0);
  }
}

.next-name {
  margin: 0;
  font-size: clamp(34px, 3.4vw, 46px);
  line-height: 1.02;
}

.next-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  color: var(--cream-muted);
  font-size: 14.5px;
}

.role-chip {
  padding: 3px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--gold-tint-45);
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.role-chip-light {
  color: var(--gold-ink);
  border-color: var(--gold-tint-45);
  background: var(--gold-tint-16);
}

.next-question {
  margin: 20px 0 0;
  padding-left: 16px;
  border-left: 2px solid var(--gold);
  max-width: 640px;
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.3;
  color: var(--cream);
}

.next-when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 22px 0 0;
  font-size: 13px;
  color: var(--cream-muted);
}

.next-when svg {
  width: 15px;
  height: 15px;
  color: var(--gold-light);
}

.next-when .sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-tint-60);
  margin: 0 6px;
}

.next-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-left: 30px;
  border-left: 1px solid rgba(195, 154, 69, 0.2);
}

.countdown {
  display: grid;
  gap: 2px;
}

.countdown .label {
  color: var(--cream-muted);
}

.countdown-value {
  font-size: 40px;
  line-height: 1.1;
  font-weight: 500;
  color: var(--cream);
  letter-spacing: -0.02em;
}

.btn-pulse {
  position: relative;
}

.btn-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 1px solid rgba(240, 160, 136, 0.7);
  animation: halo 1.8s ease-out infinite;
}

@keyframes halo {
  from {
    opacity: 1;
    transform: scale(0.96);
  }
  to {
    opacity: 0;
    transform: scale(1.08);
  }
}

.btn-muted {
  color: var(--cream-muted);
  background: rgba(58, 37, 40, 0.9);
  border-color: rgba(195, 154, 69, 0.25);
  opacity: 1 !important;
}

.next-rule {
  margin: 0;
  font-size: 12.5px;
  color: var(--cream-muted);
}

.next-after {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(195, 154, 69, 0.18);
}

.next-after .label {
  margin: 0;
  color: var(--cream-muted);
  font-size: 10.5px;
}

.next-after-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--cream);
  font-size: 13px;
  text-align: left;
}

.next-after-item:hover {
  background: rgba(195, 154, 69, 0.1);
}

.next-after-item .mono {
  color: var(--gold-light);
  font-size: 12px;
}

.next-empty {
  grid-template-columns: 1fr;
}

.next-loading {
  grid-template-columns: 1fr;
  min-height: 250px;
}

/* ---------- Calendar and day ---------- */

.agenda-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.card {
  position: relative;
  border-radius: var(--r-lg);
  background: rgba(251, 246, 240, 0.86);
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px -24px var(--shadow);
}

.calendar-card {
  position: sticky;
  top: 86px;
  padding: 22px 20px 20px;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.calendar-title {
  margin: 0;
  font-size: 26px;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.calendar-weekdays {
  margin-bottom: 6px;
  color: var(--ink-muted);
  font-size: 10.5px;
}

.cal-day {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 13.5px;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.cal-day:hover {
  background: var(--paper-2);
}

.cal-day.is-past .cal-number {
  color: var(--ink-muted);
}

.cal-day.is-today {
  border-color: var(--gold);
}

.cal-day.is-today .cal-number {
  color: var(--wine);
  font-weight: 500;
}

.cal-day.is-selected {
  background: var(--ebony);
  border-color: var(--ebony);
  box-shadow:
    0 0 0 2px var(--paper-light),
    0 0 0 3px rgba(195, 154, 69, 0.5);
}

.cal-day.is-selected .cal-number {
  color: var(--cream);
}

.cal-dots {
  display: flex;
  gap: 3px;
  height: 5px;
}

.dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.dot-booked {
  background: var(--wine);
}

.dot-pending {
  background: var(--gold);
}

.dot-cancelled {
  background: var(--line-strong);
}

.cal-day.is-selected .dot-booked {
  background: var(--red-light);
}

.calendar-today {
  width: 100%;
  margin-top: 16px;
}

.calendar-today svg {
  width: 16px;
  height: 16px;
}

.legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--ink-soft);
}

.legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend .dot {
  width: 8px;
  height: 8px;
}

.day-card {
  padding: 24px 26px 26px;
  min-height: 420px;
}

.day-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.day-head .label {
  margin: 0 0 4px;
}

.day-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.05;
}

.switch {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.switch button {
  padding: 7px 18px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  font-weight: 500;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.switch button[aria-selected='true'] {
  background: var(--ebony);
  color: var(--cream);
  box-shadow: 0 4px 10px -6px rgba(27, 18, 20, 0.8);
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.strip-day {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 10px 4px 8px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--paper-light);
  transition:
    transform 0.15s var(--ease),
    border-color 0.15s;
}

.strip-day:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.strip-day .label {
  font-size: 10px;
  color: var(--ink-muted);
}

.strip-day strong {
  font-weight: 400;
  font-size: 26px;
  line-height: 1;
}

.strip-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--wine);
}

.strip-day.is-today {
  border-color: var(--gold);
}

.strip-day.is-selected {
  background: var(--wine);
  border-color: var(--wine);
  color: var(--cream);
}

.strip-day.is-selected .label,
.strip-day.is-selected .strip-count {
  color: var(--gold-light);
}

.day-list {
  display: grid;
  gap: 12px;
}

.appt {
  display: grid;
  grid-template-columns: 62px 3px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: stretch;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--paper-light);
  border: 1px solid var(--line);
  cursor: pointer;
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    border-color 0.2s;
  animation: rise 0.45s var(--ease) both;
}

.appt:hover,
.appt:focus-visible {
  outline: none;
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 14px 28px -20px var(--shadow);
}

.appt-time {
  display: grid;
  align-content: start;
  gap: 2px;
  text-align: right;
}

.appt-time strong {
  font-weight: 500;
  font-size: 15px;
}

.appt-time span {
  font-size: 12px;
  color: var(--ink-muted);
}

.appt-rail {
  border-radius: 3px;
  background: var(--wine);
}

.appt-pending .appt-rail {
  background: repeating-linear-gradient(180deg, var(--gold) 0 6px, transparent 6px 10px);
}

.appt-cancelled .appt-rail {
  background: var(--line-strong);
}

.appt-cancelled .appt-title .display,
.appt-cancelled .appt-question {
  text-decoration: line-through;
  text-decoration-color: rgba(140, 123, 119, 0.6);
  color: var(--ink-muted);
}

.appt.is-past {
  opacity: 0.72;
}

.appt-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.appt-title .display {
  font-size: 23px;
  line-height: 1.1;
}

.appt-meta {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.appt-question {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.appt-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.appt-side .btn svg {
  width: 16px;
  height: 16px;
}

.badge {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-booked {
  color: var(--green);
  background: rgba(46, 107, 72, 0.12);
}

.badge-pending {
  color: var(--gold-ink);
  background: var(--gold-tint-16);
}

.badge-cancelled {
  color: var(--ink-muted);
  background: var(--paper-2);
}

.week-day {
  display: grid;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line);
}

.week-day:last-child {
  border-bottom: 0;
}

.week-day-title {
  margin: 4px 0 0;
  color: var(--ink-muted);
}

.week-day.is-today .week-day-title {
  color: var(--wine);
}

.week-day-empty {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-muted);
}

.empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 44px 16px;
  text-align: center;
  color: var(--ink-soft);
}

.empty img {
  width: 150px;
  opacity: 0.9;
  margin-bottom: 8px;
}

.empty .display {
  margin: 0;
  font-size: 26px;
  color: var(--ink);
}

.skeleton {
  height: 104px;
  border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--paper-2), var(--paper-3), var(--paper-2));
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}

.skeleton-dark {
  height: 100%;
  min-height: 186px;
  background: linear-gradient(90deg, #2a1b1e, #3a2528, #2a1b1e);
  background-size: 200% 100%;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.load-error {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 32px 16px;
  text-align: center;
  color: var(--ink-soft);
}

.load-error p {
  margin: 0;
}

.next .load-error {
  border-radius: var(--r-xl);
  background: var(--ebony);
  color: var(--cream-muted);
}

.next .load-error .btn-ghost {
  color: var(--cream);
  border-color: var(--gold-tint-45);
}

.agenda-footer {
  margin-top: 40px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 10.5px;
}

/* ---------- Drawer ---------- */

.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(42, 12, 17, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.25s;
}

.drawer-scrim.is-open {
  opacity: 1;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(100%, 480px);
  padding: 26px 30px;
  overflow-y: auto;
  background: var(--paper);
  border-left: 1px solid var(--gold-tint-45);
  box-shadow: -30px 0 60px -30px rgba(42, 12, 17, 0.6);
  transform: translateX(100%);
  transition: transform 0.3s var(--ease);
}

.drawer.is-open {
  transform: none;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer .label {
  margin: 8px 0 0;
}

.drawer-title {
  margin: -6px 0 0;
  font-size: 42px;
  line-height: 1.02;
}

.drawer-role {
  margin: -8px 0 0;
  color: var(--ink-soft);
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 6px 0 0;
  overflow: hidden;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--line);
}

.facts div {
  padding: 12px 14px;
  background: var(--paper-light);
}

.facts .facts-wide {
  grid-column: 1 / -1;
}

.facts dt {
  color: var(--ink-muted);
  font-size: 10.5px;
}

.facts dd {
  margin: 4px 0 0;
  font-size: 14.5px;
}

.drawer-quote {
  position: relative;
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: var(--ebony);
  color: var(--cream);
}

.drawer-quote .label {
  margin: 0 0 8px;
  color: var(--gold-light);
}

.drawer-quote blockquote {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.drawer-foot {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
}

.drawer-rule {
  display: flex;
  gap: 8px;
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.drawer-rule svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--gold-ink);
}

.drawer .btn-muted {
  color: var(--ink-soft);
  background: var(--paper-2);
  border-color: var(--line);
}

/* ---------- Narrow screens ---------- */

@media (max-width: 1020px) {
  .next-card {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .next-aside {
    padding: 22px 0 0;
    border-left: 0;
    border-top: 1px solid rgba(195, 154, 69, 0.2);
  }

  .next-scales {
    right: 20px;
    top: 20px;
    bottom: auto;
    width: 150px;
  }

  .agenda-grid {
    grid-template-columns: 1fr;
  }

  .calendar-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    padding: 10px 16px;
  }

  .topbar-user-text,
  .topbar-tag {
    display: none;
  }

  .agenda-main {
    padding: 24px 16px 32px;
  }

  .next-card {
    padding: 24px 20px;
    border-radius: var(--r-lg);
  }

  .next-question {
    font-size: 18px;
  }

  .day-card {
    padding: 18px 14px;
  }

  .day-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .week-strip {
    gap: 4px;
  }

  .strip-day strong {
    font-size: 20px;
  }

  .appt {
    grid-template-columns: 48px 3px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .appt-side {
    grid-column: 3;
    flex-direction: row;
    align-items: center;
  }

  .login-registration {
    grid-template-columns: 1fr 100px;
  }

  .trust {
    flex-wrap: wrap;
  }
}
