:root {
  color-scheme: light;
  --canvas: #f1f6f4;
  --surface: #ffffff;
  --surface-soft: #e8f1ee;
  --surface-muted: #f7faf9;
  --text: #153237;
  --text-strong: #0c2a30;
  --muted: #5b7074;
  --line: #d2dfdb;
  --line-strong: #aec4bd;
  --petrol: #194f61;
  --petrol-deep: #103b47;
  --green: #2e966e;
  --green-strong: #237b5a;
  --green-bright: #35ac73;
  --green-soft: #dff1e8;
  --green-pale: #eef8f3;
  --amber: #966000;
  --amber-strong: #754a00;
  --amber-soft: #fff1cf;
  --danger: #9e3737;
  --danger-soft: #fbe8e5;
  --focus: #e4a019;
  --radius-control: 12px;
  --radius-surface: 18px;
  --shadow-soft: 0 12px 34px rgba(25, 79, 97, 0.08);
  --shadow-nav: 0 16px 45px rgba(16, 59, 71, 0.18);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  padding-bottom: calc(86px + env(safe-area-inset-bottom));
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(53, 172, 115, 0.08) 0, transparent 260px),
    var(--canvas);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

body.login-shell {
  padding-bottom: 0;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
}

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  color: #fff;
  background: var(--petrol-deep);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 1.25rem, 920px);
  min-height: 68px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
  background: rgba(241, 246, 244, 0.96);
}

.patient-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 48px;
  color: var(--petrol-deep);
  text-decoration: none;
}

.patient-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.patient-brand span {
  display: grid;
  line-height: 1.1;
}

.patient-brand strong {
  font-size: 0.98rem;
  letter-spacing: -0.015em;
}

.patient-brand small {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 10px;
  color: var(--petrol);
  background: transparent;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 750;
}

.text-button svg {
  width: 19px;
  height: 19px;
}

.text-button:hover {
  background: var(--green-soft);
}

.patient-main {
  width: min(100% - 1.25rem, 920px);
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
}

h1,
h2,
h3,
p,
dd {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--text-strong);
  line-height: 1.13;
}

h1 {
  margin-bottom: 0.55rem;
  font-size: clamp(2rem, 8vw, 3.15rem);
  font-weight: 780;
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.35rem, 5vw, 1.85rem);
  font-weight: 760;
  letter-spacing: -0.025em;
}

h3 {
  margin-bottom: 0.3rem;
  font-size: 1rem;
  font-weight: 750;
}

.section-label {
  margin: 0 0 0.3rem;
  color: var(--green-strong);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.message-stack {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.message {
  margin: 0;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-control);
  color: var(--petrol-deep);
  background: var(--green-soft);
  font-weight: 700;
}

.message-error {
  color: var(--danger);
  background: var(--danger-soft);
}

.login-layout {
  display: grid;
  gap: 2rem;
  align-items: center;
  min-height: calc(100vh - 170px);
  padding: 1rem 0 2.5rem;
}

.login-intro {
  max-width: 600px;
}

.brand-orbit {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin-bottom: 1.5rem;
  border-radius: 50%;
}

.brand-orbit img {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.login-intro h1 {
  max-width: 12ch;
}

.login-lead {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.trust-points {
  display: grid;
  gap: 0.75rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}

.trust-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: var(--petrol-deep);
  font-size: 0.9rem;
  font-weight: 680;
}

.trust-points svg {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  color: var(--green);
}

.login-form {
  padding: 1.3rem;
  border-radius: var(--radius-surface);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.form-heading {
  margin-bottom: 1.4rem;
}

.form-heading p:last-child,
.support-copy {
  color: var(--muted);
}

.form-heading p:last-child {
  margin: 0;
}

.field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.field label {
  color: var(--text-strong);
  font-size: 0.9rem;
  font-weight: 740;
}

.field input {
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  color: var(--text);
  background: var(--surface-muted);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.field input:hover {
  border-color: var(--petrol);
  background: var(--surface);
}

.field input:focus {
  border-color: var(--green-strong);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(46, 150, 110, 0.16);
  outline: 0;
}

.form-error {
  margin: 0 0 1rem;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-control);
  color: var(--danger);
  background: var(--danger-soft);
  font-weight: 700;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 50px;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-control);
  cursor: pointer;
  font-weight: 780;
  text-decoration: none;
}

.primary-button {
  width: 100%;
  border: 1px solid var(--green-strong);
  color: #fff;
  background: linear-gradient(105deg, var(--petrol) 0%, var(--green) 68%, var(--green-bright) 100%);
  box-shadow: 0 9px 24px rgba(35, 123, 90, 0.18);
}

.primary-button:hover {
  box-shadow: 0 12px 28px rgba(35, 123, 90, 0.24);
  transform: translateY(-1px);
}

.primary-button:active,
.secondary-button:active,
.bottom-nav a:active {
  transform: scale(0.98);
}

.secondary-button {
  border: 1px solid var(--green-strong);
  color: var(--green-strong);
  background: var(--surface);
}

.secondary-button:hover {
  background: var(--green-pale);
}

.inline-button {
  width: fit-content;
  margin-top: 1rem;
}

.support-copy {
  margin: 1rem 0 0;
  font-size: 0.84rem;
}

.dashboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.2rem;
}

.dashboard-heading p:last-child {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
}

.secure-chip,
.count-chip,
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 760;
}

.secure-chip {
  flex: none;
  gap: 0.35rem;
  min-height: 32px;
  padding: 0.3rem 0.65rem;
  color: var(--green-strong);
  background: var(--green-soft);
  font-size: 0.78rem;
}

.secure-chip svg {
  width: 16px;
  height: 16px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.section-heading h2,
.section-heading p {
  margin-bottom: 0;
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-icon,
.feature-icon {
  display: grid;
  place-items: center;
  flex: none;
  color: var(--petrol);
  background: var(--green-soft);
}

.section-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}

.section-icon svg,
.feature-icon svg {
  width: 23px;
  height: 23px;
}

.count-chip {
  min-width: 30px;
  min-height: 30px;
  padding: 0.25rem 0.55rem;
  color: var(--petrol-deep);
  background: var(--surface-soft);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.access-list {
  margin-bottom: 2rem;
}

.access-card {
  display: grid;
  gap: 1.2rem;
  padding: 1.25rem;
  border-radius: var(--radius-surface);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.access-identity,
.patient-greeting {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.access-identity h3,
.access-identity p {
  margin: 0;
}

.access-identity h3 {
  font-size: 1.2rem;
}

.access-identity p {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.initial {
  display: grid;
  place-items: center;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(145deg, var(--petrol) 0%, var(--green) 100%);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.03em;
}

.initial-large {
  flex-basis: 56px;
  width: 56px;
  height: 56px;
  border-radius: 19px;
  font-size: 0.95rem;
}

.scope-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.scope-list li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.55rem 0.65rem;
  border-radius: 11px;
  color: var(--petrol-deep);
  background: var(--surface-soft);
  font-size: 0.82rem;
  font-weight: 720;
}

.scope-list svg {
  width: 19px;
  height: 19px;
  color: var(--green-strong);
}

.scope-list strong {
  margin-left: auto;
  color: var(--amber-strong);
  font-size: 0.7rem;
}

.access-action {
  margin-top: 0.15rem;
}

.row-action-disabled {
  color: var(--muted);
  font-size: 0.88rem;
}

.privacy-note {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding: 1rem;
  color: var(--petrol-deep);
  background: var(--green-soft);
  border-radius: var(--radius-control);
}

.privacy-note svg {
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  color: var(--green-strong);
}

.privacy-note div {
  display: grid;
  gap: 0.15rem;
}

.privacy-note span {
  color: var(--muted);
  font-size: 0.86rem;
}

.back-nav {
  margin-bottom: 1.1rem;
}

.back-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 44px;
  color: var(--petrol);
  font-size: 0.85rem;
  font-weight: 760;
  text-decoration: none;
}

.back-nav a:hover {
  color: var(--green-strong);
}

.patient-hero {
  scroll-margin-top: 82px;
  margin-bottom: 1.35rem;
}

.patient-greeting {
  align-items: flex-start;
}

.patient-greeting h1 {
  margin-bottom: 0.35rem;
}

.patient-greeting p:last-child {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
}

.access-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 1rem 0 0 4.45rem;
  color: var(--green-strong);
  font-size: 0.78rem;
  font-weight: 780;
}

.access-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.today-grid {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.today-grid > section {
  overflow: hidden;
  border-radius: var(--radius-surface);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  animation: today-arrive 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.today-grid > section:nth-child(2) {
  animation-delay: 90ms;
}

@keyframes today-arrive {
  from {
    opacity: 0.65;
    transform: translateY(14px);
    clip-path: inset(0 0 12% 0 round var(--radius-surface));
  }
  to {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 round var(--radius-surface));
  }
}

.next-appointment,
.notice-preview {
  padding: 1.15rem;
}

.next-appointment > header,
.notice-preview > header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.next-appointment header h2,
.notice-preview header h2,
.next-appointment header p,
.notice-preview header p {
  margin-bottom: 0;
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.feature-icon-notice {
  color: var(--amber-strong);
  background: var(--amber-soft);
}

.next-appointment-time {
  display: grid;
  grid-template-columns: minmax(116px, 0.75fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.next-appointment-time time {
  display: grid;
  color: var(--petrol-deep);
  font-variant-numeric: tabular-nums;
}

.next-appointment-time time > span {
  color: var(--green-strong);
  font-size: 0.83rem;
  font-weight: 800;
}

.next-appointment-time time strong {
  margin: -0.05rem 0;
  font-size: clamp(2.55rem, 13vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.next-appointment-time time small {
  color: var(--muted);
  font-size: 0.76rem;
}

.next-appointment-copy h3 {
  margin-bottom: 0.25rem;
  font-size: 1.12rem;
}

.next-appointment-copy p {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.status {
  min-height: 27px;
  padding: 0.2rem 0.55rem;
  color: var(--green-strong);
  background: var(--green-soft);
  font-size: 0.72rem;
}

.feature-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 48px;
  margin-top: 0.4rem;
  color: var(--petrol);
  font-size: 0.85rem;
  font-weight: 780;
  text-decoration: none;
}

.feature-link svg {
  width: 19px;
  height: 19px;
}

.feature-link:hover {
  color: var(--green-strong);
}

.notice-preview.has-notice {
  background: linear-gradient(145deg, var(--amber-soft) 0%, #fffaf0 100%);
}

.notice-preview > h3 {
  margin-bottom: 0.45rem;
  font-size: 1.05rem;
}

.notice-preview > p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--amber-strong);
  font-size: 0.9rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.feature-empty {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem 0;
  color: var(--muted);
  font-size: 0.87rem;
}

.feature-empty strong {
  color: var(--text-strong);
}

.content-section {
  scroll-margin-top: 84px;
  margin-bottom: 1rem;
  padding: 1.15rem;
  border-radius: var(--radius-surface);
  background: var(--surface);
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}

.notification-list,
.video-list {
  display: grid;
  gap: 0.8rem;
}

.notification-card {
  padding: 1rem;
  border-radius: 14px;
  background: var(--surface-muted);
}

.notification-card.notification-important {
  color: var(--amber-strong);
  background: var(--amber-soft);
}

.notification-card.is-read {
  background: var(--surface-soft);
}

.notification-card header {
  display: grid;
  gap: 0.6rem;
}

.notification-card h3,
.notification-card p {
  margin-bottom: 0;
}

.notification-card p {
  margin-top: 0.8rem;
  white-space: pre-line;
}

.notification-card time,
.video-copy small {
  color: var(--muted);
  font-size: 0.76rem;
}

.notification-priority,
.video-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 0.45rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  color: var(--green-strong);
  background: var(--green-soft);
  font-size: 0.68rem;
  font-weight: 820;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.notification-important .notification-priority {
  color: var(--amber-strong);
  background: rgba(255, 255, 255, 0.72);
}

.read-confirmation {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.9rem;
  color: var(--green-strong);
  font-size: 0.8rem;
  font-weight: 760;
}

.read-confirmation svg {
  width: 20px;
  height: 20px;
}

.notification-card form {
  margin-top: 0.9rem;
}

.appointment-list {
  border-top: 1px solid var(--line);
}

.appointment-row {
  display: grid;
  grid-template-columns: minmax(112px, 0.75fr) minmax(0, 1fr);
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.appointment-row time {
  display: grid;
  font-variant-numeric: tabular-nums;
}

.appointment-row time strong {
  color: var(--petrol-deep);
  font-size: 0.9rem;
}

.appointment-row time span,
.appointment-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.appointment-copy h3 {
  margin-bottom: 0.15rem;
}

.appointment-row .status {
  grid-column: 2;
  justify-self: start;
}

.appointment-response {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.9rem;
  padding: 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  color: var(--petrol-deep);
  background: var(--green-pale);
}

.appointment-row .appointment-response {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 0;
}

.appointment-response-reference {
  grid-column: 1 / -1;
  width: fit-content;
  min-height: 44px;
  padding: 0.55rem 0;
  color: var(--green-strong);
  font-size: 0.82rem;
  font-weight: 780;
}

.appointment-response-copy,
.appointment-response-confirmed,
.appointment-response-cancellation_requested {
  display: grid;
  gap: 0.2rem;
}

.appointment-response span,
.appointment-response p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.appointment-response-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  align-items: start;
}

.appointment-response-actions form,
.appointment-response-actions .primary-button,
.appointment-response-actions .secondary-button {
  width: 100%;
}

.appointment-response-confirmed {
  border-color: var(--green);
  background: var(--green-soft);
}

.appointment-response-cancellation_requested {
  border-color: #e1b2a8;
  background: var(--danger-soft);
}

.appointment-response-confirmed span,
.appointment-response-cancellation_requested span {
  color: var(--text);
}

.cancellation-request {
  border: 1px solid #d99c91;
  border-radius: var(--radius-control);
  background: var(--surface);
}

.cancellation-request summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0.7rem 1rem;
  color: var(--danger);
  cursor: pointer;
  font-weight: 780;
  list-style: none;
}

.cancellation-request summary::-webkit-details-marker {
  display: none;
}

.cancellation-request[open] summary {
  border-bottom: 1px solid #e8c7c0;
}

.cancellation-request > div {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
}

.cancellation-button {
  border-color: var(--danger);
  color: var(--danger);
}

.cancellation-button:hover {
  background: var(--danger-soft);
}

@media (max-width: 560px) {
  .appointment-response-actions {
    grid-template-columns: 1fr;
  }
}

.section-empty {
  padding: 1rem;
  border-radius: 13px;
  background: var(--surface-soft);
}

.section-empty p {
  margin-bottom: 0;
  color: var(--muted);
}

.video-card {
  display: grid;
  gap: 1rem;
}

.video-frame {
  overflow: hidden;
  border-radius: 14px;
  background: #07171c;
  aspect-ratio: 16 / 10;
}

.video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-copy h3 {
  margin-bottom: 0.45rem;
  font-size: 1.12rem;
}

.video-copy > p:not(.video-patient-note) {
  margin: 0 0 0.7rem;
  color: var(--muted);
  white-space: pre-line;
}

.video-patient-note {
  display: grid;
  gap: 0.25rem;
  margin: 0.8rem 0;
  padding: 0.8rem;
  border-radius: var(--radius-control);
  color: var(--petrol-deep);
  background: var(--green-soft);
}

.video-patient-note span {
  color: var(--muted);
}

.safety-note {
  margin: 1rem 0 0;
  padding: 0.85rem;
  border-radius: var(--radius-control);
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.84rem;
}

.safety-note strong {
  color: var(--text-strong);
}

.change-request {
  margin-top: 1rem;
  border-radius: var(--radius-control);
  color: var(--petrol-deep);
  background: var(--green-pale);
}

.change-request summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 58px;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  list-style: none;
}

.change-request summary::-webkit-details-marker {
  display: none;
}

.change-request summary span {
  display: grid;
  gap: 0.05rem;
}

.change-request summary strong {
  font-size: 0.9rem;
}

.change-request summary small {
  color: var(--muted);
  font-size: 0.76rem;
}

.change-request summary svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: var(--green-strong);
  transition: transform 160ms ease;
}

.change-request[open] summary svg {
  transform: rotate(90deg);
}

.change-request-copy {
  margin: 0 0.85rem;
  padding: 0.8rem 0 0.9rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.change-request-copy p {
  margin: 0;
}

.change-request-copy p + p {
  margin-top: 0.55rem;
}

.change-request-copy strong {
  color: var(--text-strong);
}

.profile-data {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line);
}

.profile-data > div {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.profile-data dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 740;
}

.profile-data dd {
  margin: 0.2rem 0 0;
  color: var(--text-strong);
  font-weight: 680;
}

.empty-state {
  max-width: 620px;
  padding: 1.4rem;
  border-radius: var(--radius-surface);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.empty-state .feature-icon {
  margin-bottom: 1rem;
}

.empty-state p:last-of-type {
  color: var(--muted);
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.15rem;
  min-height: calc(72px + env(safe-area-inset-bottom));
  padding: 0.45rem 0.45rem calc(0.45rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-nav);
}

.bottom-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  min-height: 54px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 730;
  text-decoration: none;
}

.bottom-nav a:hover {
  color: var(--petrol);
  background: var(--green-pale);
}

.bottom-nav a.is-active {
  color: var(--green-strong);
  background: var(--green-soft);
}

.bottom-nav svg {
  width: 23px;
  height: 23px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-direction: column;
  width: min(100% - 1.25rem, 920px);
  margin: 0 auto;
  padding: 1.25rem 0 1.75rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
}

.site-footer strong {
  color: var(--text-strong);
}

@media (min-width: 700px) {
  body {
    padding-bottom: 110px;
  }

  .app-topbar,
  .patient-main,
  .site-footer {
    width: min(100% - 3rem, 920px);
  }

  .patient-main {
    padding-top: 2.4rem;
  }

  .login-layout {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.72fr);
    gap: clamp(2.5rem, 7vw, 5.5rem);
  }

  .login-form {
    padding: 2rem;
  }

  .dashboard-heading {
    align-items: center;
  }

  .access-card {
    grid-template-columns: minmax(230px, 1fr) minmax(280px, 1.2fr);
    align-items: center;
    padding: 1.5rem;
  }

  .access-action {
    grid-column: 1 / -1;
    justify-self: start;
    width: auto;
    min-width: 220px;
  }

  .patient-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }

  .access-status {
    flex: none;
    margin: 0;
  }

  .today-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(270px, 0.75fr);
    gap: 1rem;
  }

  .next-appointment,
  .notice-preview,
  .content-section {
    padding: 1.5rem;
  }

  .next-appointment-time {
    grid-template-columns: minmax(170px, 0.75fr) minmax(0, 1fr);
  }

  .notification-card header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .appointment-row {
    grid-template-columns: minmax(165px, 0.8fr) minmax(0, 1fr) auto;
  }

  .appointment-row .status {
    grid-column: auto;
    justify-self: end;
  }

  .video-card {
    grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1fr);
    align-items: start;
  }

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

  .profile-data > div:nth-child(odd):not(.profile-wide) {
    padding-right: 1rem;
  }

  .profile-data > div:nth-child(even) {
    padding-left: 1rem;
  }

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

  .bottom-nav {
    right: 50%;
    bottom: 12px;
    left: auto;
    width: min(560px, calc(100% - 2rem));
    min-height: 74px;
    padding: 0.45rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    transform: translateX(50%);
  }

  .site-footer {
    flex-direction: row;
  }
}

@media (max-width: 420px) {
  .text-button span {
    display: none;
  }

  .text-button {
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .dashboard-heading {
    flex-direction: column;
  }

  .secure-chip {
    align-self: flex-start;
  }

  .patient-greeting {
    gap: 0.7rem;
  }

  .initial-large {
    flex-basis: 50px;
    width: 50px;
    height: 50px;
  }

  .access-status {
    margin-left: 3.95rem;
  }

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

  .next-appointment-time time strong {
    font-size: 3.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

.recovery-link { color: var(--petrol); font-weight: 750; text-align: center; }
.token-expired { display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
.field small { color: var(--muted); }
.section-intro { max-width: 70ch; color: var(--muted); }
.availability-form { display: grid; gap: 1.2rem; }
.availability-days { display: grid; gap: .7rem; }
.availability-days fieldset { display: grid; grid-template-columns: minmax(9rem, 1fr) repeat(2, minmax(7rem, .65fr)); align-items: end; gap: .75rem; margin: 0; padding: .85rem 0; border: 0; border-bottom: 1px solid var(--line); }
.availability-days label { display: grid; gap: .35rem; }
.availability-day { display: flex !important; align-items: center; gap: .65rem !important; min-height: 44px; }
.availability-day input { width: 1.2rem; height: 1.2rem; }
.availability-days input[type="time"] { width: 100%; min-height: 44px; }
.push-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem 1rem; align-items: center; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.push-control p { margin: .25rem 0 0; color: var(--muted); max-width: 65ch; }
.push-control [data-push-status] { grid-column: 1 / -1; color: var(--muted); font-size: .9rem; }
@media (max-width: 640px) { .availability-days fieldset { grid-template-columns: 1fr 1fr; } .availability-day { grid-column: 1 / -1; } .push-control { grid-template-columns: 1fr; } .push-control [data-push-status] { grid-column: auto; } }
