@font-face {
  font-family: "DM Sans";
  src: url("assets/dm-sans.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}
:root {
  --ink: #192b29;
  --sub: #586964;
  --muted: #687770;
  --line: #dfe5df;
  --bg: #f6f8f5;
  --accent: #14654e;
  --dark: #103e35;
  --mint: #b0e9cb;
  --card: #fff;
  --accent-soft: #e4f3e9;
  --sidebar: 226px;
  font:
    16px/1.45 "DM Sans",
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
button {
  border: 0;
  background: transparent;
}
button,
a {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #218f74;
  outline-offset: 3px;
}
main:focus {
  outline: 0;
}
.icon {
  flex: none;
  vertical-align: middle;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.19;
}
h1 {
  font-size: clamp(2rem, 3vw, 2.72rem);
  font-weight: 660;
  letter-spacing: -0.065em;
}
h2 {
  font-size: 1.31rem;
  font-weight: 660;
  letter-spacing: -0.043em;
}
h3 {
  font-size: 1.05rem;
}
small {
  font-size: 0.82rem;
}
.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 99;
  background: white;
  padding: 10px;
}
.skip:focus {
  top: 10px;
}
.shell {
  min-height: 100vh;
}
.shell > aside {
  position: fixed;
  z-index: 10;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 32px 18px 17px;
  background: #fafcf9;
  border-right: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 12px;
  width: max-content;
  font-size: 2.31rem;
  font-weight: 770;
  letter-spacing: -0.095em;
  line-height: 1;
  color: #153c31;
}
.brand-symbol {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #124c3c;
  color: #b5f1c9;
}
.brand-symbol svg {
  width: 36px;
  height: 36px;
}
.brand-dot {
  color: #489b73;
}
.side-body {
  margin-top: 60px;
}
.nav-label,
.hero-kicker {
  font-size: 0.71rem;
  text-transform: uppercase;
  letter-spacing: 0.135em;
  font-weight: 740;
}
.nav-label {
  margin: 0 15px 14px;
  color: #708179;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 46px;
  padding: 12px 15px;
  margin: 3px 0;
  border-radius: 9px;
  color: #51655c;
  font-size: 0.95rem;
  font-weight: 510;
  transition: background 0.18s;
}
.nav-link:hover {
  background: #edf2ed;
}
.nav-link.selected {
  background: #deeee3;
  color: #164f39;
  font-weight: 690;
}
.nav-link.selected .icon {
  stroke-width: 2.05;
}
.side-end {
  margin-top: auto;
}
.profile {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 10px;
  width: 100%;
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding: 21px 3px 4px;
}
.avatar {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  color: #456b53;
  background: #dceadd;
}
.profile strong,
.profile small {
  display: block;
}
.profile strong {
  font-size: 0.86rem;
  line-height: 1.4;
}
.profile small {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}
.profile > .icon {
  margin-left: auto;
}
.mobile-menu {
  display: none !important;
}
main {
  max-width: 1830px;
  margin-left: var(--sidebar);
  padding: 36px clamp(24px, 3.1vw, 56px) 44px;
}
.page-head,
.section-head,
.panel-head,
.panel-title,
.subtitle,
.btn,
.hero-kicker,
.hero-tag,
.metric-heading,
.metric-icon,
.head-icon,
.status,
.date-pick,
.text-btn,
.section-head a,
.panel-foot a,
.big-icon,
.iconbtn,
.med-schedule,
.segmented,
.filters,
.legend {
  display: flex;
  align-items: center;
}
.page-head,
.section-head,
.panel-head {
  justify-content: space-between;
  gap: 14px;
}
.page-head {
  margin-bottom: 25px;
}
.subtitle {
  gap: 7px;
  margin-top: 6px;
  color: var(--sub);
  font-size: 0.91rem;
}
.subtitle .icon {
  color: #748279;
}
.btn {
  display: inline-flex;
  justify-content: center;
  gap: 8px;
  border: 1px solid #ced9d0;
  border-radius: 9px;
  background: white;
  padding: 10px 15px;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.45;
  transition:
    background 0.18s,
    transform 0.18s;
}
.btn:hover {
  background: #edf5ef;
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  color: #fff;
  background: #174c3c;
  border-color: #174c3c;
}
.btn.primary:hover {
  background: #216247;
}
.page-head .btn {
  min-height: 43px;
  padding-inline: 17px;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 17px;
  background: radial-gradient(
    ellipse at 87% 51%,
    #1d5746 0%,
    #103d34 53%,
    #0d352e 85%
  );
  color: #fff;
  min-height: 202px;
  display: flex;
  align-items: center;
}
.hero:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(
    circle,
    rgba(177, 225, 192, 0.25) 0.75px,
    transparent 0.95px
  );
  background-size: 13px 13px;
  mask-image: linear-gradient(to right, transparent 14%, #000 63%);
  opacity: 0.72;
}
.wave {
  position: absolute;
  right: -1px;
  top: 0;
  width: 64%;
  height: 100%;
  z-index: -1;
}
.hero-content {
  padding: 24px 30px 26px;
}
.hero-kicker {
  gap: 8px;
  color: #b2e7c6;
  letter-spacing: 0.15em;
  font-size: 0.7rem;
}
.signal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a2e3b6;
  box-shadow: 0 0 0 3px #8bdbab20;
}
.hero h2 {
  margin: 9px 0 19px;
  font-size: clamp(1.65rem, 2.4vw, 2.14rem);
  font-weight: 570;
  letter-spacing: -0.055em;
}
.hero-stats {
  display: flex;
  gap: 25px;
}
.hero-stats > div {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.hero-stats > div + div {
  padding-left: 24px;
  border-left: 1px solid #b8e5c42e;
}
.hero-stat {
  font-size: 2.13rem;
  font-weight: 580;
  letter-spacing: -0.075em;
  font-variant-numeric: tabular-nums;
}
.hero-stat small {
  font-size: 1.37rem;
  color: #b0cebc;
  font-weight: 450;
  letter-spacing: -0.04em;
}
.hero-stat + span {
  margin-top: 5px;
  color: #d4e6d9;
  font-size: 0.79rem;
}
.hero-tag {
  gap: 6px;
  position: absolute;
  right: 19px;
  bottom: 14px;
  border: 1px solid #c0e6cd38;
  background: #123e33ad;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.7rem;
  color: #c2e3c9;
  letter-spacing: 0.02em;
}
.metric-section {
  margin: 27px 0 23px;
}
.section-head {
  margin-bottom: 14px;
}
.section-head a,
.panel-foot a,
.text-btn {
  font-size: 0.83rem;
  font-weight: 640;
  color: #296650;
  gap: 5px;
}
.section-head a:hover,
.panel-foot a:hover,
.text-btn:hover {
  text-decoration: underline;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.metric-card,
.panel {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 13px;
  box-shadow: 0 2px 3px #132f1e03;
}
.metric-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  text-align: left;
  padding: 16px 17px 44px;
  min-height: 162px;
  transition:
    transform 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}
.metric-card:hover {
  transform: translateY(-3px);
  border-color: var(--tint);
  box-shadow: 0 6px 18px #173c2a0c;
}
.metric-heading {
  gap: 9px;
  font-size: 0.87rem;
  font-weight: 640;
  line-height: 1.2;
}
.metric-icon,
.head-icon,
.big-icon,
.med-icon {
  justify-content: center;
  align-items: center;
  display: inline-flex;
  flex: none;
  border-radius: 9px;
}
.metric-icon {
  width: 32px;
  height: 32px;
  background: var(--pale);
  color: var(--tint);
}
.metric-number {
  display: block;
  margin-top: 13px;
  font-size: clamp(1.7rem, 2.24vw, 2.22rem);
  font-weight: 630;
  letter-spacing: -0.072em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.metric-number small {
  font-size: 0.77rem;
  letter-spacing: -0.015em;
  color: var(--muted);
  font-weight: 500;
}
.metric-sub {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 5px;
}
.spark {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 34px;
  pointer-events: none;
}
.theme-coral {
  --tint: #b95b57;
  --pale: #f9e8e4;
}
.theme-amber {
  --tint: #aa792e;
  --pale: #faf0d9;
}
.theme-violet {
  --tint: #7965ad;
  --pale: #eee8f9;
}
.theme-teal {
  --tint: #2f8069;
  --pale: #e0f1e6;
}
.theme-blue {
  --tint: #53809e;
  --pale: #e5eff8;
}
.theme-pink {
  --tint: #ab5c82;
  --pale: #f7e5ed;
}
.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(255px, 1fr);
  gap: 18px;
  align-items: stretch;
}
.panel {
  overflow: hidden;
}
.panel-head {
  padding: 20px 20px 16px;
}
.panel-head h2 {
  font-size: 1.16rem;
}
.panel-title {
  gap: 9px;
}
.head-icon {
  width: 29px;
  height: 29px;
  color: var(--tint, #34775b);
  background: var(--pale, #e9f3eb);
  border-radius: 8px;
}
.date-pick {
  position: relative;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 0.76rem;
  color: #455a50;
  font-weight: 550;
  white-space: nowrap;
}
.date-pick input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
  border: 0;
}
.date-pick:focus-within {
  outline: 2px solid var(--accent);
}
.date-pick input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.agenda-row {
  display: flex;
  align-items: center;
  text-align: left;
  width: 100%;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #e8ede8;
}
.agenda-list {
  padding: 0 20px;
}
.agenda-row:hover,
.history-row:hover {
  background: #f7faf7;
}
.time {
  font-size: 0.83rem;
  font-weight: 580;
  color: #4d5e54;
  font-variant-numeric: tabular-nums;
}
.med-icon {
  width: 36px;
  height: 36px;
  background: var(--pale);
  color: var(--tint);
}
.med-title,
.grow {
  flex: 1;
  min-width: 0;
}
.med-title strong,
.med-title small,
.grow strong,
.grow small {
  display: block;
}
.med-title strong,
.grow strong {
  font-size: 0.91rem;
  font-weight: 640;
  overflow-wrap: anywhere;
}
.med-title small,
.grow small {
  color: var(--muted);
  font-size: 0.76rem;
  margin-top: 2px;
}
.status {
  gap: 4px;
  border-radius: 20px;
  padding: 3px 8px;
  white-space: nowrap;
  font-size: 0.71rem;
  font-weight: 600;
}
.status.taken {
  background: #e7f3e8;
  color: #366b40;
}
.status.pending {
  background: #f9efd8;
  color: #846423;
}
.status.skipped {
  background: #f3e8e7;
  color: #975e58;
}
.status.review {
  background: #eee9f6;
  color: #58416e;
}
.panel-foot {
  padding: 10px 20px 13px;
  border-top: 1px solid var(--line);
}
.panel-foot a {
  display: inline-flex;
  font-size: 0.78rem;
}
.weekly-body {
  padding: 0 21px 18px;
}
.week-num {
  font-size: 2.55rem;
  font-weight: 600;
  letter-spacing: -0.075em;
  line-height: 1.2;
}
.week-num small {
  font-size: 1.6rem;
  font-weight: 500;
}
.weekly-body p,
.panel-head > small {
  font-size: 0.78rem;
  color: var(--muted);
}
.bars {
  display: flex;
  justify-content: space-between;
  gap: 8%;
  margin: 15px 0 0;
  height: 83px;
}
.bar-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
  padding: 0;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
}
.bar-bg {
  display: flex;
  align-items: flex-end;
  width: 100%;
  max-width: 29px;
  height: 100%;
  background: #f0f4ef;
  border-radius: 4px;
  overflow: hidden;
}
.bar-bg i {
  width: 100%;
  background: #a3cfb6;
  border-radius: 4px;
  transition: height 0.3s;
}
.bar-button.current {
  color: #245f44;
  font-weight: 730;
}
.bar-button.current i {
  background: #387e5c;
}
.bar-button:hover .bar-bg i {
  background: #53936b;
}
.segmented {
  display: inline-flex;
  background: #eaf0e9;
  padding: 4px;
  border-radius: 9px;
  gap: 2px;
  margin-bottom: 18px;
}
.segmented button {
  padding: 7px 14px;
  font-size: 0.87rem;
  border-radius: 6px;
  color: var(--sub);
}
.segmented .on {
  background: #fff;
  box-shadow: 0 1px 4px #183b2017;
  color: var(--dark);
  font-weight: 650;
}
.mini {
  margin: 0;
}
.mini button {
  font-size: 0.77rem;
  padding: 5px 10px;
}
.med-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(235px, 100%), 1fr));
  gap: 15px;
}
.med-card {
  padding: 20px;
}
.med-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 17px;
}
.big-icon {
  width: 43px;
  height: 43px;
  background: var(--pale);
  color: var(--tint);
}
.med-card h2 {
  overflow-wrap: anywhere;
}
.med-card p {
  color: var(--sub);
  margin: 4px 0 17px;
}
.med-schedule {
  align-items: flex-start;
  gap: 8px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--sub);
}
.med-agenda,
.trend-panel,
.list-panel {
  margin-top: 21px;
}
.empty {
  text-align: center;
  padding: 30px 17px;
  color: var(--sub);
  font-size: 0.9rem;
}
.empty > span {
  color: #65977b;
}
.empty p {
  margin: 6px 0 11px;
}
.chart-body {
  padding: 0 21px 15px;
}
.chart-meta {
  font-size: 0.8rem;
  color: var(--sub);
  margin: 6px 0 12px;
}
.trend {
  width: 100%;
  height: auto;
  max-height: 235px;
  display: block;
}
.trend text {
  font:
    13px "DM Sans",
    sans-serif;
  fill: #66766c;
}
.chart-empty {
  padding: 40px 14px;
  text-align: center;
  color: var(--sub);
}
.legend {
  justify-content: center;
  gap: 18px;
  font-size: 0.79rem;
  color: var(--sub);
}
.legend span:before {
  content: "";
  display: inline-block;
  width: 20px;
  vertical-align: middle;
  margin-right: 6px;
  border-top: 2px solid #cc6b67;
}
.legend span + span:before {
  border-top: 2px dashed #577a87;
}
.history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
.history-row > b {
  font-size: 1rem;
}
.history-row > b small {
  font-weight: 450;
  color: var(--sub);
}
.filters {
  gap: 12px;
  flex-wrap: wrap;
}
.filters label,
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 620;
}
input,
textarea,
select {
  border-radius: 8px;
  border: 1px solid #cbd7d0;
  background: #fff;
  padding: 10px 12px;
  max-width: 100%;
  min-width: 0;
}
select {
  appearance: none;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%235d7165' stroke-width='1.6' d='m1 1 5 5 5-5'/%3E%3C/svg%3E")
    no-repeat right 11px center;
  padding-right: 32px;
}
.settings {
  padding: 25px;
  max-width: 780px;
}
.settings p {
  color: var(--sub);
  margin: 9px 0 16px;
  max-width: 65ch;
}
.settings .btn {
  margin: 0 8px 6px 0;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}
.storage-error,
.form-error {
  color: #913934;
  background: #fff0eb;
  padding: 10px;
  border-radius: 7px;
  margin-bottom: 12px;
}
dialog {
  width: min(476px, calc(100% - 28px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid #d8e2d9;
  border-radius: 18px;
  box-shadow: 0 25px 100px #102a1f33;
  color: var(--ink);
  background: #fff;
}
dialog::backdrop {
  background: rgba(19, 39, 31, 0.38);
  backdrop-filter: blur(3px);
}
body:has(dialog[open]) {
  overflow: hidden;
}
dialog[open] {
  animation: show 0.17s ease-out;
}
.dialog-head {
  padding: 22px 24px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dialog-head h2 {
  font-size: 1.45rem;
}
.iconbtn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  justify-content: center;
  color: var(--sub);
}
.iconbtn:hover {
  background: var(--bg);
}
.dialog-body {
  padding: 4px 24px 24px;
}
.dialog-body > p,
.modal-help {
  font-size: 0.89rem;
  color: var(--sub);
  margin: 2px 0 16px;
}
.dialog-body form {
  display: grid;
  gap: 14px;
}
.dialog-body input,
.dialog-body select,
.dialog-body textarea {
  width: 100%;
  font-weight: 450;
  font-size: 1rem;
}
.dialog-body textarea {
  resize: vertical;
  min-height: 68px;
}
.form-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.action-list {
  display: grid;
  gap: 9px;
}
.option {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px;
  width: 100%;
  background: white;
}
.option:hover {
  background: #f2f7f2;
}
.option > span:not(.metric-icon) {
  flex: 1;
}
.option strong,
.option small {
  display: block;
}
.option small {
  color: var(--sub);
  font-size: 0.8rem;
  margin-top: 2px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
}
.dialog-actions.split {
  justify-content: space-between;
}
.btn.danger {
  color: #934d46;
}
.detail-value {
  margin: 10px 0 16px;
  font-size: 2.25rem;
  font-weight: 630;
  letter-spacing: -0.055em;
}
.detail-value small {
  color: var(--sub);
  font-size: 1rem;
  font-weight: 450;
  letter-spacing: 0;
}
.detail-list {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  row-gap: 9px;
  margin: 14px 0 20px;
  font-size: 0.89rem;
}
.detail-list dt {
  color: var(--muted);
}
.detail-list dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.weekdays {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.weekdays input,
.swatches input {
  position: absolute;
  opacity: 0;
  width: 1px;
}
.weekdays span {
  display: block;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 0.8rem;
  cursor: pointer;
}
.weekdays input:checked + span {
  background: #e2efe3;
  border-color: #a3c8b0;
  color: #235b3f;
}
.weekdays input:focus-visible + span,
.swatches input:focus-visible + span {
  outline: 2px solid var(--accent);
}
fieldset {
  padding: 0;
  border: 0;
  margin: 0;
}
legend {
  font-size: 0.86rem;
  font-weight: 620;
  margin-bottom: 7px;
}
.time-input {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.swatches {
  display: flex;
  gap: 9px;
}
.swatches span {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--pale);
  border: 2px solid var(--tint);
  cursor: pointer;
}
.swatches input:checked + span {
  box-shadow:
    0 0 0 2px white,
    0 0 0 4px var(--tint);
}
#toast {
  position: fixed;
  z-index: 30;
  left: calc(50% + var(--sidebar) / 2);
  bottom: 21px;
  transform: translate(-50%, 12px);
  background: #143f33;
  color: white;
  box-shadow: 0 5px 18px #132e201f;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.88rem;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  max-width: calc(100vw - 32px);
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  padding: 12px 17px;
  pointer-events: auto;
}
#toast button {
  color: #c2f3cd;
  font-weight: 650;
}
.form-error:empty {
  display: none;
}
.modal-sub {
  margin: 0 0 12px;
  color: var(--sub);
}
.danger-zone {
  margin-top: 16px;
}
.file-in {
  display: block;
  margin: 12px 0;
}
.swatch-name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(100%);
}
@keyframes show {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1600px) {
  :root {
    --sidebar: 250px;
  }
  main {
    padding: 42px 52px;
  }
  .hero {
    min-height: 224px;
  }
  .metric-card {
    min-height: 180px;
  }
  .agenda-row {
    padding-block: 15px;
  }
  .hero-content {
    padding-left: 36px;
  }
}
@media (max-width: 1170px) {
  :root {
    --sidebar: 193px;
  }
  .shell > aside {
    padding-inline: 13px;
  }
  main {
    padding: 29px 25px;
  }
  .metrics-grid {
    gap: 10px;
  }
  .metric-card {
    padding-inline: 13px;
  }
  .metric-heading {
    gap: 7px;
    font-size: 0.82rem;
  }
  .bottom-grid {
    grid-template-columns: minmax(0, 1.48fr) minmax(228px, 1fr);
    gap: 13px;
  }
  .panel-head {
    padding: 16px 15px 13px;
  }
  .agenda-list {
    padding-inline: 15px;
  }
  .weekly-body {
    padding-inline: 15px;
  }
  .panel-title {
    gap: 7px;
  }
  .panel-head h2 {
    font-size: 1.06rem;
  }
  .agenda-row {
    gap: 9px;
  }
}
@media (max-width: 930px) and (min-width: 761px) {
  :root {
    --sidebar: 76px;
  }
  .shell > aside {
    padding: 26px 9px 14px;
  }
  .brand {
    margin: 0 auto;
  }
  .brand > span:last-child,
  .nav-label,
  .nav-link span,
  .profile > span:not(.avatar),
  .profile > .icon {
    display: none;
  }
  .nav-link,
  .profile {
    justify-content: center;
  }
  .nav-link {
    padding: 11px;
  }
  .side-body {
    margin-top: 47px;
  }
  .hero {
    min-height: 180px;
  }
  .nav-link {
    position: relative;
  }
}
@media (max-width: 760px) {
  :root {
    --sidebar: 0px;
  }
  .shell > aside {
    width: 100%;
    height: 60px;
    position: sticky;
    padding: 9px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    top: 0;
    background: #fafcf9f5;
    backdrop-filter: blur(8px);
  }
  .brand {
    margin: 0;
    font-size: 1.9rem;
    gap: 7px;
  }
  .brand-symbol {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
  .brand-symbol svg {
    width: 31px;
    height: 31px;
  }
  .mobile-menu {
    display: flex !important;
  }
  .side-body,
  .side-end {
    display: none;
  }
  .shell > aside.open {
    height: auto;
    min-height: 60px;
    flex-wrap: wrap;
    box-shadow: 0 12px 20px #183f2114;
  }
  .open .brand {
    height: 41px;
  }
  .open .mobile-menu {
    position: absolute;
    right: 18px;
    top: 12px;
  }
  .open .side-body,
  .open .side-end {
    display: block;
    width: 100%;
    margin: 10px 0 0;
  }
  .open .nav-label {
    display: none;
  }
  .open .profile {
    margin-top: 8px;
    padding: 11px 10px;
  }
  .open .side-end {
    margin-top: 0;
  }
  .open .nav-link {
    min-height: 42px;
    margin: 0;
    padding: 9px;
  }
  .page-head {
    margin-bottom: 18px;
  }
  main {
    padding: 22px 16px 32px;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .metric-card {
    min-height: 146px;
    padding: 12px 13px 36px;
  }
  .metric-heading {
    font-size: 0.86rem;
  }
  .metric-number {
    font-size: 1.87rem;
  }
  .metric-number small {
    font-size: 0.74rem;
  }
  .metric-section {
    margin: 22px 0 16px;
  }
  .bottom-grid {
    grid-template-columns: 1fr;
  }
  .week-panel .bars {
    height: 92px;
  }
  .hero {
    min-height: 175px;
  }
  .hero-content {
    padding: 19px;
  }
  .wave {
    width: 63%;
    opacity: 0.74;
    right: -10%;
  }
  .hero-tag {
    display: none;
  }
  .hero-stats {
    gap: 16px;
  }
  .hero-stats > div + div {
    padding-left: 16px;
  }
  .hero h2 {
    margin: 9px 0 15px;
  }
  .hero-stat {
    font-size: 1.9rem;
  }
  .hero-stat + span {
    font-size: 0.74rem;
  }
  .section-head h2 {
    font-size: 1.16rem;
  }
  .section-head {
    margin-bottom: 11px;
  }
  .section-head a {
    font-size: 0.78rem;
  }
  .page-head .btn {
    font-size: 0.82rem;
    padding: 9px 12px;
    min-height: 40px;
  }
  .subtitle {
    font-size: 0.81rem;
  }
  .week-num {
    font-size: 2.15rem;
  }
  .panel-head {
    padding: 16px;
  }
  .bar-bg {
    max-width: 33px;
  }
  #toast {
    left: 50%;
    min-width: max-content;
    max-width: 94vw;
  }
  .trend {
    min-height: 120px;
  }
  .history-row {
    padding-inline: 13px;
  }
  .history-row .grow strong {
    font-size: 0.85rem;
  }
  .history-row .grow small {
    font-size: 0.72rem;
  }
  .settings {
    padding: 18px;
  }
  .med-card {
    padding: 17px;
  }
}
@media (max-width: 450px) {
  h1 {
    font-size: 1.9rem;
  }
  .page-head {
    gap: 9px;
    align-items: flex-start;
  }
  .page-head .btn {
    font-size: 0.77rem;
    padding: 8px 9px;
    gap: 4px;
  }
  .page-head .btn .icon {
    width: 15px;
  }
  .subtitle {
    align-items: flex-start;
    max-width: 240px;
  }
  .subtitle > .icon {
    margin-top: 2px;
  }
  .hero {
    background: linear-gradient(110deg, #0d352e, #174c3d);
  }
  .wave {
    mask-image: linear-gradient(90deg, transparent, #000 27%);
    width: 68%;
    right: -20%;
    opacity: 0.66;
  }
  .hero-kicker {
    font-size: 0.66rem;
  }
  .metric-heading {
    font-size: 0.78rem;
  }
  .metric-icon {
    width: 28px;
    height: 28px;
  }
  .agenda-row {
    gap: 8px;
  }
  .time {
    font-size: 0.77rem;
  }
  .med-icon {
    width: 30px;
    height: 32px;
  }
  .agenda-list {
    padding: 0 12px;
  }
  .med-title strong {
    font-size: 0.85rem;
  }
  .status {
    font-size: 0.67rem;
    padding: 4px 6px;
  }
  .dialog-head {
    padding: 18px 17px 12px;
  }
  .dialog-body {
    padding: 3px 17px 18px;
  }
  .filters label {
    flex: 1;
    font-size: 0.79rem;
  }
  .filters select {
    font-size: 0.81rem;
  }
  .trend-panel .panel-head {
    align-items: flex-start;
    gap: 4px;
  }
  .chart-body {
    padding: 0 12px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-display: swap;
  src: url("assets/instrument-serif.ttf") format("truetype");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-display: swap;
  src: url("assets/instrument-serif-italic.ttf") format("truetype");
}
:root {
  --bg: #f7f7f1;
  --line: #dfe2d7;
  --ink: #21392f;
}
.shell > aside {
  background: #f0f2e9;
}
.brand {
  letter-spacing: -0.077em;
}
.brand-symbol {
  border-radius: 10px;
}
.nav-link.selected {
  background: #dce8d5;
}
.profile {
  font-size: 0.92rem;
}
.profile > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.profile strong {
  overflow-wrap: anywhere;
}
.brand-dot {
  color: #629261;
}
h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.85rem, 4.4vw, 4.15rem);
  font-weight: 400;
  letter-spacing: -0.037em;
  line-height: 0.99;
}
.page-head {
  margin-bottom: 23px;
}
.subtitle {
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.header-date {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 610;
  border: 1px solid #cbd4c6;
  border-radius: 99px;
  padding: 3px 9px;
  color: #52614e;
  line-height: 1.3;
  background: #eff2e8;
}
.profile-chip:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7a8e62;
}
.profile-chip:hover {
  background: #e4ebda;
}
.btn.primary {
  border-radius: 24px;
}
.hero {
  min-height: 235px;
  border-radius: 13px;
  background: radial-gradient(
    ellipse at 65% 50%,
    #335e42 0%,
    #1b4839 41%,
    #133d31 63%,
    #0e332a 100%
  );
}
.hero:before {
  background-image: radial-gradient(
    circle,
    rgba(206, 228, 181, 0.34) 0.65px,
    transparent 0.95px
  );
  background-size: 11px 11px;
  mask-image: linear-gradient(
    to right,
    transparent,
    #000 47%,
    #000 75%,
    transparent
  );
}
.hero-content {
  max-width: 49%;
  padding: 25px 32px;
  z-index: 1;
}
.hero-kicker {
  font-size: 0.72rem;
  color: #dce4be;
}
.signal-dot {
  background: #e6c280;
  box-shadow: 0 0 0 3px #e2c89813;
}
.hero h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.25rem, 3.9vw, 3.9rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin: 9px 0 7px;
  overflow-wrap: anywhere;
}
.hero-dose {
  color: #d8e6d6;
  display: flex;
  gap: 11px;
  align-items: center;
  font-size: 0.95rem;
}
.hero-dose > span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-variant-numeric: tabular-nums;
}
.hero-dose i {
  width: 3px;
  height: 3px;
  background: #bdcdb9;
  border-radius: 50%;
  flex: none;
}
.hero-actions {
  margin-top: 20px;
}
.hero-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #d7edb6;
  color: #224334;
  border-radius: 24px;
  padding: 8px 15px;
  font-weight: 670;
  font-size: 0.85rem;
  border: 1px solid #e9f6d14d;
}
.hero-action:hover {
  background: #ebf5cd;
}
.dial-art {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 60%;
  overflow: hidden;
}
.wave {
  width: 100%;
  height: 100%;
  inset: 0;
  opacity: 1;
  mask-image: none;
  z-index: 0;
}
.dial {
  position: absolute;
  left: 56%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 107%;
  width: auto;
  max-width: 100%;
  overflow: visible;
}
.dial text {
  text-anchor: middle;
  pointer-events: none;
}
.dial-label {
  fill: #e1eacb;
  font:
    11px/1 "DM Sans",
    sans-serif;
  letter-spacing: 0.06em;
}
.dial-top {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  fill: #c7d8b7;
}
.dial-count {
  font:
    47px/1 "Instrument Serif",
    Georgia,
    serif;
  fill: #f6f4db;
  letter-spacing: -0.04em;
}
.dial-den {
  font-size: 30px;
  fill: #c7d8bc;
}
.dial-complete {
  font:
    12px "DM Sans",
    sans-serif;
  fill: #d3deca;
}
.dial-marker {
  cursor: pointer;
}
.dial-marker:hover circle:last-child,
.dial-marker:focus-visible circle:last-child {
  r: 5;
  fill: #fff;
}
.dial-marker:focus-visible {
  outline: none;
  filter: drop-shadow(0 0 3px #fff7c2);
}
.dial-progress {
  transition: stroke-dasharray 0.36s ease;
}
.section-head h2,
.panel-title h2,
.panel-head > h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.024em;
}
.section-head h2 {
  font-size: 1.92rem;
}
.panel-title h2,
.panel-head > h2 {
  font-size: 1.62rem;
}
.section-head {
  margin-bottom: 12px;
}
.metric-heading {
  font-weight: 570;
}
.metric-number {
  font-weight: 550;
  letter-spacing: -0.056em;
}
.metric-card {
  border-color: color-mix(in srgb, var(--tint) 19%, #e3e5dc);
  background: linear-gradient(
    130deg,
    color-mix(in srgb, var(--pale) 55%, white),
    color-mix(in srgb, var(--pale) 18%, #fcfcf8)
  );
  border-radius: 10px;
  box-shadow: none;
}
.metric-heading .metric-icon {
  width: 30px;
  height: 30px;
  background: color-mix(in srgb, var(--pale) 85%, white);
  border: 1px solid color-mix(in srgb, var(--tint) 15%, var(--pale));
}
.metric-card:after {
  content: "";
  position: absolute;
  pointer-events: none;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 21px,
    color-mix(in srgb, var(--tint) 8%, transparent) 21px 22px
  );
  z-index: 0;
  mask-image: linear-gradient(0deg, #000, transparent);
}
.spark {
  z-index: 1;
}
.panel {
  border-radius: 10px;
  box-shadow: none;
}
.week-num {
  font-weight: 500;
  letter-spacing: -0.07em;
}
.bar-bg i {
  background: #a5c5a1;
}
.bar-button.current i {
  background: #41694f;
}
.nav-link:hover {
  background: #e7eddf;
}
@media (max-width: 1170px) {
  .hero-content {
    padding-left: 24px;
  }
  .hero {
    min-height: 218px;
  }
  .panel-title h2,
  .panel-head > h2 {
    font-size: 1.48rem;
  }
}
@media (max-width: 760px) {
  .shell > aside {
    background: #f0f2e9f7;
  }
  .hero {
    min-height: 190px;
  }
  .hero-content {
    padding: 19px;
    max-width: 55%;
  }
  .hero h2 {
    font-size: clamp(2rem, 6vw, 3rem);
  }
  .dial-art {
    width: 51%;
  }
  .dial {
    height: 95%;
    left: 54%;
  }
  .hero-actions {
    margin-top: 14px;
  }
  .hero-action {
    padding: 7px 11px;
    font-size: 0.78rem;
  }
  .hero-dose {
    font-size: 0.83rem;
    gap: 7px;
  }
  .hero-dose .icon {
    width: 13px;
  }
  .section-head h2 {
    font-size: 1.65rem;
  }
  .panel-title h2,
  .panel-head > h2 {
    font-size: 1.45rem;
  }
  .page-head .btn {
    white-space: nowrap;
  }
  .subtitle {
    gap: 6px 9px;
  }
  .metric-number {
    font-size: 1.93rem;
  }
  .profile-chip {
    font-size: 0.69rem;
  }
  .header-date {
    gap: 5px;
  }
}
@media (max-width: 450px) {
  h1 {
    font-size: 2.67rem;
  }
  .page-head {
    position: relative;
    display: block;
  }
  .page-head > div {
    width: 100%;
  }
  .page-head > .btn {
    position: static;
    float: none;
    margin-top: 9px;
  }
  .page-head:has(+ .hero) > .btn {
    position: absolute;
    right: 0;
    top: 1px;
    margin: 0;
  }
  .subtitle {
    max-width: none;
  }
  .subtitle .header-date {
    font-size: 0.76rem;
  }
  .hero {
    min-height: 171px;
  }
  .hero-content {
    max-width: 58%;
    padding: 15px;
  }
  .hero h2 {
    font-size: 2.15rem;
  }
  .hero-kicker {
    font-size: 0.63rem;
  }
  .hero-actions {
    margin-top: 12px;
  }
  .hero-dose {
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 4px 7px;
  }
  .dial-art {
    width: 47%;
    mask-image: linear-gradient(90deg, transparent, #000 10%);
  }
  .dial {
    max-width: none;
    height: auto;
    width: 110%;
    left: 53%;
  }
  .hero-action {
    padding: 7px 10px;
  }
  .wave {
    opacity: 0.9;
  }
  .metric-heading {
    font-size: 0.77rem;
  }
  .metric-heading .metric-icon {
    width: 27px;
    height: 27px;
  }
  .section-head a {
    font-size: 0.75rem;
  }
}
@media (max-width: 355px) {
  h1 {
    font-size: 2.3rem;
  }
  .page-head:has(+ .hero) > .btn {
    position: static;
    margin-top: 7px;
  }
  .hero-content {
    padding: 12px;
  }
  .hero h2 {
    font-size: 1.9rem;
  }
}

.plans-label {
  margin-top: 30px;
}
.plan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(230px, 1fr);
  gap: 16px;
}
.plan-lead,
.plan-tile {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.plan-lead {
  isolation: isolate;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 188px;
  background: #6e3d35;
  color: #fff8ed;
}
.theme-amber .plan-lead {
  background: #664c26;
}
.plan-lead-inner {
  position: relative;
  z-index: 1;
  padding: 24px;
}
.plan-lead .hero-kicker {
  color: #f5e4cd;
  letter-spacing: 0.1em;
}
.plan-value {
  font:
    400 clamp(2.7rem, 4.8vw, 4.7rem)/1.07 "Instrument Serif",
    Georgia,
    serif;
  margin: 10px 0 2px;
  letter-spacing: -0.035em;
}
.plan-value small {
  font:
    500 1rem "DM Sans",
    sans-serif;
  letter-spacing: 0;
}
.plan-lead-inner > p {
  font-size: 0.84rem;
  color: #f2dfd2;
}
.plan-link {
  margin: 10px 0 0;
  color: #fff4dd;
  border-bottom: 1px solid #f5e6d5aa;
  font-size: 0.82rem;
  padding: 0;
}
.plan-paper {
  position: absolute;
  z-index: 0;
  right: -3%;
  width: 51%;
  height: 100%;
  color: #ffb6a2;
  opacity: 0.8;
  mask-image: linear-gradient(90deg, transparent 0%, #000 33%);
}
.theme-amber .plan-paper {
  color: #f9c279;
}
.plan-paper svg {
  height: 100%;
  width: 100%;
}
.plan-tile,
.plan-care {
  background: #fefefa;
  padding: 20px 22px;
}
.plan-tile p {
  font-size: 0.83rem;
  color: var(--sub);
}
.tile-value {
  font-size: 2.35rem;
  line-height: 1.15;
  letter-spacing: -0.06em;
  margin-top: 13px;
}
.tile-value small {
  font-size: 0.85rem;
  letter-spacing: 0;
  color: var(--sub);
}
.plan-tile .text-btn {
  margin-top: 12px;
}
.context-list {
  display: grid;
  margin-top: 6px;
}
.tile-period {
  margin-top: 7px;
}
.context-list button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  padding: 5px 0;
  gap: 10px;
}
.context-list button:hover {
  color: var(--accent);
  background: #f7f6ef;
}
.context-list b {
  font-variant-numeric: tabular-nums;
}
.condition-middle {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(230px, 1fr);
  gap: 16px;
  margin-top: 18px;
  align-items: stretch;
}
.plan-filter {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 1px 0 15px;
}
.plan-filter .field {
  font-size: 0.75rem;
  color: var(--sub);
}
.plan-filter select {
  font-size: 0.85rem;
  padding-block: 6px;
  font-weight: 500;
}
.average {
  font-size: 0.79rem;
  color: var(--sub);
  text-align: right;
}
.average b {
  font-size: 1.05rem;
  color: var(--ink);
}
.average small {
  display: block;
  font-size: 0.74rem;
}
.plan-care h2 {
  font:
    400 1.65rem "Instrument Serif",
    Georgia,
    serif;
}
.plan-care h3 {
  font-size: 0.87rem;
  margin: 12px 0 5px;
  font-weight: 650;
  letter-spacing: 0;
}
.plan-care p {
  font-size: 0.84rem;
  color: var(--sub);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.plan-care .text-btn {
  margin: 9px 0 0;
  padding: 0;
}
.plan-care hr {
  margin: 15px 0;
}
.plan-med {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 0;
  color: var(--sub);
  text-align: left;
  font-size: 0.84rem;
}
.plan-med:hover {
  text-decoration: underline;
}
.plan-med span {
  overflow-wrap: anywhere;
}
.plan-checks,
.link-choices {
  display: flex;
  gap: 13px;
}
.plan-checks label,
.link-choices label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
}
.plan-checks input,
.link-choices input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  flex: none;
}
.link-choices {
  flex-direction: column;
  gap: 8px;
}
.link-choices label {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.link-choices strong,
.link-choices small {
  display: block;
}
.link-choices small {
  color: var(--sub);
}
.plan-checks {
  flex-wrap: wrap;
}
@media (max-width: 1050px) {
  .condition-middle {
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr);
  }
  .condition .panel-head {
    flex-wrap: wrap;
  }
  .plan-care,
  .plan-tile {
    padding: 17px;
  }
}
@media (max-width: 760px) {
  .open .plans-label {
    display: block;
    margin: 14px 9px 3px;
  }
  .plan-grid,
  .condition-middle {
    grid-template-columns: 1fr;
  }
  .plan-grid {
    gap: 11px;
  }
  .plan-lead {
    min-height: 163px;
  }
  .plan-tile {
    padding: 14px 17px;
  }
  .condition-middle {
    gap: 11px;
    margin-top: 11px;
  }
  .plan-lead-inner {
    padding: 18px;
  }
  .plan-value {
    font-size: 3.3rem;
  }
  .plan-filter {
    align-items: center;
  }
  .context-list {
    margin-top: 8px;
  }
  .plan-tile .tile-value {
    margin-top: 6px;
  }
  .condition-middle .trend {
    min-height: 120px;
  }
  .plan-care {
    padding: 16px;
  }
  .open .nav-label.plans-label {
    font-size: 0.66rem;
  }
  .shell > aside.open {
    max-height: 90dvh;
    overflow-y: auto;
  }
}

.reader-feature {
  background: #e7eddf;
  border: 1px solid #d2ddcb;
  border-radius: 13px;
  padding: 27px 30px;
}
.reader-feature .hero-kicker {
  color: #4e6253;
}
.reader-feature h2 {
  font:
    400 clamp(2.1rem, 4vw, 3.7rem)/1.06 "Instrument Serif",
    Georgia,
    serif;
  margin: 10px 0 9px;
  letter-spacing: -0.035em;
}
.reader-feature p {
  max-width: 570px;
  color: var(--sub);
  font-size: 0.95rem;
  margin: 0 0 17px;
}
.reader-feature .btn {
  margin: 3px 3px 0 0;
}
.study-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(205px, 1fr);
  gap: 16px;
  margin-top: 18px;
  align-items: start;
}
.study-layout .list-panel {
  margin: 0;
}
.lab-sources {
  padding: 20px;
}
.lab-sources h2,
.renal-tile > strong {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
}
.lab-sources h2 {
  font-size: 1.55rem;
}
.lab-sources p {
  font-size: 0.85rem;
  color: var(--sub);
  margin: 8px 0 13px;
}
.lab-sources a,
.source-preview {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 550;
  color: var(--accent);
  margin: 10px 0;
}
.lab-sources a:hover,
.source-preview:hover {
  text-decoration: underline;
}
.lab-select {
  padding: 0 18px 14px;
}
.lab-select select {
  max-width: 100%;
  width: max-content;
}
.file-zone {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  padding: 24px 10px;
  border: 1px dashed #8eaa99;
  background: #f1f6ed;
  border-radius: 9px;
}
.file-zone input {
  font-size: 0.8rem;
}
.file-zone > .icon {
  color: var(--accent);
}
.force-ocr,
.review-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}
.force-ocr {
  margin: 11px 0 15px;
}
.force-ocr input,
.review-check input {
  width: 17px;
  flex: none;
  accent-color: var(--accent);
}
.reading-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}
.spinner {
  width: 21px;
  height: 21px;
  border: 2px solid #d8e6d4;
  border-top-color: #387552;
  border-radius: 100%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
dialog:has(#study-form) {
  width: min(650px, calc(100% - 24px));
}
.review-lines {
  display: grid;
  gap: 11px;
}
.review-line {
  padding: 13px;
  background: #f8faf5;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.review-line:has(input[name="include"]:checked) {
  border-color: #8eaa94;
}
.review-check b {
  font-weight: 630;
}
.review-check small {
  margin-left: auto;
  color: var(--muted);
}
.review-fields {
  display: grid;
  grid-template-columns: minmax(140px, 1.65fr) minmax(62px, 0.65fr) minmax(
      88px,
      1fr
    );
  gap: 8px;
  margin: 9px 0 6px;
}
.review-fields .field {
  font-size: 0.74rem;
}
.review-fields input,
.review-fields select {
  font-size: 0.83rem;
  padding: 7px;
}
.review-fields select {
  padding-right: 23px;
}
.source-line {
  display: block;
  font-size: 0.72rem;
  color: #5b6961;
  overflow-wrap: anywhere;
}
.source-preview {
  margin: 0;
}
.ocr-note {
  font-size: 0.82rem;
  color: #76562b;
}
.study-values > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  justify-content: space-between;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.study-values strong,
.study-values small {
  display: block;
}
.study-values strong,
.study-values b {
  font-size: 0.89rem;
}
.study-values b {
  flex: none;
  max-width: 45%;
}
.study-values small,
.source-file {
  color: var(--sub);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}
.source-file {
  margin: 12px 0;
}
.renal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.renal-tile {
  background: linear-gradient(130deg, var(--pale), #fff);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: left;
  padding: 18px;
  color: var(--ink);
}
.renal-tile.active {
  border-color: var(--tint);
}
.renal-tile > strong {
  display: block;
  font-size: 2.6rem;
  margin: 13px 0 1px;
  line-height: 1.15;
}
.renal-tile > strong > small,
.renal-tile > small {
  font:
    500 0.78rem "DM Sans",
    sans-serif;
  color: var(--sub);
}
.modal-help {
  line-height: 1.5;
}
.source-preview + .modal-help {
  margin-top: 5px;
}
.side-body {
  margin-top: 42px;
}
.plans-label {
  margin-top: 22px;
}
@media (max-width: 760px) {
  .study-layout {
    grid-template-columns: 1fr;
  }
  .reader-feature {
    padding: 22px 18px;
  }
  .renal-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .renal-tile {
    padding: 13px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .renal-tile > .metric-heading {
    width: 100%;
  }
  .renal-tile > strong {
    font-size: 2rem;
    margin: 3px 0 0;
  }
  .review-fields {
    grid-template-columns: 1fr 1fr;
  }
  .review-fields > .field:first-child {
    grid-column: 1/-1;
  }
  .side-body {
    margin-top: 0;
  }
}
.row-crop {
  width: 100%;
  height: auto;
  max-height: 90px;
  object-fit: contain;
  display: block;
  background: white;
  border: 1px solid #d7ddd2;
  border-radius: 4px;
  margin-top: 9px;
}
.ocr-verify {
  font-size: 0.8rem;
  color: #79531c;
  background: #fcf3d8;
  border-radius: 5px;
  margin-top: 7px;
  padding: 6px 8px;
}
