/* ==========================================================================
   Dr. Tapas Mandal Orthopaedic Care — directory, booking and chamber surfaces
   ========================================================================== */

/* Header additions */

.topbar-links .staff-link {
  color: rgba(247, 241, 230, 0.72);
}

.topbar-links .staff-link:hover {
  color: var(--saffron);
}

/* Hero queue / prescription cards */

.medical-stage {
  min-height: 560px;
}

.queue-card {
  top: 88px;
  left: -6px;
  width: 228px;
  padding: 15px;
  transform: rotate(-1.3deg);
  animation: float-slow 8s ease-in-out infinite;
}

.queue-card .tag {
  font-size: 9px;
  padding: 3px 7px;
}

.queue-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}

.queue-line strong {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.queue-line span {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  color: var(--forest);
}

.queue-sub {
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--muted);
}

.queue-track {
  height: 5px;
  margin: 12px 0 7px;
  border-radius: 99px;
  background: var(--cream-deep);
  overflow: hidden;
}

.queue-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--forest-mid), var(--saffron));
}

.queue-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 8.5px;
  color: var(--muted);
}

.rx-card {
  right: -4px;
  bottom: 88px;
  width: 218px;
  padding: 15px;
  transform: rotate(1.2deg);
  animation: float-slow 9s ease-in-out infinite .7s;
}

.rx-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 9px 0 6px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.rx-head strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--clay);
  line-height: 1;
}

.rx-head span {
  font-size: 8.5px;
  color: var(--muted);
}

.rx-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  font-size: 9.5px;
}

.rx-line span:first-child {
  font-weight: 500;
  color: var(--ink-soft);
}

.rx-line span:last-child {
  font-family: var(--font-ui);
  font-size: 8.5px;
  color: var(--muted);
}

.rx-foot {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  font-size: 8px;
  color: var(--muted);
}

/* Doctor directory */

.doctor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.doctor-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}

.doctor-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.doctor-photo {
  position: relative;
  aspect-ratio: 4 / 3.4;
  overflow: hidden;
  background: var(--cream-deep);
}

.doctor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  filter: saturate(.82);
  transition: transform .55s var(--ease-out), filter .55s var(--ease-out);
}

.doctor-card:hover .doctor-photo img {
  transform: scale(1.035);
  filter: saturate(1);
}

.doctor-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(11, 46, 39, .2));
}

.doctor-available {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 253, 248, .93);
  backdrop-filter: blur(6px);
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 600;
  color: var(--forest);
  white-space: nowrap;
}

.doctor-available .status-dot {
  width: 4px;
  height: 4px;
}

.doctor-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.doctor-specialty {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--clay);
}

.doctor-body h3 {
  margin-top: 3px;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.doctor-body h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
}

.doctor-degrees {
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.5;
}

.doctor-meta {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #eee6d8;
}

.doctor-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  color: var(--muted);
  line-height: 1.4;
}

.doctor-meta svg {
  flex: none;
  color: var(--forest-mid);
}

.doctor-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}

.doctor-fee small {
  display: block;
  font-size: 8.5px;
  color: var(--muted);
}

.doctor-fee strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
}

.doctor-rating {
  font-family: var(--font-ui);
  font-size: 10px;
  color: #8b5c0b;
  font-weight: 700;
  text-align: right;
}

.doctor-rating span {
  color: #8b5c0b;
}

.doctor-rating small {
  display: block;
  margin-top: 1px;
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 400;
  color: var(--muted);
}

.doctor-book {
  width: 100%;
  margin-top: 12px;
  min-height: 34px;
  font-size: 10.5px;
  padding-inline: 10px;
  position: relative;
  z-index: 4;
}

/* Specialties */

.specialty-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.specialty-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.specialty-card:hover {
  transform: translateY(-2px);
  border-color: var(--forest-mid);
  box-shadow: var(--shadow-sm);
}

.specialty-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--mint);
  color: var(--forest);
  flex: none;
}

.specialty-icon svg {
  width: 19px;
  height: 19px;
}

.specialty-card h3 {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
}

.specialty-card p {
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.55;
}

.specialty-card small {
  display: block;
  margin-top: 7px;
  font-family: var(--font-ui);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--clay);
}

.specialty-card a::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* Directory preview cards */

.directory-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.directory-preview {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

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

.directory-preview-head .eyebrow {
  margin-bottom: 5px;
}

.directory-preview-head h3 {
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.3;
}

.directory-preview-head .link-arrow {
  font-size: 11px;
  white-space: nowrap;
}

.mini-table {
  border-top: 1px solid var(--line);
}

.mini-table-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #eee6d8;
}

.mini-table-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--cream);
  color: var(--forest);
  flex: none;
}

.mini-table-icon svg {
  width: 14px;
  height: 14px;
}

.mini-table-main {
  min-width: 0;
  flex: 1;
}

.mini-table-main strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-table-main small {
  display: block;
  margin-top: 1px;
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-table-value {
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--clay);
  white-space: nowrap;
}

.mini-table-value.green {
  color: var(--forest);
}

/* Articles */

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.article-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.article-image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--cream-deep);
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.86);
  transition: transform .5s var(--ease-out);
}

.article-card:hover .article-image img {
  transform: scale(1.035);
}

.article-image .tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 253, 248, .95);
  backdrop-filter: blur(5px);
}

.article-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 7px;
  font-size: 9px;
  color: var(--muted);
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.article-body h3 {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
}

.article-body h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.article-body p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-body .link-arrow {
  margin-top: auto;
  padding-top: 12px;
  font-size: 10.5px;
}

.article-card {
  position: relative;
}

/* Dark operations list */

.ops .check-list li {
  color: rgba(247, 241, 230, 0.78);
}

.ops .check-list svg {
  color: var(--saffron);
}

.profile-contact-rows a,
.profile-contact-rows span {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 0;
  font-size: 11px;
  color: var(--muted);
}

.profile-contact-rows a:hover {
  color: var(--forest);
}

.profile-contact-rows a svg,
.profile-contact-rows span svg {
  flex: none;
  color: var(--forest-mid);
}

/* Ledger extras */

.ledger-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 24px 18px;
  border-top: 1px solid #eee6d8;
  font-size: 9px;
  color: var(--muted);
}

.ledger-row .tag {
  font-size: 8px;
  padding: 3px 7px;
}

/* Doctor profile */

.doctor-profile-hero {
  padding: clamp(30px, 4vw, 50px) 0 clamp(36px, 5vw, 58px);
  background:
    radial-gradient(circle at 85% 20%, rgba(232, 169, 58, .13), transparent 28%),
    linear-gradient(180deg, var(--cream), #f4eddf);
  border-bottom: 1px solid rgba(201, 186, 161, .5);
}

.doctor-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: clamp(30px, 5vw, 60px);
  align-items: start;
}

.doctor-profile-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(22px, 3vw, 34px);
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.doctor-profile-photo {
  overflow: hidden;
  border-radius: 110px 110px 18px 18px;
  background: var(--cream-deep);
}

.doctor-profile-photo img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  object-position: center 18%;
}

.doctor-profile-info .eyebrow {
  margin-bottom: 8px;
}

.doctor-profile-info h1 {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.2;
}

.doctor-profile-info .degrees {
  margin-top: 5px;
  font-size: 13px;
  color: var(--muted);
}

.doctor-profile-info .specialty-line {
  margin-top: 6px;
  color: var(--clay);
  font-size: 13px;
  font-weight: 600;
}

.doctor-profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.doctor-profile-stats div {
  padding-right: 22px;
  margin-right: 22px;
  border-right: 1px solid var(--line);
}

.doctor-profile-stats div:last-child {
  border-right: 0;
  padding-right: 0;
  margin-right: 0;
}

.doctor-profile-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--forest);
}

.doctor-profile-stats span {
  display: block;
  margin-top: 3px;
  font-size: 9.5px;
  color: var(--muted);
}

.doctor-profile-about {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.doctor-profile-about h2 {
  font-size: 24px;
}

.doctor-profile-about p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.85;
}

.doctor-profile-side {
  position: sticky;
  top: 96px;
}

.profile-contact-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.profile-contact-card h2 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
}

.profile-contact-card > p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.profile-contact-card .btn {
  margin-top: 14px;
}

.profile-contact-rows {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.profile-contact-rows span {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 0;
  font-size: 11px;
  color: var(--muted);
}

.profile-contact-rows svg {
  flex: none;
  color: var(--forest-mid);
}

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

.chamber-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.chamber-item h3 {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
}

.chamber-item p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.chamber-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 7px;
  font-size: 9.5px;
  color: var(--muted);
}

.chamber-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chamber-meta svg {
  color: var(--forest-mid);
}

.chamber-item .btn {
  align-self: center;
  min-height: 34px;
  font-size: 10.5px;
  padding-inline: 11px;
}

.chamber-fee {
  margin-top: 5px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: var(--clay);
}

/* Appointment booking */

.appointment-section {
  padding: clamp(40px, 5vw, 64px) 0 clamp(64px, 8vw, 96px);
}

.appointment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

.appointment-form-card {
  padding: clamp(22px, 3.4vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.appointment-summary {
  position: sticky;
  top: 96px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.appointment-summary h2 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
}

.appointment-summary p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.appointment-doctor {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbf7ee;
}

.appointment-doctor img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.appointment-doctor strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
}

.appointment-doctor span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

.appointment-rows {
  margin-top: 16px;
}

.appointment-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid #eee6d8;
  font-size: 11px;
}

.appointment-row:last-child {
  border-bottom: 0;
}

.appointment-row span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.appointment-row svg {
  flex: none;
  color: var(--forest-mid);
}

.appointment-row strong {
  text-align: right;
  font-weight: 600;
  color: var(--ink);
}

.appointment-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.65;
}

.appointment-success {
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
}

.appointment-success-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
}

.appointment-success-icon svg {
  width: 26px;
  height: 26px;
}

.appointment-success h2 {
  font-size: clamp(25px, 3vw, 34px);
}

.appointment-success p {
  max-width: 48ch;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.appointment-receipt {
  max-width: 430px;
  margin: 22px auto 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
}

.appointment-receipt div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 14px;
  border-bottom: 1px solid #eee6d8;
  font-size: 11px;
}

.appointment-receipt div:last-child {
  border-bottom: 0;
}

.appointment-receipt span {
  color: var(--muted);
}

.appointment-receipt strong {
  font-family: var(--font-ui);
  font-weight: 600;
}

/* Medicine directory */

.table-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #fbf7ee;
}

.table-card-head h2 {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
}

.table-card-head span {
  font-size: 10px;
  color: var(--muted);
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th {
  padding: 11px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.data-table td {
  padding: 11px 18px;
  border-bottom: 1px solid #eee6d8;
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #fbf8f1;
}

.data-table td strong {
  font-weight: 600;
  color: var(--ink);
}

.data-table .cell-sub {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  color: var(--muted);
  font-weight: 400;
}

.data-table .price {
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--clay);
  white-space: nowrap;
}

.data-table th:last-child,
.data-table td:last-child {
  text-align: right;
}

/* Tests */

.test-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.test-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.test-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--mint);
  color: var(--forest);
  flex: none;
}

.test-icon svg {
  width: 18px;
  height: 18px;
}

.test-card h3 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.test-card p {
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.55;
}

.test-card .test-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.test-card .test-price {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  color: var(--clay);
}

.test-card .test-category {
  font-size: 9px;
  color: var(--muted);
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 99px;
}

/* Pricing */

.pricing-section {
  padding: clamp(48px, 7vw, 90px) 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.price-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.price-card--featured {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--cream);
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.price-card .plan-tag {
  align-self: flex-start;
  margin-bottom: 12px;
}

.price-card h2 {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
}

.price-card .plan-for {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.price-card--featured .plan-for {
  color: rgba(247, 241, 230, .62);
}

.price-amount {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.price-card--featured .price-amount {
  border-color: rgba(247, 241, 230, .16);
}

.price-amount strong {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 600;
  line-height: 1;
}

.price-amount span {
  font-size: 10.5px;
  color: var(--muted);
}

.price-card--featured .price-amount span {
  color: rgba(247, 241, 230, .55);
}

.price-features {
  display: grid;
  gap: 8px;
  margin: 16px 0 20px;
}

.price-features li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted);
}

.price-card--featured .price-features li {
  color: rgba(247, 241, 230, .72);
}

.price-features svg {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  flex: none;
  color: var(--forest-mid);
}

.price-card--featured .price-features svg {
  color: var(--saffron);
}

.price-card .btn {
  margin-top: auto;
}

/* Software feature cards */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.feature-card .value-icon {
  margin-bottom: 14px;
}

.feature-card h3 {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
}

.feature-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

/* Article detail */

.article-detail-hero {
  padding: clamp(30px, 4vw, 48px) 0 32px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.article-detail-head {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.article-detail-head h1 {
  margin-top: 10px;
  font-size: clamp(30px, 4.3vw, 49px);
  line-height: 1.25;
}

.article-detail-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
}

.article-detail-image {
  width: min(100% - 36px, 900px);
  margin: 28px auto 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.article-detail-image img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.article-content {
  width: min(100% - 36px, 720px);
  margin: 0 auto;
  padding: clamp(36px, 5vw, 56px) 0 clamp(64px, 8vw, 90px);
}

.article-content p {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.95;
}

.article-content p:first-child {
  margin-top: 0;
}

.article-content .article-callout {
  margin-top: 24px;
  padding: 18px 20px;
  border-left: 3px solid var(--saffron);
  background: rgba(232, 169, 58, .09);
  font-size: 13.5px;
  line-height: 1.8;
}

.article-back {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* Patient portal additions */

.portal-badge--waiting,
.portal-badge--draft {
  background: #faf0d8;
  color: #8b5c0b;
}

.portal-badge--confirmed,
.portal-badge--completed,
.portal-badge--published,
.portal-badge--approved,
.portal-badge--delivered {
  background: var(--ok-soft);
  color: var(--ok);
}

.portal-badge--cancelled {
  background: var(--clay-soft);
  color: #8d3f2b;
}

.next-appointment {
  margin-bottom: 18px;
  border-color: rgba(232, 169, 58, .45);
  background: linear-gradient(120deg, #fbf7ee, var(--paper));
}

.next-appointment-body {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 20px 22px;
}

.next-date {
  padding-right: 22px;
  border-right: 1px solid var(--line);
}

.next-date strong {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.next-date span {
  display: inline-flex;
  margin-top: 5px;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--forest);
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
}

.next-info strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.next-info span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
}

.next-info small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10.5px;
}

.next-fee {
  text-align: right;
}

.next-fee small {
  display: block;
  font-size: 9px;
  color: var(--muted);
}

.next-fee strong {
  display: block;
  margin: 2px 0 6px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
}

.prescription-list {
  padding: 0 20px 16px;
}

.prescription-item {
  border-bottom: 1px solid #eee6d8;
}

.prescription-item:last-child {
  border-bottom: 0;
}

.prescription-item summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 2px;
  cursor: pointer;
  list-style: none;
}

.prescription-item summary::-webkit-details-marker {
  display: none;
}

.prescription-item summary > div {
  flex: 1;
  min-width: 0;
}

.prescription-item summary strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
}

.prescription-item summary span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

.prescription-chevron {
  display: grid !important;
  place-items: center;
  color: var(--muted);
  transition: transform .2s var(--ease);
}

.prescription-item[open] .prescription-chevron {
  transform: rotate(180deg);
}

.prescription-body {
  padding: 2px 2px 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rx-block {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbf8f1;
}

.rx-block h3 {
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.rx-block p {
  font-size: 11px;
  line-height: 1.8;
  white-space: pre-wrap;
  color: var(--ink-soft);
}

.rx-followup {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(232, 169, 58, .1);
  font-size: 10.5px;
  color: var(--muted);
}

.rx-followup svg {
  color: var(--saffron-deep);
}

.rx-followup strong {
  color: var(--ink);
}

/* Admin prescription viewer */

.prescription-view-block {
  margin: 0 18px 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbf8f1;
}

.prescription-view-block h3 {
  font-family: var(--font-ui);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}

.prescription-view-block p {
  font-size: 11.5px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.admin-badge--waiting,
.admin-badge--draft {
  background: #faf0d8;
  color: #8b5c0b;
}

.admin-badge--confirmed,
.admin-badge--completed,
.admin-badge--published {
  background: var(--ok-soft);
  color: var(--ok);
}

.admin-badge--cancelled {
  background: var(--clay-soft);
  color: #8d3f2b;
}

/* Misc */

.empty-panel {
  padding: 42px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.staff-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 10px;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .doctor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .doctor-profile-grid {
    grid-template-columns: 1fr;
  }

  .doctor-profile-side,
  .appointment-summary {
    position: static;
    max-width: 620px;
  }

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

@media (max-width: 980px) {
  .medical-stage {
    min-height: 430px;
  }

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

  .doctor-profile-card {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .doctor-profile-photo img {
    min-height: 220px;
  }

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

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 620px;
    margin-inline: auto;
  }

  .price-card--featured {
    transform: none;
  }

  .directory-preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .medical-stage {
    min-height: 380px;
  }

  .queue-card {
    top: 32px;
    width: 182px;
    padding: 12px;
  }

  .queue-line span {
    font-size: 23px;
  }

  .rx-card {
    bottom: 30px;
    width: 172px;
    padding: 12px;
  }

  .doctor-grid,
  .article-grid,
  .specialty-grid,
  .test-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .doctor-photo {
    aspect-ratio: 16 / 11;
  }

  .doctor-card {
    max-width: 520px;
    width: 100%;
    margin-inline: auto;
  }

  .doctor-profile-card {
    grid-template-columns: 1fr;
  }

  .doctor-profile-photo {
    max-width: 250px;
    width: 100%;
    margin-inline: auto;
  }

  .doctor-profile-photo img {
    min-height: 290px;
  }

  .doctor-profile-stats div {
    padding-right: 14px;
    margin-right: 14px;
  }

  .doctor-profile-stats strong {
    font-size: 19px;
  }

  .appointment-form-card,
  .appointment-summary {
    padding: 18px;
  }

  .pricing-section {
    padding: 50px 0;
  }

  .price-card {
    padding: 22px;
  }

  .article-detail-image {
    margin-top: 20px;
  }

  .article-detail-image img {
    aspect-ratio: 4 / 3;
  }

  .topbar-links .staff-link {
    display: none;
  }

  .ledger-foot {
    padding-inline: 18px;
  }

  .next-appointment-body {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .next-date {
    padding: 0 0 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .next-fee {
    text-align: left;
  }

  .prescription-body {
    grid-template-columns: 1fr;
  }

  .prescription-list {
    padding-inline: 14px;
  }
}

@media (max-width: 430px) {
  .doctor-profile-stats {
    gap: 10px;
  }

  .doctor-profile-stats div {
    width: 45%;
    padding-right: 0;
    margin-right: 0;
    border-right: 0;
  }

  .article-body h3 {
    font-size: 16px;
  }

  .data-table th,
  .data-table td {
    padding-inline: 12px;
  }
}
