@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,700&display=swap');

:root {
  color-scheme: light dark;
  --page: #F3ECE3;
  --card-bg: #FEFCF9;
  --sunken: #E8DFD4;
  --hairline: #D8CEC0;
  --border-strong: #81796F;
  --ink: #273127;
  --ink-muted: #555D56;
  --action: #367847;
  --action-light: #609C6D;
  --on-action: #FFFFFF;
  --won: #367847;
  --won-fill: #D9F6DD;
  --soon: #A28300;
  --soon-fill: #F3E8C4;
  --overdue: #93250A;
  --overdue-fill: #FFDCD3;
  --destructive: #76011B;
  --destructive-fill: #FFDFDE;
  --nav-bg: rgb(243 236 227 / 88%);
  --shadow-color: rgb(39 49 39 / 11%);
  --card-radius: 22px;
  --display: 'Poppins', sans-serif;
  --body: 'DM Sans', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #121613;
    --card-bg: #1F2520;
    --sunken: #090D0A;
    --hairline: #303831;
    --border-strong: #6E7770;
    --ink: #EEE9E0;
    --ink-muted: #A6A199;
    --action: #8ED09C;
    --action-light: #AFE4B9;
    --on-action: #090D0A;
    --won: #8ED09C;
    --won-fill: #15301B;
    --soon: #FEE657;
    --soon-fill: #2F290A;
    --overdue: #F48221;
    --overdue-fill: #3B200D;
    --destructive: #DF676B;
    --destructive-fill: #2F0F10;
    --nav-bg: rgb(18 22 19 / 88%);
    --shadow-color: rgb(0 0 0 / 34%);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  overflow-x: clip;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.2; }
a { color: var(--action); }
img { display: block; max-width: 100%; }
.wrap { width: min(100% - 48px, 1080px); margin-inline: auto; }
.wrap-narrow { width: min(100% - 48px, 760px); margin-inline: auto; }
.hidden { display: none !important; }

:focus-visible {
  outline: 3px solid var(--action-light);
  outline-offset: 3px;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--hairline);
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.nav-links a:not(.btn):hover,
.nav-links a.active { color: var(--action); }

.brand-lockup {
  --brand-height: 30px;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}
.brand-type {
  width: calc(var(--brand-height) * 3.24);
  height: var(--brand-height);
  background: currentColor;
  -webkit-mask: url('/img/logo-type.png') center / contain no-repeat;
  mask: url('/img/logo-type.png') center / contain no-repeat;
}

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 10px 24px;
  cursor: pointer;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: filter .15s ease, transform .15s ease, background .15s ease;
}
.btn-primary { background: var(--action); color: var(--on-action); }
.nav-links a.btn-primary { color: var(--on-action); }
.btn-primary:hover:not(:disabled) { filter: brightness(.92); transform: translateY(-1px); }
.btn-secondary {
  border-color: var(--border-strong);
  background: var(--card-bg);
  color: var(--action);
}
.btn-secondary:hover:not(:disabled) { background: var(--sunken); }
.btn-danger { background: var(--destructive); color: var(--on-action); }
.btn-danger:hover:not(:disabled) { filter: brightness(.92); transform: translateY(-1px); }
.btn:disabled { cursor: not-allowed; opacity: .55; transform: none !important; }

.site-footer { border-top: 1px solid var(--hairline); padding: 36px 0 44px; }
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-muted);
  font-size: 14px;
}
.foot .brand-lockup { --brand-height: 23px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot a:not(.brand-lockup) { color: var(--ink-muted); text-decoration: none; }
.foot a:hover { color: var(--action); }

@media (max-width: 640px) {
  .nav-links a:not(.btn) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
