:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #20251f;
  background: #f6f7f4;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #20251f;
  --muted: #6b736b;
  --line: #e0e4dd;
  --paper: #fff;
  --green: #216b4c;
  --green-soft: #e9f3ec;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: #f6f7f4; }
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }
.site-shell { display: block; min-height: 100vh; }
.site-header { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(28px, calc((100vw - 960px) / 2)); background: #fff; border-bottom: 1px solid var(--line); }
.brand { font-size: 17px; font-weight: 700; letter-spacing: -.035em; }
.site-header nav a { color: var(--muted); font-size: 14px; padding: 10px 12px; border-radius: 8px; }
.site-header nav a:hover { color: var(--green); background: var(--green-soft); }
.site-content { width: min(100% - 40px, 720px); margin: 62px auto; }
.eyebrow { margin: 0 0 10px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .13em; }
h1 { margin: 0; font-size: clamp(30px, 5vw, 42px); line-height: 1.1; letter-spacing: -.045em; }
.index-intro { margin: 0 0 26px; }
.back-link { display: inline-flex; align-items: center; min-height: 38px; margin: -12px 0 14px; color: var(--muted); font-size: 14px; }
.back-link:hover { color: var(--green); }
.index-intro > p:last-child { color: var(--muted); margin: 11px 0 0; }
.counter-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.counter-link { min-height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s, transform .15s, box-shadow .15s; }
.counter-link:hover { border-color: #b5cdbd; box-shadow: 0 5px 18px #263a2a0c; transform: translateY(-1px); }
.counter-link > span:first-child { font-weight: 600; }
.counter-value { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: #f1f3ef; color: var(--green); font-weight: 700; }
.counter-card { display: grid; justify-items: start; gap: 18px; padding: 30px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 12px 40px #263a2a09; }
.counter-card output { display: block; font-size: 68px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.06em; }
.counter-card button { min-height: 46px; padding: 0 19px; border: 0; border-radius: 9px; background: var(--green); color: white; font-weight: 650; cursor: pointer; }
.counter-card button:hover { background: #18583e; }

button:disabled { cursor: not-allowed; opacity: .45; }

@media (max-width: 520px) {
  .site-header { height: 60px; padding: 0 20px; }
  .site-content { width: calc(100% - 32px); margin: 34px auto; }
  .counter-card { padding: 23px; }
}

/* App-owned presentation; the package supplies state classes, not a theme. */
.fow-offline .counter-list .fow-nav { color: #916018; }
.fow-offline .counter-link.fow-nav { background: #fffbef; border-color: #e2c98c; }
.fow-offline .fow-nav.fow-nav-uncached { opacity: .4; cursor: not-allowed; }
.fow-offline .counter-card button { opacity: .4; cursor: not-allowed; }

/* LiveView marks the link while its navigation is waiting for a response. */
.fow-nav.phx-click-loading { animation: navigation-wait .55s ease-in-out infinite alternate; }
@keyframes navigation-wait { from { opacity: 1; } to { opacity: .35; } }

/* Only the page content moves. Header and floating developer tools stay still. */
.site-content { view-transition-name: counter-content; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-group(counter-content) { animation-duration: 220ms; }
::view-transition-old(counter-content) { animation: counter-out 220ms ease both; }
::view-transition-new(counter-content) { animation: counter-in 220ms ease both; }
:root { --page-travel: 48px; }
:root[data-fog-of-war-direction="back"] { --page-travel: -48px; }
@keyframes counter-in { from { opacity: 0; transform: translateX(var(--page-travel)); } }
@keyframes counter-out { to { opacity: 0; transform: translateX(calc(-1 * var(--page-travel))); } }
@media (prefers-reduced-motion: reduce) {
  .fow-nav.phx-click-loading { animation: none; opacity: .6; }
  ::view-transition-group(*) { animation-duration: 0s !important; }
}

.site-header nav { display: flex; align-items: center; }
.site-header .all-counters, .profile-name { text-decoration: underline; }
.profile-name { font-weight: 700; }
.profile-name.bob { color: #375aa8; }
.profile-name.sally { color: #9d3168; }
.counter-greeting { margin: 0; font-size: 1.25rem; }
.counter-greeting .profile-name { font-style: italic; }

.login-card { max-width: 380px; margin: 0 auto; }
.login-card form { display: grid; gap: .6rem; }
.account-button { background: var(--green); color: white; border: 0; border-radius: 7px; padding: .7rem 1rem; font-weight: 650; cursor: pointer; }
