/* TierTrackr website. The app's Timecard look (docs/design-timecard.md): the navy header with the soft fade, Figtree,
   white cards with rows, the yellow main button, and on the home page the Progress page's own chart and tiers, then four
   real screens. The page closes on a navy band. No scripts, no outside files. (Design pass 20 Nov, road-to-apple 34b.) */

@font-face { font-family: "Figtree"; font-weight: 300 900; font-display: swap; src: url("/fonts/figtree-latin.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 300 900; font-display: swap; src: url("/fonts/figtree-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02AF; }

:root {
  --bg: #F2F4F7;
  --card: #FFFFFF;
  --card-edge: #E4E9F0;
  --text: #0E1E32;
  --text-2: #5B6A80;
  --rule: #EDF0F4;
  --well: #F2F4F7;
  --link: #17365F;
  --navy: #17365F;
  --navy-2: #12294A;
  --yellow: #FFC21A;
  --ink: #0E1E32;
  --on-navy: #FFFFFF;
  --on-navy-2: #A9BBD3;
  --chip: rgba(255, 255, 255, .1);
  --quiet-bg: #FFFFFF;
  --quiet-edge: #D9E0EA;
  /* the Progress panel is always the app's dark look, as it sits on the navy */
  --p-card: #101C2E;
  --p-edge: rgba(255, 255, 255, .07);
  --p-text: #EAF0F7;
  --p-text-2: #8FA0B6;
  --p-track: #1A2740;
  --p-risk: #FFB27A;
  --p-good: #5CC48A;
  --fade: 72px;
  --bezel: #0E1E32;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07101C;
    --card: #101C2E;
    --card-edge: rgba(255, 255, 255, .06);
    --text: #EAF0F7;
    --text-2: #8FA0B6;
    --rule: #1C2A3F;
    --well: #0B1524;
    --link: #FFC21A;
    --quiet-bg: #14243A;
    --quiet-edge: rgba(255, 255, 255, .1);
    --bezel: #2A3B56;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.55 "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
p, ul, ol, dl, figure, address { margin: 0 0 1rem; }
address { font-style: normal; }
strong { font-weight: 700; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: .375rem; }
::selection { background: var(--yellow); color: var(--ink); }
p, li, dd { text-wrap: pretty; }

.wrap { margin: 0 auto; padding-left: max(1.25rem, env(safe-area-inset-left)); padding-right: max(1.25rem, env(safe-area-inset-right)); max-width: 45rem; }
.w-toc .wrap { max-width: 64rem; }
.w-home .wrap { max-width: 68rem; }

.skip { position: absolute; left: -999rem; top: 0; background: var(--yellow); color: var(--ink); padding: .75rem 1rem; border-radius: 0 0 .75rem 0; font-weight: 700; z-index: 3; }
.skip:focus { left: 0; }

/* ---------- The navy header and its soft fade ---------- */
.top { background: linear-gradient(var(--navy), var(--navy-2)); color: var(--on-navy); padding: env(safe-area-inset-top) 0 3.25rem; }
.fade { height: var(--fade); background: linear-gradient(var(--navy-2), rgba(18, 41, 74, .9) 14%, rgba(18, 41, 74, .68) 34%, rgba(18, 41, 74, .4) 56%, rgba(18, 41, 74, .16) 78%, rgba(18, 41, 74, 0)); }

.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-top: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; min-height: 2.75rem; color: var(--on-navy); font-weight: 800; font-size: 1.3125rem; letter-spacing: -.02em; text-decoration: none; }
.brand img { display: block; border-radius: .625rem; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.top nav { display: flex; margin-right: -.75rem; }
.top nav a { position: relative; display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .75rem; color: var(--on-navy-2); font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap; }
.top nav a:hover { color: var(--on-navy); }
.top nav a[aria-current="page"] { color: var(--on-navy); }
.top nav a[aria-current="page"]::after { content: ""; position: absolute; left: .75rem; right: .75rem; bottom: .375rem; height: 3px; border-radius: 3px; background: var(--yellow); }
.top nav a:focus-visible { outline-offset: -3px; outline-color: #FFFFFF; }

@media (max-width: 30rem) {
  .bar { flex-wrap: nowrap; gap: .5rem; }
  .brand { gap: .5rem; font-size: 1.1875rem; }
  .brand img { width: 2rem; height: 2rem; border-radius: .5rem; }
  .top nav { margin-right: -.5rem; }
  .top nav a { padding: 0 .5rem; font-size: .9375rem; }
  .top nav a[aria-current="page"]::after { left: .5rem; right: .5rem; }
  .top nav .far { display: none; }
}

.title { padding-top: 2.5rem; }
.title h1 { margin: 0; font-size: clamp(2.125rem, 1.6rem + 2.4vw, 3rem); line-height: 1.08; font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }
.sub { margin: .625rem 0 0; color: var(--on-navy-2); font-size: 1.0625rem; max-width: 34rem; }

/* ---------- Pages with a sheet (privacy, terms, contact, licences) ---------- */
main.wrap { position: relative; margin-top: calc(-1 * var(--fade) - 1.5rem); }
.sheet { background: var(--card); border: 1px solid var(--card-edge); border-radius: 1.375rem; padding: 1.625rem 1.375rem; box-shadow: 0 1px 2px rgba(14, 30, 50, .04), 0 12px 32px -12px rgba(14, 30, 50, .18); }
.sheet > :first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.sheet > :last-child { margin-bottom: 0; }
.sheet h2 { margin: 2.25rem 0 .625rem; padding-top: 2.25rem; border-top: 1px solid var(--rule); font-size: 1.375rem; line-height: 1.2; font-weight: 800; letter-spacing: -.015em; text-wrap: balance; }
.sheet h3 { margin: 0 0 .5rem; font-size: 1.0625rem; line-height: 1.35; font-weight: 700; }
.sheet ul { padding-left: 1.25rem; }
.sheet li { margin-bottom: .375rem; }
.sheet li::marker { color: var(--text-2); }
.big { font-size: 1.375rem; font-weight: 700; letter-spacing: -.01em; }

/* Who runs it and the postal address: small print at the foot of the contact page. Small, never faint. */
.smallprint { margin: 2.25rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--rule); border-radius: 0; background: none; color: var(--text-2); font-size: .8125rem; line-height: 1.5; }
.smallprint summary { min-height: 0; padding: .8125rem 0; margin: -.8125rem 0; font-weight: 400; border-radius: .25rem; }
.smallprint p { margin: .5rem 0 0; }

.toc { display: none; }
@media (min-width: 60rem) {
  .sheet { padding: 2.75rem 3rem; }
  .w-toc main { display: grid; grid-template-columns: 15rem minmax(0, 43rem); justify-content: space-between; align-items: start; }
  .toc { display: block; position: sticky; top: 1.5rem; margin-top: calc(var(--fade) + 3rem); font-size: .9375rem; }
  .toc p { margin: 0 0 .5rem; color: var(--text-2); font-weight: 600; }
  .toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
  .toc a { display: block; padding: .3125rem 0 .3125rem .875rem; margin-left: -2px; border-left: 2px solid transparent; color: var(--text-2); text-decoration: none; line-height: 1.35; }
  .toc a:hover { color: var(--text); border-left-color: var(--yellow); }
}

/* A table row from the privacy notice, as its own block */
.entry { margin: 1rem 0; padding: 1.125rem 1.125rem .375rem; background: var(--well); border-radius: 1rem; }
.entry dl { margin-bottom: .75rem; }
.entry dt { margin-top: .625rem; color: var(--text-2); font-size: .875rem; font-weight: 600; }
.entry dd { margin: 0; }

/* Licences */
.count { color: var(--text-2); font-size: .875rem; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.pkgs { list-style: none; padding: 0 !important; }
.pkgs li { margin: 0; padding: .5rem 0; border-bottom: 1px solid var(--rule); font-size: .9375rem; line-height: 1.4; }
.pkgs li:last-child { border-bottom: 0; }
.pkg { font-weight: 600; }
.ver { color: var(--text-2); }
.copy { display: block; color: var(--text-2); font-size: .8125rem; }
details { margin: 0 0 1rem; border-radius: 1rem; background: var(--well); }
summary { min-height: 2.75rem; padding: .625rem 1.125rem; font-weight: 600; cursor: pointer; border-radius: 1rem; }
pre { margin: 0; padding: 0 1.125rem 1.125rem; font: 400 .8125rem/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }

/* ---------- Home: the pitch and the app's Progress panel ---------- */
.w-home .top { padding-bottom: 0; }
.hero { display: grid; gap: 2rem; padding-top: 2rem; }
.hero h1 { margin: 0; font-size: clamp(3rem, 1.5rem + 8vw, 5.5rem); line-height: .96; font-weight: 800; letter-spacing: -.04em; }
.hero h1 span { display: block; }
.hero h1 span:last-child { color: var(--yellow); }
.hero .sub { margin-top: 1.25rem; font-size: 1.1875rem; line-height: 1.45; max-width: 26rem; }
.status { display: inline-flex; align-items: center; min-height: 2.25rem; margin: 1.5rem 0 0; padding: 0 1rem; border-radius: 99rem; background: var(--chip); color: var(--on-navy); font-size: .9375rem; font-weight: 600; }

.panel { position: relative; z-index: 1; width: 100%; max-width: 25rem; margin: 0 auto -7.5rem; color: var(--p-text); }
.figures { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1rem; padding: 0 .375rem; }
.figures p { margin: 0; font-variant-numeric: tabular-nums; }
.figures .right { text-align: right; }
.label { display: block; color: var(--on-navy-2); font-size: .9375rem; }
.hours { display: block; font-size: 2.875rem; line-height: 1; font-weight: 300; letter-spacing: -.02em; }
.hours small { font-size: 1.25rem; color: var(--on-navy-2); letter-spacing: 0; }
.pounds { display: block; font-size: 2.875rem; line-height: 1; font-weight: 800; color: var(--yellow); letter-spacing: -.02em; }
.inner { background: var(--p-card); border: 1px solid var(--p-edge); border-radius: 1.5rem; padding: 1.125rem 1.125rem .875rem; box-shadow: 0 24px 48px -20px rgba(3, 9, 18, .7); }
.inner + .inner { margin-top: .75rem; }
.chart { display: block; width: 100%; height: auto; font-family: inherit; font-variant-numeric: tabular-nums; }
/* The one moving thing on the site: the week's bars rise once as the page opens. */
@media (prefers-reduced-motion: no-preference) {
  .chart .rise { transform-box: fill-box; animation: rise .9s cubic-bezier(.16, 1, .3, 1) both; }
  .chart .d1 { animation-delay: .07s; }
  .chart .d2 { animation-delay: .14s; }
  .chart .d3 { animation-delay: .21s; }
  .chart .d4 { animation-delay: .28s; }
}
@keyframes rise { from { transform: translateY(100%); } }
.chart .track { fill: var(--p-track); }
.chart .sold { fill: var(--yellow); }
.chart .risk-bg { fill: var(--p-card); }
.chart .risk-line { fill: var(--p-risk); }
.chart .todo { fill: none; stroke: #33435C; stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart .six { stroke: #FFFFFF; stroke-opacity: .75; stroke-width: 1.5; stroke-dasharray: 7 5; }
.chart .six-tag { fill: #1C2A40; }
.chart .six-text { fill: var(--p-text); font-size: 10px; font-weight: 700; }
.chart .hrs { fill: var(--p-text); font-size: 12.5px; font-weight: 700; }
.chart .hrs.none { fill: var(--p-text-2); }
.chart .day { fill: var(--p-text-2); font-size: 12.5px; font-weight: 500; }
.chart .day.now { fill: var(--p-text); font-weight: 700; }
.key { display: flex; gap: 1.25rem; margin: .75rem 0 0; padding-top: .75rem; border-top: 1px solid rgba(255, 255, 255, .07); color: var(--p-text-2); font-size: .875rem; }
.key span { display: inline-flex; align-items: center; gap: .5rem; }
.key span::before { content: ""; width: .75rem; height: .75rem; border-radius: .25rem; background: var(--yellow); }
.key .k-risk::before { background: repeating-linear-gradient(-45deg, var(--p-risk) 0 2px, transparent 2px 4px); }

.tiers-top { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin: 0 0 1rem; }
.tiers-top strong { font-size: 1.0625rem; }
.next { padding: .25rem .75rem; border-radius: 99rem; background: rgba(92, 196, 138, .14); color: var(--p-good); font-size: .875rem; font-weight: 700; white-space: nowrap; }
.tiers ol { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; text-align: center; }
.tiers li { position: relative; display: flex; flex-direction: column; align-items: center; }
.tiers li + li::before { content: ""; position: absolute; top: .9375rem; right: 50%; width: 100%; height: 2px; background: #26364F; }
.tiers li.next-up::before { background: linear-gradient(90deg, var(--yellow) 55%, #26364F 55%); }
.step { position: relative; z-index: 1; display: grid; place-items: center; width: 2rem; height: 2rem; margin-bottom: .5rem; border-radius: 50%; border: 2px solid #3A4B66; background: var(--p-card); color: var(--p-text-2); font-size: .8125rem; font-weight: 700; }
.done .step { background: var(--yellow); border-color: var(--yellow); }
.done .step svg { stroke: var(--ink); }
.next-up .step { border-color: #DDE5EF; color: var(--p-text); }
.tiers li strong { font-size: 1.0625rem; line-height: 1.2; }
.tiers li > span:last-child { color: var(--p-text-2); font-size: .875rem; }
.tiers li:last-child strong { color: var(--p-text-2); }
.panel figcaption { margin-top: .75rem; color: var(--text-2); font-size: .875rem; text-align: center; }

.w-home main.wrap { margin-top: 0; padding-top: 4.5rem; }
.cols { display: grid; gap: 2.5rem; }
.w-home h2 { margin: 0 0 1rem; padding: 0 .25rem; font-size: clamp(1.75rem, 1.45rem + 1.4vw, 2.25rem); line-height: 1.1; font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }

/* Real screens from the app. On a phone they sit in a row you swipe, like the App Store's own. */
.inside { margin-bottom: 2rem; }
.scroller { margin: 0 calc(-1 * max(1.25rem, env(safe-area-inset-left))); overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 1.25rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; border-radius: .375rem; }
.scroller::-webkit-scrollbar { display: none; }
.screens { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: min(64vw, 15rem); gap: 1rem; width: max-content; margin: 0; padding: .25rem 1.25rem 1.5rem; }
.screens li { scroll-snap-align: start; }
.screens figure { margin: 0; }
.screens img { display: block; width: 100%; height: auto; border: .375rem solid var(--bezel); border-radius: 2rem; background: var(--bezel); box-shadow: 0 1px 2px rgba(14, 30, 50, .08), 0 22px 36px -22px rgba(14, 30, 50, .5); }
.screens figcaption { margin-top: .875rem; padding: 0 .375rem; font-size: 1.0625rem; font-weight: 700; letter-spacing: -.005em; }
.rows { list-style: none; margin: 0; padding: 0 1.25rem; background: var(--card); border: 1px solid var(--card-edge); border-radius: 1.375rem; }
.rows li { padding: 1.0625rem 0; border-bottom: 1px solid var(--rule); }
.rows li:last-child { border-bottom: 0; }
.rows strong { display: block; font-size: 1.125rem; line-height: 1.3; letter-spacing: -.005em; }
.rows span { display: block; margin-top: .1875rem; color: var(--text-2); font-size: 1rem; line-height: 1.45; }

.close { position: relative; margin-top: calc(2rem + var(--fade)); background: linear-gradient(var(--navy), var(--navy-2)); color: var(--on-navy); }
.close::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: var(--fade); pointer-events: none; background: linear-gradient(to top, var(--navy), rgba(23, 54, 95, .9) 14%, rgba(23, 54, 95, .68) 34%, rgba(23, 54, 95, .4) 56%, rgba(23, 54, 95, .16) 78%, rgba(23, 54, 95, 0)); }
.price { padding-top: 3.5rem; }
.price::after { content: ""; display: block; height: 1px; margin-top: 3.5rem; background: rgba(255, 255, 255, .12); }
.w-home .price h2 { padding: 0; font-size: clamp(2.125rem, 1.5rem + 3vw, 3.5rem); line-height: 1.02; letter-spacing: -.035em; }
.price p { max-width: 36rem; color: #D5DEEA; font-size: 1.125rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.75rem; border-radius: 99rem; background: var(--yellow); color: var(--ink); font-size: 1.0625rem; font-weight: 700; text-decoration: none; box-shadow: 0 8px 20px -8px rgba(255, 194, 26, .55); }
.button:hover { background: #FFCE45; }
.button.quiet { background: rgba(255, 255, 255, .1); color: var(--on-navy); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.button.quiet:hover { background: rgba(255, 255, 255, .18); }
.price .button:focus-visible { outline-color: #FFFFFF; }

@media (min-width: 54rem) {
  .hero { grid-template-columns: minmax(0, 1fr) 25rem; gap: 3rem; align-items: start; padding-top: 3.5rem; }
  .pitch { align-self: center; padding-bottom: 2rem; }
  .panel { margin-bottom: -9rem; }
  .w-home main.wrap { padding-top: 6rem; }
  .inside { margin-bottom: 4.5rem; }
  .scroller { margin: 0; overflow: visible; }
  .screens { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); gap: 1.75rem; width: auto; padding: 0; }
  .cols { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
  .price { padding-top: 4.5rem; }
  .price::after { margin-top: 4.5rem; }
}

/* ---------- Footer ---------- */
.foot { padding-top: 2.25rem; padding-bottom: max(2.25rem, env(safe-area-inset-bottom)); color: var(--on-navy-2); font-size: .9375rem; }
.foot p { max-width: 40rem; }
.foot .links { display: flex; flex-wrap: wrap; margin: 0 -.625rem; max-width: none; }
.foot .links a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .625rem; color: var(--on-navy); font-weight: 600; text-decoration-color: rgba(255, 255, 255, .35); }
.foot .links a:hover { text-decoration-color: var(--yellow); }
.foot a:focus-visible { outline-color: #FFFFFF; }

@media print {
  .top, .fade, .close { background: none; color: #000; padding-bottom: 0; }
  .fade, .close::before, .top nav, .foot .links, .skip, .toc, .inside { display: none; }
  .foot { color: #000; }
  .sub { color: #000; }
  main.wrap { margin-top: 1rem; }
  .sheet { border: 0; padding: 0; box-shadow: none; }
}
