/* TotalFolio's website. Phone first; system fonts only; nothing loaded
   from anywhere else. Colours chosen for at least 4.5:1 contrast in both
   light and dark mode. */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #17211f;
  --muted: #56615e;
  --soft: #f6f7f5;
  --line: #dfe4e0;
  --green: #184d42;
  --on-green: #ffffff;
  --green-light: #e8f0ed;
  --amber: #8a5a1c;
  --amber-soft: #f8f1e7;
  --band: #133b34;
  --band-ink: #e9f1ef;
  --band-muted: #b8cbc6;
  --band-line: rgba(255, 255, 255, 0.14);
  --card: #ffffff;
  --shadow: 0 2px 5px rgba(20, 40, 34, 0.04), 0 18px 44px rgba(20, 40, 34, 0.08);
  --serif: Georgia, "Noto Serif", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}

/* The dark look, when the visitor picks it (theme.js). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1614;
  --ink: #e7eeec;
  --muted: #a9b8b4;
  --soft: #151f1c;
  --line: #26332f;
  --green: #8fcbbd;
  --on-green: #0f1614;
  --green-light: #1b2c28;
  --amber: #e0b071;
  --amber-soft: #2a2218;
  --band: #17302a;
  --band-ink: #e7eeec;
  --band-muted: #b6c7c2;
  --band-line: rgba(255, 255, 255, 0.12);
  --card: #121b19;
  --shadow: none;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.125rem/1.6 var(--sans);
  overflow-wrap: break-word;
}

[id] {
  scroll-margin-top: 5rem;
}

a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2.25rem;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.75rem;
  margin: 0 0 0.75rem;
}

h3 {
  font-size: 1.125rem;
  margin: 0 0 0.35rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li {
  margin: 0.35rem 0;
}

code {
  font-family: ui-monospace, Consolas, "Roboto Mono", monospace;
  font-size: 0.95em;
}

.wrap {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  min-height: 4rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.brand {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  font-size: 1rem;
}

.site-header nav a:not(.button) {
  display: none;
  color: var(--muted);
  text-decoration: none;
}

.site-header nav a:not(.button):hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Buttons: large, plain tap targets */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--green);
  border-radius: 0.5rem;
  background: var(--green);
  color: var(--on-green);
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  text-decoration: underline;
}

.button.quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

/* Light or dark: shown only when theme.js runs. */
.theme-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

[data-js] .theme-toggle {
  display: inline-flex;
}

.theme-toggle:hover {
  text-decoration: underline;
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.site-header .button {
  min-height: 2.75rem;
  padding: 0.4rem 1rem;
  font-size: 1rem;
}

/* Sections */

.section {
  padding: 3.5rem 0;
}

.section.soft {
  background: var(--soft);
}

.section-intro {
  max-width: 42rem;
  color: var(--muted);
}

/* Hero */

.hero {
  padding: 3rem 0 3.5rem;
}

.label {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--green);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lead {
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.2rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 1rem;
}

.note {
  color: var(--muted);
  font-size: 1rem;
}

/* The drawn copy of the app's Home list */

.preview {
  margin-top: 2.5rem;
  max-width: 24rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.example {
  padding: 0.15rem 0.5rem;
  border-radius: 0.35rem;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 0.8rem;
  font-weight: 700;
}

.preview-body {
  padding: 1rem 1.25rem 1.25rem;
}

.preview-title {
  margin: 0 0 0.25rem;
  font-weight: 700;
}

.preview ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.preview li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.preview li:first-child {
  border-top: 0;
}

.preview .what {
  display: block;
  font-weight: 600;
}

.preview .when {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
}

.preview .days {
  color: var(--amber);
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

.preview-foot {
  margin: 0.75rem 0 0;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: var(--green-light);
  color: var(--ink);
  font-size: 0.95rem;
}

/* Four short points */

.points {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.points ul {
  list-style: none;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
}

.points li {
  margin: 0;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.points li:last-child {
  border-bottom: 0;
}

.points strong {
  display: block;
}

.points span {
  color: var(--muted);
  font-size: 1rem;
}

/* Record types as labels */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.tags li {
  margin: 0;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 1rem;
}

/* Reminders */

.two {
  display: grid;
  gap: 2rem;
}

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  margin: 0 0 1.25rem;
  padding-left: 3rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  font-size: 0.95rem;
  font-weight: 700;
}

.steps strong {
  display: block;
}

.steps span {
  color: var(--muted);
}

/* Privacy band */

.band {
  background: var(--band);
  color: var(--band-ink);
}

.band .section-intro,
.band .panel p {
  color: var(--band-muted);
}

.band a {
  color: var(--band-ink);
}

.panels {
  display: grid;
  /* As many columns as fit; each at least 16 rem, so large text drops a
     column instead of running off the screen. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.panel {
  padding: 1.5rem;
  border: 1px solid var(--band-line);
  border-radius: 1rem;
}

.panel p {
  margin: 0;
  font-size: 1rem;
}

/* Help test */

.test-box {
  padding: 2rem 1.5rem;
  border-radius: 1.25rem;
  background: var(--green);
  color: var(--on-green);
}

.test-box h2 {
  color: var(--on-green);
}

.test-box ol {
  margin: 1rem 0 1.5rem;
}

.test-box .button {
  background: var(--on-green);
  border-color: var(--on-green);
  color: var(--green);
}

.test-box .small {
  margin-bottom: 0;
  font-size: 1rem;
}

.test-box a:not(.button) {
  color: var(--on-green);
}

/* Questions that open with a tap */

.faq {
  max-width: 46rem;
  margin-top: 1.5rem;
}

details {
  border-top: 1px solid var(--line);
}

details:last-of-type {
  border-bottom: 1px solid var(--line);
}

summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
  padding: 0.9rem 0;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
}

details[open] summary::after {
  content: "−";
}

details p {
  margin: 0 0 1rem;
  color: var(--muted);
}

/* Privacy policy, terms, not found */

.doc {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 1rem;
}

.doc h1 {
  font-size: 2.25rem;
}

.doc h2 {
  margin-top: 2.25rem;
  font-size: 1.5rem;
}

.doc h3 {
  margin-top: 1.5rem;
}

.meta {
  color: var(--muted);
}

/* Footer */

.site-footer {
  margin-top: 0;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 1rem;
}

.site-footer nav a {
  display: inline-block;
  max-width: 100%;
  padding: 0.35rem 0;
  /* The email address can wrap on a narrow phone with large text. */
  overflow-wrap: anywhere;
}

.site-footer p {
  margin: 0.5rem 0 0;
}

/* Wider screens */

@media (min-width: 40rem) {
  .points ul {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2rem;
  }

  .test-box {
    padding: 2.5rem;
  }
}

@media (min-width: 56rem) {
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.1rem;
  }

  .site-header nav a:not(.button) {
    display: inline;
  }

  .hero {
    padding: 5rem 0;
  }

  .hero .wrap {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
  }

  .preview {
    margin-top: 0;
    justify-self: end;
    width: 100%;
  }

  .section {
    padding: 5rem 0;
  }

  .points ul {
    grid-template-columns: repeat(4, 1fr);
  }

  .points li {
    border-bottom: 0;
  }

  .two {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
  }
}
