/* Ready Reckoner site styles.
   Layout: one left-aligned column (max 72rem) with a 38rem reading measure.
   The ledger table is the one bold device: blue row rules, ink top and bottom
   rules, and a red double "margin" rule after the first column, as in the
   printed ready reckoners and account books the company is named after.
   Everything else stays quiet. Type: Atkinson Hyperlegible Next for reading
   (made for low-vision readers, and used in the app), Libre Caslon Display for
   the wordmark and big headings. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2-variations"),
       url("fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-latin-wght-italic.woff2") format("woff2-variations"),
       url("fonts/atkinson-hyperlegible-next-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Libre Caslon Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/libre-caslon-display-latin-400-normal.woff2") format("woff2");
}

:root {
  --paper: #F6F8F5;
  --sheet: #FFFFFF;
  --ink: #1B2621;
  --ink-soft: #4A5751;
  --pine: #1E5A47;
  --pine-soft: #E2EDE7;
  --on-pine: #FFFFFF;
  --rule: #C4D3DD;
  --rule-strong: #1B2621;
  --margin: #B3443A;
  --marigold: #F1BC42;
  --marigold-soft: #FBF0CF;
  --font-body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Libre Caslon Display", Georgia, "Times New Roman", serif;
  --measure: 38rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F1512;
    --sheet: #16201B;
    --ink: #E8EEEA;
    --ink-soft: #A9B6AF;
    --pine: #86CFB1;
    --pine-soft: #1B2E26;
    --on-pine: #0F1512;
    --rule: #2D3D47;
    --rule-strong: #C9D3CE;
    --margin: #E58374;
    --marigold: #E4B13B;
    --marigold-soft: #3A3117;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 60rem) {
  body { font-size: 1.1875rem; }
}

img { display: block; max-width: 100%; height: auto; }

a {
  color: var(--pine);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 0.14em; }

:focus-visible {
  outline: 3px solid var(--pine);
  outline-offset: 3px;
  border-radius: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -5rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  background: var(--pine);
  color: var(--on-pine);
  font-weight: 700;
}
.skip:focus { top: 0.75rem; }

.wrap {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Type */

h1, h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 7vw, 4rem); }
h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.875rem, 4.2vw, 2.5rem);
}
h3 {
  margin: 0 0 0.35rem;
  font-size: 1.3125rem;
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
}
p {
  max-width: var(--measure);
  margin: 0 0 1em;
}
p:last-child { margin-bottom: 0; }

.intro {
  max-width: var(--measure);
  color: var(--ink-soft);
}

/* Masthead */

.masthead { border-bottom: 1px solid var(--rule); }
.masthead .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.625rem;
  line-height: 1;
  text-decoration: none;
}
.wordmark svg {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}
.site-nav a {
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover { border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--pine); }

/* Page sections */

.band { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.band + .band { border-top: 1px solid var(--rule); }

/* Home */

.hero { padding-block: clamp(3rem, 9vw, 6.5rem) clamp(2.5rem, 6vw, 4rem); }
.hero h1 { max-width: 13em; }

.definition {
  max-width: 34rem;
  margin: 2.25rem 0 1.5rem;
  padding-left: 1.1rem;
  border-left: 5px double var(--margin);
}
.definition dfn {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: normal;
}
.definition .pos {
  margin-left: 0.4rem;
  color: var(--ink-soft);
  font-style: italic;
}
.lede {
  font-size: clamp(1.1875rem, 2.2vw, 1.3125rem);
  max-width: 34rem;
}

.app-entry {
  display: grid;
  gap: 2rem 3rem;
  align-items: center;
  max-width: 58rem;
  margin-top: 1.5rem;
}
.app-entry-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem 1.25rem;
  align-items: start;
  max-width: 38rem;
}
.app-entry h3 a { color: var(--ink); }
.app-entry .more { font-weight: 700; }
.app-entry-shot { display: none; }
@media (min-width: 48rem) {
  .app-entry { grid-template-columns: minmax(0, 1fr) 14rem; }
  .app-entry-shot { display: block; }
}

.nowrap { white-space: nowrap; }

.status {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.1rem 0.6rem;
  border-radius: 6px;
  background: var(--marigold-soft);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 700;
}

.app-icon {
  display: grid;
  grid-template-rows: 24% 1fr;
  flex: none;
  width: 4.5rem;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #C4D3DD;
  border-radius: 22%;
  background: #FFFFFF;
}
.app-icon::before {
  content: "";
  background: #F1BC42;
}
.app-icon span {
  display: grid;
  place-items: center;
  color: #1E5A47;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}
.app-icon.large { width: 5.25rem; }
.app-icon.large span { font-size: 1.95rem; }

/* Ledger list: two columns split by the red margin rule */

.ledger-list {
  max-width: 52rem;
  margin: 1.5rem 0 0;
  border-block: 2px solid var(--rule-strong);
}
.ledger-list > div {
  display: grid;
  grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr);
  border-top: 1px solid var(--rule);
}
.ledger-list > div:first-child { border-top: 0; }
.ledger-list dt {
  padding: 0.9rem 1rem 0.9rem 0;
  border-right: 5px double var(--margin);
  font-weight: 700;
}
.ledger-list dd {
  margin: 0;
  padding: 0.9rem 0 0.9rem 1.1rem;
}

@media (max-width: 40rem) {
  .ledger-list > div {
    grid-template-columns: minmax(0, 1fr);
    padding: 0.85rem 0 0.85rem 0.9rem;
    border-left: 5px double var(--margin);
  }
  .ledger-list dt {
    padding: 0 0 0.15rem;
    border-right: 0;
  }
  .ledger-list dd { padding: 0; }
}

/* App page */

.app-hero .wrap {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 56rem) {
  .app-hero .wrap { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
}
.app-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.app-title .name {
  margin: 0;
  font-size: 1.3125rem;
  font-weight: 700;
}
.app-hero h1 { max-width: 12em; margin-bottom: 1.25rem; }
.app-hero .lede { margin-bottom: 1.25rem; }
.store-line {
  color: var(--ink-soft);
  font-weight: 600;
}

.phone {
  overflow: hidden;
  max-width: 19rem;
  border: 1px solid var(--rule);
  border-radius: 2rem;
  background: var(--sheet);
  box-shadow: 0 1.5rem 3rem -1.75rem rgb(27 38 33 / 0.45);
}
.app-hero .phone { justify-self: center; }

.reckoner-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  margin-top: 1.5rem;
}
.reckoner-head label { font-weight: 700; }
.reckoner-head select {
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--sheet);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}
.reckoner-head .born {
  margin: 0;
  color: var(--ink-soft);
}

.table-scroll {
  max-width: 52rem;
  margin-top: 1rem;
  overflow-x: auto;
}

.ledger {
  width: 100%;
  border-collapse: collapse;
  border-block: 2px solid var(--rule-strong);
  background: var(--sheet);
  font-variant-numeric: lining-nums tabular-nums;
}
.ledger th,
.ledger td {
  padding: 0.65rem 0.9rem;
  border-top: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
.ledger thead th {
  border-top: 0;
  border-bottom: 1px solid var(--rule-strong);
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  vertical-align: bottom;
}
.ledger th:first-child,
.ledger td:first-child { border-right: 5px double var(--margin); }
.ledger tbody th { font-weight: 700; }
.ledger tr.is-open > * { background: var(--pine-soft); }

.tag {
  display: block;
  width: fit-content;
  margin-top: 0.3rem;
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}
.tag.open {
  border-color: var(--pine);
  background: var(--pine);
  color: var(--on-pine);
}

.fine {
  max-width: 44rem;
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 1rem;
}

.features {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
  margin-top: 2rem;
}
.feature {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
  margin: 0;
}
.feature .phone {
  max-width: 100%;
  border-radius: 1rem;
}
.feature h3 { font-size: 1.125rem; }
.feature p {
  color: var(--ink-soft);
  font-size: 1rem;
}
@media (min-width: 48rem) {
  .features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem 1.75rem;
  }
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature .phone {
    max-width: 13rem;
    border-radius: 1.4rem;
  }
}

.compare-wrap {
  max-width: 46rem;
  margin-top: 1.5rem;
  overflow-x: auto;
}
.ledger .mark {
  width: 6.5rem;
  text-align: center;
}
.ledger td.mark svg {
  width: 1.1rem;
  height: 1.1rem;
  vertical-align: -0.15em;
  color: var(--pine);
}
.ledger tbody .feature-name { font-weight: 400; }
.ledger tfoot th,
.ledger tfoot td {
  border-top: 1px solid var(--rule-strong);
  font-weight: 700;
}
.ledger tfoot .mark { white-space: nowrap; }

.apply-inline { display: none; }

@media (max-width: 40rem) {
  .ledger { font-size: 1rem; }
  .ledger th,
  .ledger td { padding: 0.55rem 0.6rem; }
  .ledger .mark { width: 4.25rem; }
  #reckoner th:nth-child(3),
  #reckoner td:nth-child(3) { display: none; }
  .apply-inline {
    display: block;
    margin-top: 0.2rem;
    color: var(--ink-soft);
    font-size: 0.9375rem;
  }
}

.independent {
  max-width: 46rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--sheet);
}
.independent h2 { font-size: clamp(1.5rem, 3vw, 1.875rem); }

/* Long-form pages: privacy, terms, support */

.doc { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.doc h1 {
  margin-bottom: 0.6rem;
  font-size: clamp(2.25rem, 6vw, 3.25rem);
}
.doc .updated {
  margin-bottom: 2rem;
  color: var(--ink-soft);
}
.doc .lead {
  max-width: 36rem;
  font-size: 1.25rem;
}
.doc h2 {
  margin-top: 2.75rem;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
}
.doc h3 { margin-top: 1.75rem; }
.doc ul,
.doc ol {
  max-width: var(--measure);
  margin: 0 0 1em;
  padding-left: 1.3rem;
}
.doc li { margin-bottom: 0.45rem; }
.doc li::marker { color: var(--ink-soft); }

.contact-card {
  max-width: 34rem;
  margin: 1.75rem 0 0.5rem;
  padding: 1.1rem 1.25rem;
  border-block: 2px solid var(--rule-strong);
  background: var(--sheet);
}
.contact-card p { margin-bottom: 0.25rem; }
.contact-card .email {
  font-size: 1.3125rem;
  font-weight: 700;
}

/* Footer */

.colophon { border-top: 2px solid var(--rule-strong); }
.colophon .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  padding-block: 2rem 2.5rem;
  font-size: 1rem;
}
@media (min-width: 48rem) {
  .colophon .wrap {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
}
.colophon p { margin: 0 0 0.25rem; }
.colophon .company {
  font-family: var(--font-display);
  font-size: 1.375rem;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}
.footer-nav a { color: var(--ink); }
.colophon .copyright {
  grid-column: 1 / -1;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
