@import url("/brand.css");

/* Native neutrals, rounded titles, and the existing Tally accent. */
:root {
  color-scheme: light dark;
  --web-paper: #f9f9fb;
  --web-surface: #ffffff;
  --web-ink: #111114;
  --web-muted: #64646d;
  --web-line: #e2e2e8;
  --web-soft: #f2f2f7;
  --web-tint: var(--brand-cream);
  --web-focus: var(--accent);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 32px; }
body.tally-web {
  margin: 0;
  background: var(--web-paper);
  color: var(--web-ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.tally-web a { color: inherit; text-underline-offset: 4px; }
.tally-web button { font: inherit; }
.tally-web button, .tally-web a { -webkit-tap-highlight-color: transparent; }
.tally-web :focus-visible { outline: 3px solid var(--web-focus); outline-offset: 5px; }
.tally-web h1, .tally-web h2, .tally-web p, .tally-web figure { margin: 0; }
.tally-web h1, .tally-web h2 {
  font-family: var(--brand-font);
  text-wrap: balance;
}
.wrap { width: min(1120px, calc(100% - 96px)); margin-inline: auto; }
.web-header { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.web-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font-size: 30px;
  font-family: var(--brand-font);
  font-weight: 600;
  letter-spacing: normal;
}
.web-brand .tally-mark { width: 30px; height: 36px; flex-basis: 30px; }
.tally-web .web-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 56px;
  padding: 16px 24px;
  border: 1px solid transparent;
  border-radius: 22px;
  background: var(--accent);
  color: var(--accent-foreground);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  transition: background-color 160ms ease;
}
.sf-symbol {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: var(--sf-symbol) center / contain no-repeat;
  mask: var(--sf-symbol) center / contain no-repeat;
}
.sf-decide { --sf-symbol: url("/assets/sf-symbols/checkmark.bubble.png"); }
.sf-calendar { --sf-symbol: url("/assets/sf-symbols/calendar.png"); }
.sf-receipt { --sf-symbol: url("/assets/sf-symbols/receipt.png"); }
.sf-arrow-down { --sf-symbol: url("/assets/sf-symbols/arrow.down.png"); }
.sf-arrow-up-right { --sf-symbol: url("/assets/sf-symbols/arrow.up.right.png"); }
.sf-copy { --sf-symbol: url("/assets/sf-symbols/doc.on.doc.png"); }
.sf-link { --sf-symbol: url("/assets/sf-symbols/link.png"); }
.tally-web .web-button:hover { background: color-mix(in srgb, var(--accent) 92%, black); }
.tally-web .web-button:active { background: var(--accent-pressed); }
.tally-web .web-button.small { min-height: 44px; padding: 11px 20px; font-size: 14px; gap: 16px; }
.tally-web .web-button.secondary { background: var(--web-soft); color: var(--web-ink); border-color: var(--web-line); }
.tally-web .web-button.secondary:hover { background: var(--web-line); }
.text-link { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; font-size: 14px; font-weight: 500; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.web-footer { display: flex; gap: 24px; align-items: center; padding-block: 32px; color: var(--web-muted); font-size: 13px; }
.web-footer .web-brand { color: var(--web-ink); font-size: 25px; }
.web-footer .tally-mark { width: 24px; height: 29px; flex-basis: 24px; }
.web-footer nav { display: flex; gap: 24px; margin-left: auto; }
.web-footer nav a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.web-footer a:hover { text-decoration: underline; }
.skip-link { position: absolute; z-index: 20; top: -100px; left: 16px; padding: 12px 20px; background: var(--web-surface); border-radius: 8px; }
.skip-link:focus { top: 16px; }
.hidden, [hidden] { display: none !important; }

@media (max-width: 760px) {
  .wrap { width: calc(100% - 40px); }
  .web-header { min-height: 88px; gap: 16px; }
  .web-brand { font-size: 28px; }
  .web-footer { flex-wrap: wrap; gap: 8px 20px; padding-block: 24px; }
  .web-footer > p { display: none; }
  .web-footer .copyright { width: 100%; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --web-paper: #101014;
    --web-surface: #1c1c20;
    --web-ink: #f5f5f7;
    --web-muted: #adadb7;
    --web-line: #38383f;
    --web-soft: #29292f;
    --web-tint: var(--brand-end);
    --web-focus: var(--brand-cream);
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .tally-mark { background: CanvasText; }
  .sf-symbol { forced-color-adjust: none; }
}

/* Apple artwork is unmodified. 48px badge height with 12px clear space. */
.app-store-badge {
  display: inline-flex;
  padding: 12px;
  margin-inline: -12px;
  line-height: 0;
  vertical-align: middle;
}
.app-store-badge img { display: block; width: auto; height: 48px; }
