:root {
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --spring-release: linear(0, .53 17%, .92 33%, 1.075 51%, 1.045 69%, 1 100%);
  --paper: #f8f8f8;
  --ink: #171717;
  --muted: #626262;
  --rule: #e5e5e5;
}
html { background: #ededed; }
body { color: var(--ink); }
main { background: var(--paper); box-shadow: 0 0 56px #00000009; }
header { height: 67px; }
.brand { font-size: 28px; font-weight: 800; letter-spacing: -.085em; }
.orbit-mark {
  display: block;
  flex: none;
  width: 32px;
  height: 32px;
  transform: none;
  border-radius: 9px;
  overflow: hidden;
}
.orbit-mark img { display: block; width: 100%; height: 100%; transform: scale(1.8); }
.local-label { font-size: 11px; }
.icon-button { border-color: var(--rule); background: white; }
.page-heading { margin-block: 24px 18px; }
h1 { font-size: clamp(30px, 9vw, 44px); line-height: 1; }
.page-heading p { margin-top: 8px; }
.primary { background: #191919; color: white; border-radius: 12px; }
.page-heading > .primary { padding-inline: 12px; }
.hero {
  min-height: 193px;
  padding: 20px;
  border-radius: 23px;
  background: radial-gradient(ellipse at 95% 82%, #515151 0%, transparent 65%), linear-gradient(140deg, #151515, #272727);
}
.total { font-weight: 750; font-variant-numeric: tabular-nums; font-size: clamp(37px, 11vw, 57px); letter-spacing: -.075em; line-height: 1.12; }
.hero-note { color: #ddd; }
.hero-logo {
  position: absolute;
  width: clamp(186px, 60vw, 275px);
  height: auto;
  right: clamp(-68px, -12vw, -36px);
  bottom: -39px;
  opacity: .66;
  mix-blend-mode: screen;
  mask-image: radial-gradient(closest-side, #000 60%, transparent 100%);
  pointer-events: none;
}
.hero-bottom { margin-top: 14px; }
.stat { padding: 13px 15px; border-radius: 15px; background: #fff; }
.stat-number { font-size: 28px; font-weight: 750; font-variant-numeric: tabular-nums; }
.upcoming { padding: 12px 14px; background: white; border-radius: 17px; }
.upcoming .section-head { margin: 0 0 2px; gap: 6px; }
.upcoming .section-head h2 { font-size: 15px; }
.upcoming .text-button { flex-shrink: 0; }
.upcoming .timeline > div + div { border-top: 1px solid #efefef; }
.timeline-row { min-height: 47px; border-radius: 9px; }
.logo { background: linear-gradient(145deg, #383838, #191919); }
.card-price { font-variant-numeric: tabular-nums; }
.sub-card { animation: none; background: white; }
.sidebar { backdrop-filter: none; background: #fbfbfb; }
nav .nav { min-height: 54px; color: #575757; }
nav .nav span { display: grid; place-items: center; height: 27px; }
nav .nav svg { width: 19px; height: 19px; }
nav .nav.active { color: #101010; }
nav .nav.active span { background: #222; color: white; transform: none; }
nav .nav:not(.active) { color: #575757; }
.dialog { animation: none; background: #fafafa; overscroll-behavior: contain; }
.sheet-handle { width: 34px; height: 4px; border-radius: 2px; background: #d2d2d2; margin: -13px auto 17px; }
.shade { backdrop-filter: none; background: #16161682; animation: shade-in .2s ease-out both; }
.modal[data-closing] { pointer-events: none; }
.modal[data-closing] .shade { animation: shade-out .17s ease-out both; }
.modal[data-confirm] { align-items: center; padding-inline: max(16px, var(--left-safe), var(--right-safe)); }
.modal[data-confirm] .dialog { max-width: 375px; border-radius: 19px; padding-bottom: 24px; }
.modal[data-confirm] .sheet-handle { display: none; }
.toast { transition: opacity .16s ease, transform .2s var(--ease-out); }
button, .sub-card { transition: transform .15s var(--ease-out), background-color .15s ease; }
@supports (transition-timing-function: linear(0, 1)) {
  button, .sub-card { transition-timing-function: var(--spring-release), ease; }
}
button:hover, .sub-card:hover { transform: none; box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .sub-card:hover, .timeline-row:hover { background-color: #f0f0f0; }
}
button:active, .sub-card:active {
  transform: scale(.975);
  transition: transform .105s var(--ease-out), background-color .105s ease;
}
@keyframes shade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes shade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes screen-out { to { opacity: 0; transform: translateY(-4px); } }
@keyframes screen-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.screen { view-transition-name: orbit-screen; }
::view-transition-old(orbit-screen) { animation: 120ms var(--ease-out) both screen-out; }
::view-transition-new(orbit-screen) { animation: 180ms var(--ease-out) both screen-in; }
::view-transition { pointer-events: none; }
@media (max-width: 350px) {
  .local-label { display: none; }
  .total { font-size: clamp(32px, 11vw, 39px); }
  .hero { padding: 17px; }
  .upcoming .section-head h2 { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  button:active, .sub-card:active { transform: none; }
  ::view-transition-old(orbit-screen), ::view-transition-new(orbit-screen) { animation: none; }
}
::view-transition-group(orbit-screen),
::view-transition-group(root),
::view-transition-old(root),
::view-transition-new(root) { animation: none; }
::view-transition-old(root) { opacity: 0; }
@media (max-width: 350px) {
  .dialog select { font-size: 16px; letter-spacing: -.035em; }
}
html, body { overflow-x: clip; }
.hero-grid + .panel { margin-top: 16px; }
.detail-info { color: var(--muted); }

.stat-amount { font-size: clamp(18px, 5.5vw, 25px); overflow-wrap: anywhere; }
.detail-price, .card-bottom, .nav { overflow-wrap: anywhere; }
.timeline-price { max-width: 44%; text-align: right; overflow-wrap: anywhere; }
.card-top > span:not(.logo) { min-width: 0; }
.card-name, .category { display: block; }
.sub-card { color: inherit; text-align: left; font: inherit; }
.sub-card:focus-visible { outline: 2px solid #777; outline-offset: 2px; }
.icon-button { width: 44px; height: 44px; }
.dialog { scroll-padding-block: 12px 76px; }
.sheet-footer {
  position: sticky;
  bottom: calc(-1 * var(--sheet-bottom-padding));
  z-index: 1;
  margin: 0 -20px calc(-1 * var(--sheet-bottom-padding));
  padding: 10px 20px var(--sheet-bottom-padding);
  background: #fafafa;
  border-top: 1px solid var(--rule);
}
.sheet-footer .primary { margin: 0; }
.form-dates input { inline-size: 100%; }
@media (max-width: 350px) {
  .form-dates { grid-template-columns: minmax(0, 1fr); }
}


[hidden] { display: none !important; }
.landing {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 50% 28%, #262626, #121212 65%);
  color: #fff;
}
.landing-content { width: min(100%, 28rem); text-align: center; }
.landing-content img {
  display: block;
  width: min(74vw, 250px);
  height: auto;
  margin: 0 auto -20px;
  mix-blend-mode: screen;
  mask-image: radial-gradient(closest-side, #000 48%, transparent);
}
.landing h1 { font-size: clamp(46px, 14vw, 80px); }
.landing p { font-size: 16px; line-height: 1.5; color: #ccc; }
.landing .primary {
  min-height: 48px;
  margin-top: 10px;
  padding-inline: 24px;
  background: #f6f6f6;
  color: #151515;
  font-size: 15px;
}
.landing details { margin-top: 28px; font-size: 14px; color: #bbb; }
.landing details p { font-size: 13px; }

.theme-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0; margin: 16px 0 0; border: 0; min-width: 0; }
.theme-picker legend { padding: 0; font-size: 11px; font-weight: 700; color: var(--muted); }
.dialog .theme-picker label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  margin: 7px 0 0;
  padding: 8px;
  border: 1px solid var(--rule);
  border-radius: 9px;
  color: inherit;
  font-size: 13px;
}
.dialog .theme-picker input { width: 16px; height: 16px; min-height: 0; flex: none; margin: 0; accent-color: currentColor; }
#preferencesError:empty { display: none; }
#preferencesError { font-weight: 700; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111;
  --ink: #f4f4f4;
  --muted: #bcbcbc;
  --rule: #393939;
  --line: #393939;
  background: #0b0b0b;
}
[data-theme="dark"] :is(.stat, .upcoming, .sub-card, .panel, .sidebar, .dialog, .sheet-footer) {
  background: #171717;
  color: var(--ink);
  border-color: var(--rule);
}
[data-theme="dark"] :is(.icon-button, .secondary, .tabs, .pill, .cal-cell, .calendar-agenda .timeline-row) {
  background: #252525;
  color: var(--ink);
  border-color: var(--rule);
}
[data-theme="dark"] :is(.search, .dialog input, .dialog select) {
  background: #1d1d1d;
  color: var(--ink);
  border-color: var(--rule);
}
[data-theme="dark"] :is(.primary, nav .nav.active span, .tabs button.selected, .toast) {
  background: #f1f1f1;
  color: #161616;
}
[data-theme="dark"] :is(.muted, .local-label, .page-heading p, .stat-label, .stat small, .category,
  .card-price small, .card-bottom, .timeline-row small, .detail-info, .text-button, .dialog label,
  .empty, .cal-head, nav .nav:not(.active), .tabs button:not(.selected)) { color: var(--muted); }
[data-theme="dark"] nav .nav.active { color: var(--ink); }
[data-theme="dark"] :is(.card-bottom, .settings-row, .upcoming .timeline > div + div) { border-color: var(--rule); }
[data-theme="dark"] .bar { background: #383838; }
[data-theme="dark"] .bar i { background: linear-gradient(90deg, #aaa, #f1f1f1); }
[data-theme="dark"] .hero select option { color: var(--ink); background: #222; }
[data-theme="dark"] .cal-cell:has(p) { background: #333; }
[data-theme="dark"] .cal-cell p { color: #181818; background: #eee; }
[data-theme="dark"] #notice svg circle { fill: #252525; }
@media (hover: hover) and (pointer: fine) {
  [data-theme="dark"] :is(.sub-card, .timeline-row):hover { background-color: #292929; }
}

.payment-group { margin: 14px 0 1px; font-size: 14px; color: var(--muted); }
.total .total-currency { font-size: .32em; color: #ddd; letter-spacing: 0; }
