/* SolatCal
 *
 * Design read: a utility landing page for Malaysian professionals who run
 * their day from a calendar. Calm, precise, devotional. The language is an
 * editorial timetable: prose in the system humanist sans, every time and zone
 * code in monospace, and the eight point star used as structure rather than
 * wallpaper.
 *
 * Locked decisions, applied everywhere:
 *   - ONE accent (verdigris), inherited from the original brand.
 *   - ONE radius: 4px. Sharp enough to read as an instrument.
 *   - ONE theme per visit, following the system; no section inverts.
 *   - No web fonts, no CDNs, no external requests of any kind.
 */

:root {
  color-scheme: light dark;

  /* Brand verdigris, deepened from the original so it survives on paper. */
  --accent: #0a5d52;
  --accent-strong: #084a41;
  --accent-ink: #ffffff;
  --accent-wash: rgba(10, 93, 82, 0.07);
  --accent-line: rgba(10, 93, 82, 0.22);

  --paper: #f2f2ef;
  --surface: #fbfbfa;
  --surface-sunk: #e9e9e5;
  --ink: #101315;
  --ink-soft: #454d50;
  /* Darkened until it clears WCAG AA (4.5:1) against the sunk surface, which
     is the weakest background it ever sits on. */
  --ink-faint: #5f686b;
  --line: #d9d9d3;
  --line-strong: #bcbcb4;
  --danger: #a3271d;

  --shadow: 0 1px 1px rgba(16, 19, 21, 0.04), 0 10px 30px rgba(16, 19, 21, 0.06);

  --radius: 4px;
  --shell: 1240px;
  --rule: 1px solid var(--line);

  --sans:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  /* Second voice. Every time, zone code and URL on the page uses this. */
  --mono:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono",
    monospace;

  /* Two overlapping squares inside a circle: the eight point star that
     underpins most Islamic geometric tiling. The page's only ornament. */
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%230a5d52' stroke-width='0.7'%3E%3Crect x='22' y='22' width='56' height='56'/%3E%3Crect x='22' y='22' width='56' height='56' transform='rotate(45 50 50)'/%3E%3Ccircle cx='50' cy='50' r='39.6'/%3E%3C/g%3E%3C/svg%3E");
  --star-opacity: 0.16;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #4ec3b1;
    --accent-strong: #74d6c6;
    --accent-ink: #04211d;
    --accent-wash: rgba(78, 195, 177, 0.1);
    --accent-line: rgba(78, 195, 177, 0.26);

    --paper: #0d1011;
    --surface: #14181a;
    --surface-sunk: #191e20;
    --ink: #eceeed;
    --ink-soft: #a6afb0;
    --ink-faint: #7d8688;
    --line: #262c2e;
    --line-strong: #38403f;
    --danger: #f0aca6;

    --shadow: 0 1px 1px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);

    --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%234ec3b1' stroke-width='0.7'%3E%3Crect x='22' y='22' width='56' height='56'/%3E%3Crect x='22' y='22' width='56' height='56' transform='rotate(45 50 50)'/%3E%3Ccircle cx='50' cy='50' r='39.6'/%3E%3C/g%3E%3C/svg%3E");
    --star-opacity: 0.2;
  }
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 660;
  line-height: 1.05;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.7rem, 7.2vw, 4.6rem);
  letter-spacing: -0.042em;
}

h2 {
  font-size: clamp(1.65rem, 3.6vw, 2.35rem);
}

h3 {
  font-size: 1rem;
  letter-spacing: -0.012em;
}

p {
  margin: 0;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 14px;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: var(--rule);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
}

@supports not (backdrop-filter: blur(4px)) {
  .site-header {
    background: var(--paper);
  }
}

.header-row {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 640;
  font-size: 1.02rem;
  letter-spacing: -0.024em;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark-mark {
  width: 21px;
  height: 21px;
  flex: none;
  color: var(--accent);
  overflow: visible;
}

.header-end {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.header-link {
  font-size: 0.82rem;
  color: var(--ink-faint);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid transparent;
}

.header-link:hover {
  color: var(--ink);
  border-bottom-color: var(--line-strong);
}

.lang-switch {
  display: flex;
  align-items: center;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.lang-switch > * {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  text-decoration: none;
  color: var(--ink-faint);
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.lang-switch > a:hover {
  background: var(--surface-sunk);
  color: var(--ink);
}

.lang-switch > [aria-current] {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 72px 0 80px;
}

/* One large cropped star, anchored to the composition rather than tiled as
   texture. It is the only ornament on the page. */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -46%;
  right: -20%;
  width: min(660px, 74vw);
  aspect-ratio: 1;
  background: var(--star) center / contain no-repeat;
  opacity: var(--star-opacity);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  gap: 44px;
  align-items: start;
}

.hero-pitch .lede {
  margin-top: 20px;
  max-width: 33ch;
  font-size: 1.12rem;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Scripture: a ruled typographic column, not a boxed card. */
.scripture {
  display: grid;
  gap: 26px;
  padding-top: 6px;
}

.scripture blockquote {
  margin: 0;
  padding-top: 18px;
  border-top: 2px solid var(--accent);
}

.scripture blockquote + blockquote {
  border-top-color: var(--line-strong);
  border-top-width: 1px;
}

.scripture blockquote p {
  font-size: 1.02rem;
  line-height: 1.45;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

.scripture-lead p {
  font-size: 1.24rem;
  font-weight: 480;
  letter-spacing: -0.02em;
}

.scripture .quote-lead {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--ink-faint);
  margin-bottom: 10px;
  letter-spacing: 0;
}

.scripture cite,
.closing cite {
  display: block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-style: normal;
  letter-spacing: 0.01em;
  color: var(--ink-faint);
}

.scripture cite a,
.closing cite a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.scripture cite a:hover,
.closing cite a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.93rem;
  font-weight: 540;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.08s ease;
}

.btn:hover {
  border-color: var(--ink-faint);
  background: var(--surface-sunk);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.btn-quiet {
  background: transparent;
  color: var(--ink-soft);
}

.btn-quiet:hover {
  color: var(--ink);
  background: var(--surface-sunk);
}

/* Kept legible rather than faded out: the notice below explains why these
   are inert, so the label still has to be readable. */
.btn[aria-disabled="true"] {
  background: var(--surface-sunk);
  border-color: var(--line);
  border-style: dashed;
  color: var(--ink-soft);
  cursor: default;
  pointer-events: none;
}

/* --------------------------------------------------------------- builder */

.builder {
  padding: 8px 0 72px;
}

.section-lede {
  margin-top: 14px;
  max-width: 54ch;
  color: var(--ink-soft);
}

/* ------------------------------------------------- the day line (preview) */

.preview {
  margin-top: 36px;
  padding: 26px 26px 20px;
  border: var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.preview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 20px;
}

.preview-meta {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: -0.01em;
  color: var(--ink-faint);
}

.dayline {
  position: relative;
  margin: 26px 0 4px;
}

.dayline:empty {
  display: none;
}

.dayline.is-loading {
  display: block;
  height: 96px;
  border-radius: var(--radius);
  background: var(--surface-sunk);
}

.dayline-labels {
  position: relative;
  height: 56px;
}

.dayline-label {
  position: absolute;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  transform: translateX(-50%);
  white-space: nowrap;
  line-height: 1.25;
  text-align: center;
}

/* Alternating rows: Maghrib and Isyak sit barely an hour apart and would
   otherwise print on top of each other. */
.dayline-label[data-row="1"] {
  bottom: 28px;
}

.dayline-name {
  font-size: 0.78rem;
  font-weight: 580;
  letter-spacing: -0.012em;
}

.dayline-time {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
}

.dayline-track {
  position: relative;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--surface-sunk);
}

.dayline-band {
  position: absolute;
  top: -1px;
  bottom: -1px;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: left center;
}

/* The true solat moment inside the block. When align moves the start, this
   mark is what shows how far it moved. */
.dayline-solat {
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: 1px;
  background: var(--accent-ink);
  opacity: 0.75;
}

.dayline-axis {
  position: relative;
  height: 18px;
  margin-top: 7px;
}

.dayline-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* Feedback: the day redraws whenever an option changes, so the blocks sweep
   out from their start edge instead of snapping into place. */
@media (prefers-reduced-motion: no-preference) {
  .dayline-band {
    animation: band-in 0.42s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: calc(var(--i, 0) * 45ms);
  }

  .dayline-label {
    animation: label-in 0.42s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: calc(var(--i, 0) * 45ms + 60ms);
  }
}

@keyframes band-in {
  from {
    transform: scaleX(0);
  }
}

@keyframes label-in {
  from {
    opacity: 0;
  }
}

.preview-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: var(--rule);
}

.preview-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 4px 16px;
  padding: 11px 2px;
  border-bottom: var(--rule);
}

.preview-row .name {
  font-size: 0.95rem;
  font-weight: 560;
  letter-spacing: -0.012em;
}

.preview-row .window {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.preview-row .truth {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
}

.preview-empty,
.preview-error {
  padding: 14px 2px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-bottom: var(--rule);
}

.preview-error {
  color: var(--danger);
}

.preview-skeleton {
  height: 44px;
  border-bottom: var(--rule);
  background: var(--surface-sunk);
}

@media (prefers-reduced-motion: no-preference) {
  .preview-skeleton,
  .dayline.is-loading {
    animation: pulse 1.5s ease-in-out infinite;
  }
  .preview-skeleton:nth-child(2) {
    animation-delay: 0.16s;
  }
  .preview-skeleton:nth-child(3) {
    animation-delay: 0.32s;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

/* -------------------------------------------------------------- controls */

.builder-grid {
  margin-top: 28px;
  display: grid;
  gap: 28px;
  align-items: start;
}

/* No card here: the controls are grouped by rule and space, which leaves the
   one card in this column pair (Subscribe) reading as the thing to act on. */
.controls {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: var(--rule);
}

.field {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 20px 0;
  border: 0;
  border-bottom: var(--rule);
  min-width: 0;
}

.field > label,
.field > legend {
  padding: 0;
  font-size: 0.72rem;
  font-weight: 640;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.field > legend {
  margin-bottom: 9px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  border: 0;
}

.field-row .field:last-child {
  border-bottom: 0;
}

.hint {
  font-size: 0.81rem;
  line-height: 1.5;
  color: var(--ink-faint);
  max-width: 60ch;
  text-wrap: pretty;
}

.hint:empty {
  display: none;
}

.hint.error {
  color: var(--danger);
}

select,
input[type="text"] {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.93rem;
}

select {
  font-variant-numeric: tabular-nums;
}

select:disabled {
  color: var(--ink-faint);
  background: var(--surface-sunk);
}

.segmented,
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.segmented label,
.checks label {
  position: relative;
  display: inline-flex;
}

.segmented input,
.checks input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segmented span,
.checks span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.89rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.segmented span:hover,
.checks span:hover {
  border-color: var(--ink-faint);
  color: var(--ink);
}

.segmented input:checked + span,
.checks input:checked + span {
  border-color: var(--accent);
  background: var(--accent-wash);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  color: var(--ink);
  font-weight: 560;
}

.segmented input:focus-visible + span,
.checks input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.segmented input:active + span,
.checks input:active + span {
  transform: translateY(1px);
}

/* ------------------------------------------------------------- subscribe */

.subscribe {
  padding: 24px;
  border: var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.subscribe .hint {
  margin-top: 8px;
}

.subscribe h3.stacked {
  margin-top: 26px;
  padding-top: 22px;
  border-top: var(--rule);
}

.actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.url-row {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.url-row input {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.notice {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 2px solid var(--accent);
  background: var(--accent-wash);
  font-size: 0.83rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------- behaviour */

.behaviour {
  padding: 64px 0;
  border-top: var(--rule);
  background: var(--surface-sunk);
}

.notes {
  margin: 30px 0 0;
  display: grid;
  gap: 0;
}

/* Term left, detail right: a ruled index rather than three equal cards. */
.notes > div {
  display: grid;
  gap: 6px;
  padding: 22px 0;
  border-bottom: var(--rule);
}

.notes > div:last-child {
  border-bottom: 0;
}

.notes dt {
  font-size: 1.02rem;
  font-weight: 640;
  letter-spacing: -0.018em;
}

.notes dd {
  margin: 0;
  color: var(--ink-soft);
  max-width: 66ch;
  text-wrap: pretty;
}

/* ----------------------------------------------------------------- agent */

.agent {
  padding: 64px 0;
  border-top: var(--rule);
}

.agent-grid {
  margin-top: 32px;
  display: grid;
  gap: 34px;
  align-items: start;
}

.agent-console {
  display: grid;
  gap: 24px;
}

/* Same row as the raw feed URL, with a visible label above it. */
.copy-field {
  display: grid;
  gap: 9px;
}

.copy-field > label {
  font-size: 0.72rem;
  font-weight: 640;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.copy-field .url-row {
  margin-top: 0;
}

.copy-field .hint {
  margin-top: 2px;
}

.agent-llms {
  padding-top: 18px;
  border-top: var(--rule);
}

.agent-llms a {
  color: var(--ink-soft);
  text-underline-offset: 3px;
}

.agent-llms a:hover {
  color: var(--accent);
}

/* A manifest, not cards: the tool name leads in mono, the sentence follows. */
.tool-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0 0 0 18px;
  border-left: 2px solid var(--accent);
  display: grid;
  gap: 18px;
}

.tool-list li {
  display: grid;
  gap: 3px;
}

.tool-list code {
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.tool-list span {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink-faint);
  max-width: 46ch;
  text-wrap: pretty;
}

/* ------------------------------------------------------------------- faq */

.faq {
  padding: 64px 0;
  border-top: var(--rule);
}

.faq-list {
  margin-top: 30px;
  display: grid;
  gap: 30px 48px;
}

.faq-item h3 {
  font-size: 1.02rem;
  margin-bottom: 8px;
  padding-top: 14px;
  border-top: 2px solid var(--accent);
}

.faq-item p {
  color: var(--ink-soft);
  max-width: 60ch;
  text-wrap: pretty;
}

/* --------------------------------------------------------------- closing */

.closing {
  padding: 0 0 64px;
}

.closing blockquote {
  margin: 0;
  padding: 40px 0 0;
  border-top: var(--rule);
  max-width: 26ch;
}

.closing blockquote p {
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  font-weight: 560;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  border-top: var(--rule);
  background: var(--surface-sunk);
  padding: 34px 0 44px;
}

.footer-grid {
  display: grid;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--ink-faint);
  max-width: 76ch;
}

.site-footer a {
  color: var(--ink-soft);
  text-underline-offset: 3px;
}

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

/* --------------------------------------------------------- scroll reveal
 * Hierarchy: each block resolves as you arrive at it. Native scroll driven
 * animation only, so there is no scroll listener and nothing to clean up.
 * Silently skipped where unsupported, and off entirely under reduced motion.
 */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .preview,
    .builder-grid,
    .notes > div,
    .agent-grid,
    .faq-item,
    .closing blockquote {
      animation: rise-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 42%;
    }
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ------------------------------------------------------------ responsive */

@media (min-width: 700px) {
  .field-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    padding: 20px 0;
    border-bottom: var(--rule);
  }

  .field-row .field {
    padding: 0;
    border-bottom: 0;
  }

  .faq-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* With an odd number of questions the opening one runs full width, so the
     block reads as a composition and no cell is left empty at the end. With
     an even number the plain two column grid already fills exactly. */
  .faq-item:first-child:nth-last-child(odd) {
    grid-column: 1 / -1;
  }

  .faq-item:first-child:nth-last-child(odd) p {
    max-width: 70ch;
  }

  .notes > div {
    grid-template-columns: minmax(0, 8fr) minmax(0, 13fr);
    gap: 32px;
    align-items: baseline;
  }
}

@media (min-width: 1000px) {
  .hero {
    padding: 92px 0 96px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 72px;
  }

  .builder {
    padding-bottom: 92px;
  }

  .builder-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: 44px;
  }

  /* The result stays in view while you work through the options beside it. */
  .subscribe {
    position: sticky;
    top: 88px;
  }

  .preview {
    padding: 30px 30px 24px;
  }

  .behaviour,
  .agent,
  .faq {
    padding: 84px 0;
  }

  .agent-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 64px;
  }

  .closing {
    padding-bottom: 84px;
  }
}

/* The day line is a shape, not a chart to read off precisely. Below 700px
   the per-prayer labels cannot fit, so the band keeps the shape and the list
   underneath carries every name and time as text. */
@media (max-width: 699px) {
  .dayline {
    margin-top: 20px;
  }

  .dayline-labels {
    display: none;
  }

  .dayline.is-loading {
    height: 58px;
  }
}

@media (max-width: 599px) {
  .header-link {
    display: none;
  }
}

@media (max-width: 400px) {
  .shell {
    padding: 0 16px;
  }

  .segmented span,
  .checks span {
    padding: 0 11px;
    font-size: 0.85rem;
  }

  .preview {
    padding: 20px 18px 16px;
  }

  .subscribe {
    padding: 20px 18px;
  }
}
