/* Progress Diary website. System fonts only (nothing to download), the app's
   blues, mobile first. Colours are chosen for strong contrast (WCAG AA). */

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-darker: #1e3a8a;
  --blue-light: #eff6ff;
  --blue-line: #bfdbfe;
  --ink: #0f172a;
  --text: #334155;
  --muted: #475569;
  --line: #e2e8f0;
  --page: #f8fafc;
  --white: #fff;
  --green: #15803d;
  --green-bg: #dcfce7;
  --amber: #92400e;
  --amber-bg: #fef3c7;
  --red: #b91c1c;
  --red-bg: #fee2e2;
  --teal: #115e59;
  --teal-bg: #ccfbf1;
  --radius: 12px;
}

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

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--page);
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.25;
  margin: 1.6em 0 0.5em;
}

h1 {
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  margin-top: 0.4em;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.4rem, 3.5vw, 1.8rem);
}

h3 {
  font-size: 1.15rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1em;
}

a {
  color: var(--blue-dark);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--blue-darker);
}

:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

/* --- Header --- */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 4rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  white-space: nowrap;
}

.logo-icon {
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
}

.header-buttons {
  display: flex;
  gap: 0.5rem;
  margin: 0;
}

/* On small phones, only "Get started free" fits next to the logo. */
.header-buttons .button-light {
  display: none;
}

.site-nav {
  border-top: 1px solid var(--line);
}

.site-nav ul {
  display: flex;
  gap: 0.25rem;
  margin: 0 auto;
  padding: 0 0.75rem;
  list-style: none;
  flex-wrap: wrap;
}

.site-nav a {
  display: block;
  padding: 0.6rem 0.5rem;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}

.site-nav a:hover {
  color: var(--blue-dark);
}

.site-nav a[aria-current="page"] {
  color: var(--blue-dark);
  border-bottom-color: var(--blue);
}

/* --- Buttons --- */

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.6rem 1.3rem;
  border: 2px solid var(--blue);
  border-radius: 10px;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.button:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: var(--white);
}

.button-light {
  background: var(--white);
  color: var(--blue-dark);
}

.button-light:hover {
  background: var(--blue-light);
  color: var(--blue-darker);
}

.button-small {
  min-height: 2.5rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.95rem;
}

/* --- Page parts --- */

main {
  padding-bottom: 3rem;
}

main > section,
main > article {
  margin-top: 2.5rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--muted);
}

.breadcrumbs li + li::before {
  content: "›";
  margin-right: 0.25rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--text);
}

.small,
.meta {
  font-size: 0.92rem;
  color: var(--muted);
}

.trust {
  font-weight: 700;
  color: var(--green);
}

.hero,
.split {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero {
  margin-top: 1rem;
}

.cards {
  display: grid;
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.card {
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card h2,
.card h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

.card p {
  margin: 0;
}

.columns {
  display: grid;
  gap: 0 2rem;
}

.ticks {
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.5rem;
}

.ticks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--green);
}

.steps li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.stages dt {
  font-weight: 700;
  color: var(--ink);
}

.stages dd {
  margin: 0 0 0.75rem;
}

.cta {
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  background: var(--blue-darker);
  color: var(--white);
  text-align: center;
}

.cta h2 {
  margin-top: 0;
  color: var(--white);
}

.cta .buttons {
  justify-content: center;
  margin-bottom: 0;
}

.cta .button {
  background: var(--white);
  border-color: var(--white);
  color: var(--blue-darker);
}

.cta .button:hover {
  background: var(--blue-light);
}

.cta .button-light {
  background: transparent;
  color: var(--white);
}

.cta .button-light:hover {
  background: rgb(255 255 255 / 0.12);
  color: var(--white);
}

.cta :focus-visible {
  outline-color: #fde68a;
}

.price-line {
  font-size: 1.15rem;
}

.price-card {
  max-width: 34rem;
  padding: 1.5rem;
  background: var(--white);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
}

.price-card h2 {
  margin-top: 0;
}

.price {
  margin-bottom: 0.25rem;
  font-size: 1.2rem;
}

.price-amount {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--ink);
}

.faq h2 {
  font-size: 1.3rem;
}

.prose {
  max-width: 46rem;
}

.legal h2 {
  font-size: 1.3rem;
}

.lettered {
  padding: 0;
  list-style: none;
}

.lettered li {
  margin-bottom: 0.6rem;
}

.letter {
  font-weight: 700;
}

.link-list li {
  margin-bottom: 0.4rem;
}

/* --- Footer --- */

.site-footer {
  padding: 2.5rem 0 1.5rem;
  background: var(--ink);
  color: #cbd5e1;
}

.site-footer h2 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  color: var(--white);
}

.site-footer ul {
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin-bottom: 0.35rem;
}

.site-footer a {
  color: #e2e8f0;
}

.site-footer a:hover {
  color: var(--white);
}

.site-footer :focus-visible {
  outline-color: #fde68a;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1.5rem;
}

.footer-grid a {
  overflow-wrap: anywhere;
}

.footer-small {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #334155;
  font-size: 0.9rem;
}

.footer-small p {
  margin-bottom: 0.4rem;
}

/* --- Phone illustrations (made-up data, drawn with CSS) --- */

.phone {
  justify-self: center;
  width: 100%;
  max-width: 19rem;
  padding: 0.6rem;
  border-radius: 2.2rem;
  background: #1e293b;
  box-shadow: 0 20px 40px -20px rgb(15 23 42 / 0.5);
}

.phone-screen {
  min-height: 24rem;
  padding: 1.4rem 0.8rem 1rem;
  border-radius: 1.7rem;
  background: var(--page);
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text);
}

.phone-screen p {
  margin: 0;
}

.m-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

.m-sub {
  margin-bottom: 0.6rem !important;
  color: var(--muted);
}

.m-card {
  margin-top: 0.5rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.m-lesson {
  border-left-color: var(--blue);
}

.m-test {
  border-left-color: #d97706;
}

.m-off {
  border-left-color: #94a3b8;
  border-style: dashed;
  color: var(--muted);
}

.m-claim {
  border-left-color: #0284c7;
}

.m-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.m-row b {
  color: var(--ink);
}

.m-small {
  font-size: 0.72rem;
  color: var(--muted);
}

.m-pill {
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.m-paid {
  background: var(--green-bg);
  color: var(--green);
}

.m-owed {
  background: var(--red-bg);
  color: var(--red);
}

.m-due {
  background: #e2e8f0;
  color: var(--muted);
}

.m-red {
  color: var(--red);
  font-weight: 600;
}

.m-send {
  margin-top: 0.5rem !important;
  font-size: 0.72rem;
  color: var(--muted);
}

.m-send span {
  font-weight: 700;
  color: var(--green);
}

.m-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.m-box {
  padding: 0.5rem;
  border-radius: 8px;
}

.m-box span {
  display: block;
  font-size: 0.7rem;
}

.m-box b {
  font-size: 1rem;
}

.m-box-owed {
  background: var(--red-bg);
  color: var(--red);
}

.m-box-credit {
  background: var(--green-bg);
  color: var(--green);
}

.m-actions {
  justify-content: flex-start;
  margin-top: 0.4rem !important;
}

.m-btn {
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: var(--blue);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
}

.m-btn-light {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--text);
}

.m-btn-green {
  background: var(--green);
}

.m-credit {
  margin-top: 0.5rem !important;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  background: var(--green-bg);
  color: var(--green);
  font-weight: 700;
}

/* Progress sheet illustration */

.p-bar {
  display: flex;
  height: 0.55rem;
  margin-bottom: 0.5rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.p-ind {
  width: 41%;
  background: #16a34a;
}

.p-mid {
  width: 31%;
  background: #f59e0b;
}

.p-topic {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}

.lvl {
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
}

.lvl-ind {
  background: var(--green-bg);
  color: var(--green);
}

.lvl-sel,
.lvl-pro,
.lvl-gui {
  background: var(--amber-bg);
  color: var(--amber);
}

.lvl-not {
  background: #e2e8f0;
  color: var(--muted);
}

/* Week grid illustration: each unit is half an hour. */

.w-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.w-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.w-day {
  margin-bottom: 0.2rem !important;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  color: var(--ink);
}

.w-block {
  padding: 1px 2px;
  border-left: 2px solid;
  border-radius: 3px;
  font-size: 0.56rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.w-lesson {
  background: #dbeafe;
  border-color: var(--blue);
  color: var(--blue-darker);
}

.w-manual {
  background: var(--teal-bg);
  border-color: #0d9488;
  color: var(--teal);
}

.w-test {
  background: var(--amber-bg);
  border-color: #d97706;
  color: var(--amber);
}

.w-off {
  background: #f1f5f9;
  border: 1px dashed #94a3b8;
  color: var(--muted);
}

.u1 { height: 0.9rem; }
.u2 { height: 1.8rem; }
.u3 { height: 2.7rem; }
.u4 { height: 3.6rem; }
.u5 { height: 4.5rem; }
.u6 { height: 5.4rem; }

/* --- Very small phones --- */

@media (max-width: 23rem) {
  .logo {
    font-size: 1rem;
  }

  .logo-icon {
    width: 2rem;
    height: 2rem;
  }

  .button-small {
    padding: 0.35rem 0.7rem;
  }
}

/* --- Wider screens --- */

@media (min-width: 30rem) {
  .header-buttons .button-light {
    display: inline-flex;
  }
}

@media (min-width: 44rem) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .columns {
    grid-template-columns: 1fr 1fr;
  }

  .cta {
    padding: 2.5rem;
  }
}

@media (min-width: 56rem) {
  .hero {
    grid-template-columns: 1.3fr 1fr;
    margin-top: 2rem;
  }

  .split {
    grid-template-columns: 1fr 1.3fr;
  }

  .site-nav ul {
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
