:root {
  --ink: #202124;
  --paper: #ffffff;
  --accent: #1a73e8;
  --muted: #5f6368;
  --rule: #e0e3e7;
  --field: #80868b;
  --on-accent: #ffffff;
  --danger: #c5221f;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1f1f1f;
    --ink: #e3e3e3;
    --accent: #8ab4f8;
    --muted: #9aa0a6;
    --rule: #3c4043;
    --field: #80868b;
    --on-accent: #1f1f1f;
    --danger: #f28b82;
    --tint: 26%;
  }
}
:root { color-scheme: light dark; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
main { max-width: 40rem; margin: 0 auto; padding: 4rem 1.5rem 5rem; }
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.brand { display: flex; align-items: center; gap: 1rem; text-decoration: none; color: inherit; }
.brand img { width: 56px; height: 56px; border-radius: 13px; }
.brand span { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 6vw, 2.9rem); line-height: 1.1; letter-spacing: -0.035em; margin: 3rem 0 1rem; }
h2 { font-size: 1.15rem; letter-spacing: -0.01em; margin: 2.5rem 0 0.5rem; }
p.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 2.5rem; }
ul { padding-left: 1.2rem; }
li { margin: 0.35rem 0; }

/* Home page: wider than the reading column, for the screenshots. */
main.home { max-width: 72rem; padding-top: 2.5rem; }
.intro, .outro, .text-only { max-width: 42rem; }
.home h1, .home h2, .home .brand span {
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.home h1 {
  font-size: clamp(2.5rem, 7.5vw, 4.4rem); font-weight: 800;
  line-height: 1.02; letter-spacing: -0.04em; margin: 3.5rem 0 1.25rem; text-wrap: balance;
}
.home p.lead { font-size: 1.25rem; max-width: 36rem; margin-bottom: 2rem; }
.home h2 { font-size: 1.75rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.025em; margin: 0 0 0.7rem; text-wrap: balance; }
.outro { margin-top: 6rem; }

/* A stage: a panel in one of the app's list colours, with a screenshot
   zoomed in on the part the text is about and running off its edge. */
.stage {
  position: relative; overflow: hidden; margin: 0;
  aspect-ratio: 4 / 3; border-radius: 28px;
  background: color-mix(in oklab, var(--c, var(--accent)) var(--tint, 16%), var(--paper));
}
.stage img {
  position: absolute; display: block; height: auto; max-width: none;
  top: 9%; left: var(--x, 8%); width: var(--zoom, 135%);
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08), 0 30px 60px -20px rgb(0 0 0 / 0.35);
}
.stage.from-right img { left: auto; right: 8%; }
.stage .phone-frame {
  position: absolute; top: 9%; left: 50%; width: 52%; translate: -50% 0;
}
.phone-frame {
  border: 9px solid #17181b; border-radius: 40px; overflow: hidden; background: #17181b;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.12), 0 30px 60px -20px rgb(0 0 0 / 0.45);
}
.stage .phone-frame img, .phone-frame img {
  position: static; width: 100%; height: auto; border-radius: 30px; box-shadow: none;
}

/* The opening picture: the whole window on the brand colour, a phone in front. */
.hero {
  position: relative; margin: 3.5rem 0 0; border-radius: 32px;
  padding: clamp(1rem, 4vw, 3.5rem) clamp(1rem, 4vw, 3.5rem) 0;
  background: linear-gradient(160deg, #1a73e8, #3b4fd4 60%, #6a5acd);
  overflow: hidden;
}
.hero .window {
  display: block; width: 100%; height: auto;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 30px 80px -10px rgb(0 0 0 / 0.5);
}
.hero .phone-frame { display: none; }
@media (min-width: 46rem) {
  .hero { padding-right: 22%; }
  .hero .phone-frame {
    display: block; position: absolute; right: 4.5%; bottom: -12%; width: 23%;
  }
}

.feature { margin-top: 6rem; }
.feature-text h2 { display: flex; gap: 0.6em; align-items: baseline; }
/* The app's own task circle, in the row's colour. */
.feature-text h2::before {
  content: ""; flex: none; width: 0.72em; height: 0.72em; translate: 0 0.04em;
  border: 0.14em solid var(--c, var(--accent)); border-radius: 50%;
}
.feature-text p { color: var(--muted); margin: 0; max-width: 34rem; font-size: 1.08rem; }
.feature-text p + p { margin-top: 0.8rem; }
.feature .stage, .feature .home-screen { margin-top: 1.75rem; }
.feature.blue { --c: #3b6fd4; }
.feature.green { --c: #2e9c74; }
.feature.plum { --c: #a04bbd; }
.feature.amber { --c: #d08a1e; }
.feature.orange { --c: #e5622b; }
.feature.violet { --c: #6a5acd; }
@media (min-width: 46rem) {
  .feature:not(.text-only) {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 4rem; align-items: center;
  }
  .feature .stage, .feature .home-screen { margin-top: 0; }
  /* Text stays first in the source for reading order. */
  .feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .feature.flip .feature-text { order: 2; }
}
.text-only { border-top: 1px solid var(--rule); padding-top: 3rem; }

/* How Tasklace compares, and what it cannot do. */
.compare, .limits { margin-top: 6rem; border-top: 1px solid var(--rule); padding-top: 3rem; }
.section-lead { color: var(--muted); font-size: 1.08rem; max-width: 38rem; margin: 0; }
.compare-grid {
  display: grid; gap: 0.9rem; margin-top: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
}
.compare-grid article {
  border-radius: 22px; padding: 1.3rem 1.4rem 1.4rem;
  background: color-mix(in oklab, var(--accent) 7%, var(--paper));
}
.compare-grid h3 { font-size: 1.08rem; line-height: 1.25; margin: 0 0 0.5rem; }
.compare-grid p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.compare-grid p.vs { margin-top: 0.7rem; color: var(--ink); }
.limits ul { max-width: 42rem; margin: 1.5rem 0 0; padding-left: 1.2rem; }
.limits li { margin: 0.7rem 0; color: var(--muted); }
.limits li b { color: var(--ink); }
.limits code { font-size: 0.92em; padding: 0.1em 0.35em; border-radius: 6px; background: color-mix(in oklab, var(--accent) 10%, var(--paper)); }

/* The Android widget, drawn in HTML from the widget's own sizes and colours. */
.home-screen {
  --w-bg: #ffffff; --w-text: #1f1f1f; --w-muted: #6b7280; --w-faded: #b4b8bf;
  --w-primary: #1a73e8; --w-divider: rgb(0 0 0 / 0.14); --w-overdue: #d93025;
  border-radius: 28px; padding: 1.75rem clamp(1rem, 4vw, 2.25rem) 2.25rem;
  background: linear-gradient(200deg, #cf7446, #a9559b 45%, #4a52c4);
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  .home-screen {
    --w-bg: #1b1c1f; --w-text: #e6e6e6; --w-muted: #9aa0a6; --w-faded: #5f6368;
    --w-primary: #8ab4f8; --w-divider: rgb(255 255 255 / 0.2); --w-overdue: #f28b82;
    background: linear-gradient(200deg, #6b4a5e, #4a3f7a 45%, #1f2456);
  }
}
.home-clock { color: #fff; margin: 0 0 1.25rem 0.4rem; line-height: 1.1; text-shadow: 0 1px 12px rgb(0 0 0 / 0.25); }
.home-clock b { display: block; font-size: 3rem; font-weight: 400; letter-spacing: -0.02em; }
.home-clock span { font-size: 0.95rem; }
.widgets { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.widget {
  flex: 1 1 15rem; min-width: 0; background: var(--w-bg); color: var(--w-text);
  border-radius: 20px; padding: 6px 8px 8px 14px; line-height: 1.3;
  box-shadow: 0 12px 30px -12px rgb(0 0 0 / 0.4);
}
.widget.small { flex: 0 1 13rem; }
.widget-head { display: flex; align-items: center; }
.widget-head b { flex: 1; font-size: 17px; }
.widget-head svg { width: 36px; height: 36px; padding: 9px; fill: var(--w-muted); }
.widget-head svg.add { width: 40px; height: 40px; padding: 8px; fill: var(--w-primary); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { margin: 0; }
.w-event { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; white-space: nowrap; }
.w-event::before { content: ""; flex: none; width: 3px; height: 16px; border-radius: 2px; background: var(--c); }
.w-event time { font-size: 12px; color: var(--w-muted); }
.w-event span { overflow: hidden; text-overflow: ellipsis; }
.w-event.quiet::before { opacity: 0.5; }
.w-event.quiet span { color: var(--w-muted); }
.w-more { font-size: 12px; color: var(--w-muted); padding: 3px 0 3px 11px; }
.w-divider { height: 1px; background: var(--w-divider); margin: 6px 6px 4px 0; }
.w-task { display: flex; align-items: center; }
.w-task button {
  flex: none; width: 30px; height: 34px; padding: 8px 12px 8px 0; margin: 0;
  border: 0; background: none; cursor: pointer; color: var(--c); border-radius: 6px;
}
.w-task button:focus-visible { outline: 2px solid var(--w-primary); outline-offset: -2px; }
.w-task svg { display: block; width: 18px; height: 18px; }
.w-task .ring { fill: none; stroke: currentColor; stroke-width: 2; }
.w-task .tick { fill: currentColor; display: none; }
.w-task div { min-width: 0; padding: 5px 0; font-size: 14px; }
.w-task div > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-task small { font-size: 12px; color: var(--w-muted); }
.w-task small.overdue { color: var(--w-overdue); }
.w-task.crossed .ring { display: none; }
.w-task.crossed .tick { display: block; }
.w-task.crossed div > span { text-decoration: line-through; }
.w-task.dimmed button { opacity: 0.35; }
.w-task.dimmed div > span, .w-task.dimmed small { color: var(--w-faded); }
.w-empty { font-size: 14px; color: var(--w-muted); text-align: center; padding: 1.5rem 0; }
.widget-hint { color: #fff; font-size: 0.85rem; margin: 1rem 0 0 0.4rem; text-shadow: 0 1px 8px rgb(0 0 0 / 0.3); }

.signup { margin: 0; }
.outro .signup { margin-top: 2rem; }
.signup > label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.signup-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.signup input[type=email], .signup button {
  font: inherit; font-size: max(1rem, 1em);
  min-height: 48px; border-radius: 10px; padding: 0.6rem 0.95rem;
}
.signup input[type=email] {
  flex: 1 1 14rem; min-width: 0;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--field);
}
.signup input[type=email]::placeholder { color: var(--muted); opacity: 0.8; }
.signup input[aria-invalid=true] { border-color: var(--danger); }
.signup button {
  flex: 0 0 auto; cursor: pointer; font-weight: 600;
  background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent);
}
.signup button:disabled { opacity: 0.6; cursor: progress; }
.signup input:focus-visible, .signup button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.signup-note { color: var(--muted); font-size: 0.9rem; margin: 0.6rem 0 0; }
.signup-status { margin: 0.6rem 0 0; font-weight: 600; }
/* Stays rendered while empty, so screen readers announce what appears in it. */
.signup-status:empty { margin: 0; }
.signup-status:focus { outline: none; }
.signup.done .signup-row, .signup.done .signup-note, .signup.done > label { display: none; }
.signup.done .signup-status { margin: 0; }
/* Honeypot: off-screen rather than display:none, which some bots skip. */
.hp { position: absolute; clip-path: inset(50%); overflow: hidden; width: 1px; height: 1px; margin: -1px; white-space: nowrap; }
footer { margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.9rem; }
.widget-reset {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; margin-left: 0.3rem;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.widget-reset:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 2px; }
