body.pg-body .ht-breadcrumb-nav {
  margin: 0 0 18px;
}

body.pg-body ol.ht-breadcrumb,
body.pg-body .ht-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 10px 16px;
  gap: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(20, 32, 28, 0.04);
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

body.pg-body .ht-breadcrumb li,
body.pg-body ol.ht-breadcrumb > li {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.pg-body .ht-breadcrumb li::marker,
body.pg-body .ht-breadcrumb li::before {
  content: none;
  display: none;
}

body.pg-body .ht-breadcrumb li + li::before {
  content: "/";
  display: inline-block;
  margin: 0 10px;
  color: #94a3b8;
  font-weight: 600;
}

body.pg-body .ht-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

body.pg-body .ht-breadcrumb a:hover,
body.pg-body .ht-breadcrumb a:focus-visible {
  text-decoration: underline;
}

body.pg-body .ht-breadcrumb [aria-current="page"],
body.pg-body .ht-breadcrumb [aria-current="page"] span {
  color: var(--ink);
  font-weight: 700;
}

.ht-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ht-review {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0 0 24px;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  color: var(--muted);
}

.ht-review strong { color: var(--ink); }

.ht-callout {
  background: var(--warning-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--warning);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 24px;
  font-size: 15px;
}

.ht-calc {
  background: #f4fbf9;
  border: 1px solid #cce7e3;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0;
  margin: 8px 0 28px;
  overflow: hidden;
}

.ht-calc-head {
  padding: 18px 22px 16px;
  background: linear-gradient(180deg, #e6f7f4 0%, #f4fbf9 100%);
  border-bottom: 1px solid #cce7e3;
}

.ht-calc-head h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  color: #0b5c55;
}

.ht-calc-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.ht-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 22px;
}

.ht-field,
.ht-calc fieldset.ht-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ht-field-wide { grid-column: 1 / -1; }

.ht-field label,
.ht-legend {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.ht-optional {
  font-weight: 500;
  color: var(--muted);
}

.ht-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

/* Smooth form controls */
.ht-field input[type="number"],
.ht-field select {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid #d1e8e4;
  border-radius: 14px;
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background-color 0.22s ease;
}

.ht-field select {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.ht-field input[type="number"]:hover,
.ht-field select:hover {
  border-color: #a8ddd4;
  background-color: #fcfffe;
}

.ht-field input[type="number"]:focus,
.ht-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow:
    0 0 0 4px rgba(13, 148, 136, 0.14),
    0 1px 2px rgba(15, 23, 42, 0.04);
  background-color: #fff;
}

.ht-field input[type="number"][aria-invalid="true"],
.ht-field select[aria-invalid="true"],
.ht-input-row:has(input[aria-invalid="true"]) {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

.ht-input-row {
  display: flex;
  align-items: stretch;
  border: 1px solid #d1e8e4;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.ht-input-row:hover {
  border-color: #a8ddd4;
}

.ht-input-row:focus-within {
  border-color: var(--accent);
  box-shadow:
    0 0 0 4px rgba(13, 148, 136, 0.14),
    0 1px 2px rgba(15, 23, 42, 0.04);
}

.ht-input-row input[type="number"] {
  flex: 1;
  min-width: 0;
  min-height: 50px;
  padding: 12px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ht-input-row input[type="number"]:hover,
.ht-input-row input[type="number"]:focus {
  border-color: transparent;
  box-shadow: none;
  background: transparent;
}

.ht-unit {
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  background: linear-gradient(180deg, #f8fcfb 0%, #eef8f6 100%);
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  border-left: 1px solid #e2f0ed;
  white-space: nowrap;
}

.ht-radios {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ht-radio {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 18px;
  border: 1px solid #d1e8e4;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition:
    background-color 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease;
}

.ht-radio input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.ht-radio:hover {
  border-color: #a8ddd4;
  background: #fcfffe;
}

.ht-radio:has(input:checked) {
  background: linear-gradient(180deg, #ecfdf8 0%, #d1faf5 100%);
  border-color: var(--accent);
  color: #0b5c55;
  box-shadow:
    0 0 0 3px rgba(13, 148, 136, 0.1),
    0 1px 2px rgba(15, 23, 42, 0.04);
}

.ht-radio:has(input:focus-visible) {
  outline: 3px solid rgba(13, 148, 136, 0.35);
  outline-offset: 2px;
}

.ht-field > select:focus,
.ht-actions button:focus-visible {
  outline: none;
}

.ht-actions button:focus-visible {
  outline: 3px solid rgba(13, 148, 136, 0.35);
  outline-offset: 2px;
}

.ht-error {
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}

.ht-error-summary {
  background: var(--danger-soft);
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 18px 22px 0;
  color: #7f1d1d;
}

.ht-error-summary ul { margin: 8px 0 0; padding-left: 20px; }

.ht-calc-note {
  margin: 0 22px;
  padding: 12px 14px;
  background: #ecfdf8;
  border: 1px dashed #b8e6dc;
  border-radius: 10px;
  font-size: 13px;
  color: #334155;
}

.ht-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 22px 22px;
  background: #eef8f6;
  border-top: 1px solid #cce7e3;
}

.ht-actions button {
  min-height: 50px;
  padding: 12px 24px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease,
    transform 0.15s ease,
    box-shadow 0.22s ease;
}

.ht-btn-primary {
  background: var(--accent);
  color: #fff;
  border: 0;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
}

.ht-btn-primary:hover {
  background: #0b5c55;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.ht-btn-primary:active {
  transform: translateY(1px);
}

.ht-btn-secondary {
  background: #fff;
  color: var(--accent);
  border: 1.5px solid #b8e6dc;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ht-btn-secondary:hover {
  background: #f0fdfa;
  border-color: var(--accent);
}

.ht-result {
  scroll-margin-top: 120px;
  background: linear-gradient(180deg, #ecfdf8 0%, #f8fffe 100%);
  border: 1px solid #99f6e4;
  border-radius: 18px;
  padding: 24px;
  margin: 0 0 28px;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.08);
}

.ht-result:not([hidden]) {
  animation: htResultIn 0.45s ease;
}

@keyframes htResultIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ht-result-heading {
  margin: 0 0 18px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0b5c55;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ht-result-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ht-result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
  gap: 22px;
  align-items: center;
  padding: 22px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #cce7e3;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.ht-result-eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.ht-result-value-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.ht-result-number {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(42px, 6vw, 58px);
  line-height: 1;
  font-weight: 700;
  color: #0b5c55;
}

.ht-result-unit {
  font-size: 15px;
  font-weight: 600;
  color: #475569;
}

.ht-result-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
}

.ht-result-badge--g1 { background: #ccfbf1; color: #115e59; border-color: #5eead4; }
.ht-result-badge--g2 { background: #dcfce7; color: #166534; border-color: #86efac; }
.ht-result-badge--g3a { background: #fef9c3; color: #854d0e; border-color: #fde047; }
.ht-result-badge--g3b { background: #ffedd5; color: #9a3412; border-color: #fdba74; }
.ht-result-badge--g4 { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.ht-result-badge--g5 { background: #fecaca; color: #7f1d1d; border-color: #f87171; }

.ht-result-range {
  margin: 10px 0 0;
  font-size: 14px;
  color: #475569;
}

.ht-result-gauge-track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  overflow: visible;
  background: #e2e8f0;
}

.ht-result-gauge-gradient {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #fecaca 0%, #fdba74 18%, #fde047 38%, #86efac 62%, #5eead4 100%);
}

.ht-result-gauge-marker {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #fff;
  border: 3px solid #0f766e;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.35);
  transition: left 0.5s ease;
}

.ht-result-gauge-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.ht-result-scale {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ht-result-scale-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid #dbeafe;
  background: #fff;
  text-align: center;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.ht-result-scale-item--g1 { border-color: #99f6e4; }
.ht-result-scale-item--g2 { border-color: #bbf7d0; }
.ht-result-scale-item--g3a { border-color: #fde68a; }
.ht-result-scale-item--g3b { border-color: #fdba74; }
.ht-result-scale-item--g4 { border-color: #fca5a5; }
.ht-result-scale-item--g5 { border-color: #f87171; }

.ht-result-scale-item.is-active {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.15);
  border-width: 2px;
  background: #f0fdfa;
}

.ht-result-scale-code {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.ht-result-scale-range {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
}

.ht-result-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ht-result-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #cce7e3;
}

.ht-result-stat-wide { grid-column: 1 / -1; }

.ht-result-stat-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.ht-result-stat-value {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.45;
}

.ht-result-disclaimer {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  font-size: 14px;
  line-height: 1.55;
  color: #7c2d12;
}

.ht-table-wrap { overflow-x: auto; }

.ht-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 16px 0 22px;
}

.ht-table th,
.ht-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.ht-table th {
  background: #f0ede6;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ht-refs { padding-left: 22px; }
.ht-refs li { margin-bottom: 12px; }
.ht-refs cite { font-style: normal; color: var(--muted); font-size: 14px; }

.ht-definition {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 18px;
}

.ht-definition p { margin: 0; }

.ht-unit-group {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ht-unit-group--hidden {
  display: none;
}

.ht-height-imperial {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ht-result-badge--uw { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.ht-result-badge--n { background: #dcfce7; color: #166534; border-color: #86efac; }
.ht-result-badge--ow { background: #fef9c3; color: #854d0e; border-color: #fde047; }
.ht-result-badge--o1 { background: #ffedd5; color: #9a3412; border-color: #fdba74; }
.ht-result-badge--o2 { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.ht-result-badge--o3 { background: #fecaca; color: #7f1d1d; border-color: #f87171; }

.ht-result-gauge-gradient--bmi {
  background: linear-gradient(90deg, #93c5fd 0%, #86efac 28%, #fde047 48%, #fdba74 68%, #f87171 100%);
}

.ht-result-scale-item--uw { border-color: #93c5fd; }
.ht-result-scale-item--n { border-color: #86efac; }
.ht-result-scale-item--ow { border-color: #fde047; }
.ht-result-scale-item--o1 { border-color: #fdba74; }
.ht-result-scale-item--o2 { border-color: #fca5a5; }
.ht-result-scale-item--o3 { border-color: #f87171; }

/* Calculator.net-style BMI result chart */
.ht-bmi-result {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #cce7e3;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

.ht-bmi-summary {
  margin: 0;
  font-size: clamp(18px, 2.5vw, 22px);
  line-height: 1.4;
  color: #0f172a;
}

.ht-bmi-summary-cat {
  font-weight: 700;
}

.ht-bmi-summary-cat--uw { color: #2563eb; }
.ht-bmi-summary-cat--n { color: #16a34a; }
.ht-bmi-summary-cat--ow { color: #ca8a04; }
.ht-bmi-summary-cat--o1,
.ht-bmi-summary-cat--o2,
.ht-bmi-summary-cat--o3 { color: #dc2626; }

.ht-bmi-chart {
  padding: 8px 0 0;
}

.ht-bmi-chart-bar {
  position: relative;
  display: flex;
  height: 28px;
  border-radius: 6px;
  overflow: visible;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.ht-bmi-chart-seg { height: 100%; }

.ht-bmi-chart-seg--uw {
  width: 10.42%;
  background: linear-gradient(180deg, #93c5fd 0%, #60a5fa 100%);
}

.ht-bmi-chart-seg--n {
  width: 27.08%;
  background: linear-gradient(180deg, #86efac 0%, #4ade80 100%);
}

.ht-bmi-chart-seg--ow {
  width: 20.83%;
  background: linear-gradient(180deg, #fde047 0%, #facc15 100%);
}

.ht-bmi-chart-seg--o {
  width: 41.67%;
  background: linear-gradient(180deg, #fdba74 0%, #f87171 100%);
}

.ht-bmi-chart-pointer {
  position: absolute;
  top: -6px;
  bottom: -6px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  pointer-events: none;
}

.ht-bmi-chart-pointer-line {
  flex: 1;
  width: 3px;
  background: #0f172a;
  border-radius: 2px;
  box-shadow: 0 0 0 2px #fff;
}

.ht-bmi-chart-pointer-label {
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

.ht-bmi-chart-ticks {
  position: relative;
  height: 22px;
  margin-top: 6px;
}

.ht-bmi-chart-ticks span {
  position: absolute;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.ht-bmi-chart-ticks span:first-child { transform: translateX(0); }
.ht-bmi-chart-ticks span:last-child { transform: translateX(-100%); }

.ht-bmi-chart-labels {
  display: flex;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
}

.ht-bmi-chart-label--uw { width: 10.42%; color: #2563eb; }
.ht-bmi-chart-label--n { width: 27.08%; color: #16a34a; }
.ht-bmi-chart-label--ow { width: 20.83%; color: #ca8a04; }
.ht-bmi-chart-label--o { width: 41.67%; color: #dc2626; }

.ht-bmi-details {
  margin: 0;
  padding: 0 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  line-height: 1.5;
  color: #334155;
}

.ht-bmi-details li::marker {
  color: #0f766e;
}

.ht-bmi-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 14px;
  color: #475569;
}

@media (max-width: 700px) {
  .ht-calc-grid,
  .ht-radios,
  .ht-unit-group,
  .ht-height-imperial,
  .ht-result-hero,
  .ht-result-meta { grid-template-columns: 1fr; }

  .ht-result-scale { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .ht-bmi-chart-labels {
    flex-wrap: wrap;
    gap: 6px;
  }

  .ht-bmi-chart-label--uw,
  .ht-bmi-chart-label--n,
  .ht-bmi-chart-label--ow,
  .ht-bmi-chart-label--o {
    width: auto;
    flex: 1 1 40%;
  }

  .ht-bmi-inputs {
    flex-direction: column;
    gap: 8px;
  }

  .ht-actions { flex-direction: column; }
  .ht-actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .ht-result:not([hidden]) {
    animation: none;
  }

  .ht-result-gauge-marker {
    transition: none;
  }

  .ht-field input[type="number"],
  .ht-field select,
  .ht-input-row,
  .ht-radio,
  .ht-actions button {
    transition: none;
  }
}

/* Blood Sugar Tracker */
.bst-app { margin: 0 0 32px; }
.bst-subheading { margin: 0 0 12px; font-size: 1.05rem; color: #0b5c55; }
.bst-privacy { margin-bottom: 24px; }

.bst-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-bottom: 20px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #cce7e3;
  border-radius: 14px;
}

.bst-toolbar-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}

.bst-toolbar-group label { font-size: 13px; font-weight: 700; color: #334155; }

.bst-custom-range {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.bst-dashboard { margin-bottom: 24px; }
.bst-loading { color: #64748b; }

.bst-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.bst-stat {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #cce7e3;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.bst-stat-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.bst-stat-value {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

.bst-stat-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.bst-trends { display: flex; flex-direction: column; gap: 10px; }

.bst-trend {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 14px;
}

.bst-trend--up { border-left: 4px solid #f97316; }
.bst-trend--down { border-left: 4px solid #2563eb; }
.bst-trend--stable { border-left: 4px solid #64748b; }

.bst-chart-wrap {
  margin-bottom: 24px;
  padding: 18px;
  background: #fff;
  border: 1px solid #cce7e3;
  border-radius: 14px;
}

.bst-chart-summary { margin-bottom: 10px; }

.bst-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #475569;
}

.bst-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
}

.bst-dot--fasting { background: #2563eb; }
.bst-dot--pre { background: #0f766e; }
.bst-dot--post { background: #ca8a04; }
.bst-dot--other { background: #64748b; }

.bst-form-panel { margin-bottom: 24px; }

.bst-form-panel textarea {
  width: 100%;
  min-height: 88px;
  padding: 12px 16px;
  border: 1px solid #d1e8e4;
  border-radius: 14px;
  font: inherit;
  resize: vertical;
}

.bst-log-panel {
  padding: 18px;
  background: #fff;
  border: 1px solid #cce7e3;
  border-radius: 14px;
}

.bst-filters { margin-bottom: 16px; }

.bst-export {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.bst-log-table-wrap { overflow-x: auto; }

.bst-actions { white-space: nowrap; }

.bst-icon-btn {
  padding: 6px 10px;
  margin-right: 4px;
  border: 1px solid #cce7e3;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.bst-icon-btn--danger { color: #b91c1c; border-color: #fecaca; }

.bst-log-cards { display: none; }

.bst-log-card {
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.bst-log-card-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0b5c55;
}

.bst-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.bst-pagination button {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #cce7e3;
  background: #fff;
  cursor: pointer;
}

@media (max-width: 760px) {
  .bst-log-table { display: none; }
  .bst-log-cards { display: block; }
  .bst-stats { grid-template-columns: 1fr 1fr; }
}

@media print {
  .toc, .pg-guide-articles, .ht-breadcrumb, .t360-header, .t360-footer, .bst-form-panel, .bst-filters, .bst-export, .bst-toolbar, .bst-actions { display: none !important; }
  .bst-app { break-inside: avoid; }
}

/* Transplant Medication Tracker */
.tmt-app { margin: 0 0 32px; }
.tmt-summary { margin: 0 0 14px; font-size: 15px; color: #334155; }
.tmt-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
.tmt-panel { margin: 0; }
.tmt-list-panel {
  margin-bottom: 22px;
  padding: 18px;
  background: #fff;
  border: 1px solid #cce7e3;
  border-radius: 14px;
}
.tmt-med-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.tmt-med-card {
  padding: 14px 16px;
  border: 1px solid #cce7e3;
  border-radius: 12px;
  background: #f8fffe;
}
.tmt-med-card--inactive { opacity: 0.7; background: #f8fafc; }
.tmt-med-card header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.tmt-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #ccfbf1;
  color: #0f766e;
}
.tmt-badge--muted { background: #e2e8f0; color: #64748b; }
.tmt-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}
.tmt-status--taken { background: #dcfce7; color: #166534; }
.tmt-status--missed { background: #fee2e2; color: #991b1b; }
.tmt-status--delayed { background: #fef9c3; color: #854d0e; }
.tmt-status--skippedwithadvice,
.tmt-status--other { background: #e2e8f0; color: #334155; }

@media (max-width: 900px) {
  .tmt-panels { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .tmt-dose-table { display: none; }
}
