/* My Land, My Plan, Kashmir. Design tokens
   Palette: soil / leaf / daylight
   Primary accent: deep olive green
   Type: Source Sans 3 (UI) + Source Serif 4 (titles)
   Spacing scale: 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64
*/

:root {
  --color-bg: #f7f5f0;
  --color-surface: #ffffff;
  --color-text: #1a1f1a;
  --color-text-muted: #4a524a;
  --color-border: #d4d0c4;
  --color-accent: #3d5a3d;
  --color-accent-hover: #2f4630;
  --color-accent-pressed: #263c26;
  --color-accent-soft: #e8efe6;
  --color-accent-soft-hover: #d6dfd3;
  --color-surface-alt: #f2f4ef;
  --color-error: #8b3a2a;
  /* Calendar phase tints. Each is a light ground with dark text on it, so a
     colour-coded month never drops below AA contrast. */
  --phase-prepare-bg: #f0e4d0;
  --phase-prepare-fg: #46360f;
  --phase-sow-bg: #dfe9d8;
  --phase-sow-fg: #263c1d;
  --phase-care-bg: #d9e8e4;
  --phase-care-fg: #1c4038;
  --phase-harvest-bg: #f7e0c0;
  --phase-harvest-fg: #55340b;
  --phase-quiet-bg: #ebebe6;
  --phase-quiet-fg: #404840;
  --color-focus: #1a4d2e;
  --radius: 8px;
  --radius-sm: 4px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  /* System fonts only: no third-party host, no webfont swap, nothing to
     reflow. Georgia keeps the heading contrast without a download. */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --font-serif: Georgia, "Noto Serif", "Times New Roman", serif;
  --max-width: 720px;
  --max-wide: 960px;
}

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

/* Author styles would otherwise beat the browser default for [hidden]. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--color-accent);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 100;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-2);
}

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

/* One row on every width. As a block of its own inside .nav the language
   switch added a second header row when it appeared, moving every screen
   down: a CLS of 0.17 on a phone. A flex row keeps the height fixed. */
.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-1);
  min-width: 0;
  flex: 0 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.05rem;
  /* The name gives way to the controls rather than pushing them off a 360px
     screen, where the three scripts in the switcher take real width. */
  min-width: 0;
  flex: 0 1 auto;
}

/* The header mark is a plot tile, not a squircle. Square corners with a single
   rounded radius make it read as a piece of ground at a glance, and the pale
   furrow across the lower third is the one detail that ties it to the subject
   without adding decoration. Flat fill only, and the line is a pseudo-element
   so it is never a gradient. */
.logo-mark {
  width: 28px;
  height: 28px;
  background: var(--color-accent);
  border-radius: 6px;
  flex-shrink: 0;
  position: relative;
}

.logo-mark::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 7px;
  height: 2px;
  background: var(--color-accent-soft);
  border-radius: 1px;
}

.logo-text {
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The language switcher sits in the header, before the menu button. It is
   hidden until a translator has registered a second language, so on the
   shipped English-only app it takes no space and draws no attention. */
.lang-switch {
  display: flex;
  align-items: center;
}

.lang-switch[hidden] {
  display: none;
}

#lang-select {
  font: inherit;
  /* 16px keeps a phone from zooming in when the language is changed, and the
     extra size is welcome when the control holds three scripts at once. */
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.35rem 0.5rem;
  min-height: 36px;
  /* A ceiling, so the longest label (Urdu plus its unchecked note) cannot
     widen the header after the strings load, and the row always fits. */
  max-width: 7rem;
}

#lang-select:hover {
  border-color: var(--color-accent);
}

#lang-select:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  cursor: pointer;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-text);
  position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--color-text);
}

.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-1);
}

.nav-menu a {
  display: block;
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.nav-menu a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* Main layout */
main {
  flex: 1;
  padding-bottom: var(--space-8);
}

.container {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4);
}

.container.narrow {
  max-width: var(--max-width);
}

.screen {
  display: none;
}

.screen.screen-active,
.screen:not([hidden]) {
  display: block;
}

/* Typography */
.screen-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 var(--space-3);
  color: var(--color-text);
  letter-spacing: -0.02em;
}

/* Headings receive focus only to move the reading position for screen
   readers. They are not reachable by Tab, so no ring is needed. The visit
   card joins them: visit mode focuses it so a screen reader announces the
   card as the new position, but nothing reaches it by Tab. */
.screen-title:focus,
.hero h1:focus,
.step-legend:focus,
.visit-card:focus {
  outline: none;
}

.screen-intro {
  margin: 0 0 var(--space-5);
  color: var(--color-text-muted);
  max-width: 42em;
}

.eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-accent);
  margin: 0 0 var(--space-2);
}

/* Hero */
.hero {
  padding: var(--space-6) 0 var(--space-7);
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--space-4);
  letter-spacing: -0.02em;
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 36em;
  margin: 0 0 var(--space-5);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.hero-note {
  font-size: 0.95rem;
  color: var(--color-text);
  max-width: 36em;
  margin: var(--space-2) 0 0;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.home-points {
  display: grid;
  gap: var(--space-4);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

@media (min-width: 640px) {
  .home-points {
    grid-template-columns: repeat(2, 1fr);
  }
}

.point {
  background: var(--color-surface);
  padding: var(--space-4);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  position: relative;
}

/* A pale step number sits above the heading. It is the same detail the form
   itself uses, so the home page reads as the start of a sequence rather than
   as two floating facts. The number is decorative: the heading carries the
   meaning, and the copy below it never depends on the count. */
.point-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.point h2 {
  font-family: var(--font-sans);
  font-size: 1rem;
  margin: 0.15rem 0 0.35rem;
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.point p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.home-note {
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: var(--color-accent-soft);
  border-radius: var(--radius);
}

.home-note h2 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-accent);
  margin: 0 0 var(--space-2);
}

.home-note p {
  margin: 0;
  font-size: 0.95rem;
  max-width: 62ch;
}

/* Buttons
   The face, the hover and the press are three separate states, and all three
   are named here. A hover alone is a rumour that something is possible; a
   press is the thing actually happening, and on a phone that is the moment a
   farmer's thumb is committed. So each variant darkens a shade on hover and
   darkens again on active, and every one lifts a hair. The accent colour is
   declared once, on .btn-primary, and the size-only variants below inherit it
   rather than repeating it, so there is one place to change the green. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--space-5);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease,
    color 0.12s ease, transform 0.08s ease;
}

/* The only transform in the app, and only by a pixel. It is what a pressed
   surface does, and it keeps the press state from looking like a hover that
   went wrong. Transforms do not trigger reflow, so nothing on the page moves. */
.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* Links in the middle of a paragraph, such as the source list and the scheme
   entries, get the same ring as the buttons. Keyboard focus should look the
   same wherever it lands rather than depending on the browser default. */
a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

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

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

/* A primary button that is a toggle, such as the read-aloud control, shows its
   running state by pressing in rather than by disappearing into the hover
   shade. The same rule covers every primary toggle, so a new one needs no
   extra colour. */
.btn-primary[aria-pressed="true"] {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-accent);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
}

.btn-secondary:active {
  background: var(--color-accent-soft-hover);
  border-color: var(--color-accent-hover);
}

/* Low-emphasis action for save, reset, and other secondary utilities. It keeps
   its underline until the finger is on it, then fills like the others, because
   a pressed quiet button should not look like a link that changed its mind. */
.btn-quiet {
  min-height: 44px;
  padding: 0 var(--space-3);
  background: none;
  border-color: transparent;
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-quiet:hover {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
  color: var(--color-accent);
  text-decoration: none;
}

.btn-quiet:active {
  background: var(--color-accent-soft-hover);
  border-color: var(--color-accent-hover);
  color: var(--color-accent-hover);
}

/* The read-aloud controls are the biggest buttons in the app on purpose: the
   farmer reaching for them is often listening, not looking, and may be doing
   both poorly in bright sun. Big tap target, short calm label, and a spoken
   status line that names the section being read. No icons, no emoji, the words
   say what happens. The size is the only thing that sets them apart; the
   colour comes from .btn-primary, above. */
.btn-read {
  min-height: 56px;
  font-size: 1.1rem;
}

.read-controls {
  margin: var(--space-4) 0;
}

.read-controls .results-actions {
  margin-bottom: var(--space-2);
}

/* Part-to-part controls. They sit under the play row, kept quiet so they do
   not compete with the main action, but still large enough to tap on a phone
   in a moving hand. They only appear while a sectioned read plays. */
.read-skip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.read-skip .btn-sm {
  font-size: 0.9rem;
  padding: var(--space-2) var(--space-3);
}

.btn-sm:disabled,
.read-skip .btn-sm:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.read-status {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--color-accent-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.read-fallback {
  margin: var(--space-2) 0 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Progress */
.progress-wrap {
  margin-bottom: var(--space-5);
}

.progress-bar {
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--color-accent);
  width: 20%;
  transition: width 0.2s ease;
}

.progress-label {
  margin: var(--space-2) 0 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Form */
.form-step {
  border: none;
  margin: 0 0 var(--space-5);
  padding: 0;
}

.step-legend {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-4);
  padding: 0;
}

.field {
  margin-bottom: var(--space-4);
}

.field-row {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 480px) {
  .field-row {
    grid-template-columns: 1fr 140px;
  }
}

label,
.label-like {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: var(--space-2);
}

.req {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  min-height: 48px;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-sans);
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
}

input:focus,
select:focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 1px;
  border-color: var(--color-accent);
}

.field-error {
  margin: var(--space-1) 0 0;
  font-size: 0.875rem;
  color: var(--color-error);
  font-weight: 500;
}

.hint {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-4);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.radio-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
}

.radio-card:has(input:checked) {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.radio-card:focus-within {
  outline: 2px solid var(--color-focus);
  outline-offset: 1px;
}

.radio-card input {
  width: 20px;
  height: 20px;
  accent-color: var(--color-accent);
  flex-shrink: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.form-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.inline-status {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-accent);
}

/* Shown in place of a feature whose file could not be fetched. It sits where
   the feature would have been, so an empty panel is never left behind, and
   the Retry button is a real control rather than a suggestion to reload. */
.lazy-fail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-3) 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.lazy-fail-text {
  margin: 0;
  flex: 1 1 14rem;
}

.draft-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
  background: var(--color-accent-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.draft-notice p {
  margin: 0;
  font-size: 0.95rem;
  max-width: 46ch;
}

/* Results */
.sample-badge {
  display: inline-block;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  margin: 0 0 var(--space-4);
}

.summary-strip {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
  font-size: 0.95rem;
}

.summary-strip strong {
  font-weight: 600;
}

.options-list {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.option-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-5);
}

.option-card h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 var(--space-3);
}

.option-meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.option-section {
  margin-bottom: var(--space-3);
}

.option-section h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 var(--space-1);
  color: var(--color-text);
}

.option-section p,
.option-section ul {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.option-section ul {
  padding-left: 1.2em;
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

/* Compare table */
.table-wrap {
  overflow-x: auto;
  margin-bottom: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 480px;
}

.compare-table th,
.compare-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.compare-table th {
  background: var(--color-accent-soft);
  font-weight: 600;
  font-size: 0.9rem;
}

.compare-table tbody th {
  width: 200px;
  font-weight: 600;
}

.compare-stacked {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.stacked-option {
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.stacked-option h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.stacked-option dl {
  margin: 0;
}

.stacked-option dt {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
  margin: var(--space-3) 0 var(--space-1);
}

.stacked-option dt:first-child {
  margin-top: 0;
}

.stacked-option dd {
  margin: 0;
  font-size: 0.95rem;
}

.compare-notes h2 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.verify-list {
  list-style: none;
  margin: 0 0 var(--space-5);
  padding: 0;
}

.verify-list li {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.verify-list li:last-child {
  border-bottom: none;
}

.verify-list strong {
  display: block;
  margin-bottom: var(--space-1);
}

.verify-list p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.compare-table tbody tr:last-child td {
  border-bottom: none;
}

/* Checklist & schemes */
.checklist-card,
.schemes-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.checklist-card h2,
.schemes-card h2 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 var(--space-4);
}

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

.checklist li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
}

.checklist li:last-child {
  border-bottom: none;
}

.checklist input[type="checkbox"] {
  /* 24px is the WCAG 2.2 target size minimum, and the label beside it is
     clickable as well. */
  width: 24px;
  height: 24px;
  margin-top: 2px;
  accent-color: var(--color-accent);
  flex-shrink: 0;
}

.schemes-note {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-4);
}

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

.schemes-list li {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}

.schemes-list li:last-child {
  border-bottom: none;
}

.schemes-list strong {
  display: block;
  margin-bottom: var(--space-1);
}

.schemes-list p {
  margin: 0 0 var(--space-1);
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* Scoped past .schemes-list p rather than reaching for !important. */
.schemes-list p.link-placeholder {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--color-text-muted);
}

/* Summary card */
.summary-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  font-size: 0.95rem;
}

.summary-card h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: 0 0 var(--space-3);
}

.summary-card h3 {
  font-size: 1rem;
  margin: var(--space-4) 0 var(--space-2);
}

.summary-card ul {
  margin: 0;
  padding-left: 1.2em;
}

.summary-card p {
  margin: 0 0 var(--space-2);
}

.summary-checklist .is-done {
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.summary-card .summary-footnote {
  margin-top: var(--space-5);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* About */
.about-content h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: var(--space-5) 0 var(--space-2);
}

.about-content ul {
  margin: 0 0 var(--space-4);
  padding-left: 1.2em;
}

.about-content p {
  margin: 0 0 var(--space-3);
  color: var(--color-text-muted);
}

/* Footer */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-5) var(--space-4);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.site-footer .container {
  padding: 0;
}

.site-footer p {
  margin: 0 0 var(--space-1);
}

/* Footer links sit on their own line, so they get a comfortable tap height
   rather than the height of the text alone. */
.site-footer a {
  display: inline-block;
  padding: var(--space-2) 0;
  color: var(--color-accent);
  text-decoration: underline;
}

.site-footer a:hover {
  text-decoration: none;
}

/* Mobile nav */
@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: var(--space-2);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu a {
    padding: var(--space-3) var(--space-4);
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }

  .results-actions {
    flex-direction: column;
  }

  .results-actions .btn {
    width: 100%;
  }
}

/* Respect a reduced-motion preference: keep the layout, drop the movement. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print */
@media print {
  /* Printing must win over the on-screen layout, whatever later rules do, so
     these two blocks keep !important on purpose. */
  .site-header,
  .site-footer,
  .no-print,
  .nav,
  .results-actions,
  .read-controls {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .summary-card {
    border: 1px solid #ccc;
  }

  .summary-checklist li {
    break-inside: avoid;
  }
}

/* ------------------------------------------------------------------
   Additions: provenance legend, region background, ratings, calendars,
   scheme entries, weather screen, sources and print details.
   Same tokens and spacing scale as the rest of the file.
   ------------------------------------------------------------------ */

/* A legend, deliberately not a row of boxes: label then meaning. */
.provenance-wrap {
  margin-top: var(--space-5);
}

.provenance-wrap h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 var(--space-3);
}

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

.provenance-item {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: var(--space-1) var(--space-4);
  align-items: baseline;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.88rem;
}

.provenance-item:last-child {
  border-bottom: none;
}

.provenance-label {
  font-weight: 600;
}

.provenance-body {
  color: var(--color-text-muted);
}

.provenance-compact .provenance-item {
  grid-template-columns: 9rem 1fr;
  font-size: 0.82rem;
}

/* Small labels saying where a piece of information comes from. */
.kind-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 1px var(--space-2);
  border-radius: var(--radius-sm);
}

.kind-user {
  background: #e8efe6;
  color: #263c1d;
}

.kind-illustrative {
  background: #f0e4d0;
  color: #46360f;
}

.kind-regional {
  background: #e1e8ec;
  color: #23384a;
}

.kind-weather {
  background: #dde8f2;
  color: #1a3c58;
}

.section-kind {
  margin: 0 0 var(--space-2);
}

.option-note,
.option-section .option-note {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin: var(--space-2) 0 0;
}

.pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--color-accent-soft);
  color: #263c1d;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  vertical-align: middle;
}

/* Regional background panel, tinted to separate it from your own answers. */
.region-card {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.region-card h2 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.region-card > p {
  margin: 0 0 var(--space-3);
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* Ratings read as a data list, not as tiles. */
.rating-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: var(--space-3) var(--space-4);
  margin: 0;
}

.rating-item dt {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
}

.rating-item dd {
  margin: var(--space-1) 0 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.option-why ul {
  padding-left: 1.2em;
}

.option-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

/* The "follow this up" toggle on each option card. It is a secondary button
   with a tighter border and a bolder label, so it reads as a choice rather than
   a navigation step. Its colours come from .btn-secondary and its running
   state from .btn-primary[aria-pressed="true"], so this block only says what
   is different. Hover and press are inherited and stay consistent. */
.btn-toggle {
  border-width: 1px;
  font-weight: 600;
}

/* Typical year. Twelve cells that tint by phase, so the shape of the year
   is readable at a glance on a phone and on a desktop. */
.calendar {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.calendar summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-accent);
  padding: var(--space-2) 0;
}

.calendar summary:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

.calendar[open] summary {
  margin-bottom: var(--space-3);
}

.calendar-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: var(--space-2);
}

.cal-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--phase-bg, var(--color-bg));
  color: var(--phase-fg, var(--color-text));
  font-size: 0.82rem;
}

.cal-month {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cal-phase {
  font-weight: 600;
}

.cal-detail {
  font-size: 0.78rem;
}

.calendar-key {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.cal-key {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.cal-key-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--phase-bg, var(--color-border));
}

.phase-prepare {
  --phase-bg: var(--phase-prepare-bg);
  --phase-fg: var(--phase-prepare-fg);
}

.phase-sow {
  --phase-bg: var(--phase-sow-bg);
  --phase-fg: var(--phase-sow-fg);
}

.phase-care {
  --phase-bg: var(--phase-care-bg);
  --phase-fg: var(--phase-care-fg);
}

.phase-harvest {
  --phase-bg: var(--phase-harvest-bg);
  --phase-fg: var(--phase-harvest-fg);
}

.phase-quiet {
  --phase-bg: var(--phase-quiet-bg);
  --phase-fg: var(--phase-quiet-fg);
}

/* Scheme entries */
.schemes-list .scheme-cat {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-2);
}

.schemes-list .scheme-actions {
  margin: var(--space-2) 0;
  padding-left: 1.2em;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.scheme-link {
  display: inline-block;
  padding: var(--space-2) 0;
  color: var(--color-accent);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.scheme-link:hover {
  color: var(--color-accent-hover);
}

.schemes-divider strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin: 0 0 var(--space-2);
}

.disclaimer-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.disclaimer-block h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 var(--space-3);
}

.disclaimer-block p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* Weather */
.weather-callout {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.weather-callout h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.weather-callout p {
  margin: 0 0 var(--space-4);
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.weather-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.weather-form .field {
  flex: 1 1 12rem;
  margin-bottom: 0;
}

.weather-status {
  color: var(--color-text-muted);
}

.weather-error {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.weather-error h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--color-error);
  margin: 0 0 var(--space-3);
}

.weather-error p {
  margin: 0 0 var(--space-3);
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.weather-head h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.weather-place {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
}

.weather-warn {
  background: var(--phase-harvest-bg);
  color: var(--phase-harvest-fg);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin: 0 0 var(--space-3);
}

.weather-now {
  list-style: none;
  margin: 0 0 var(--space-5);
  padding: var(--space-4);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.wn-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
}

.wn-value {
  display: block;
  margin-top: var(--space-1);
  font-size: 1.05rem;
  font-weight: 600;
}

.weather-days {
  list-style: none;
  margin: 0 0 var(--space-5);
  padding: 0 var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.weather-day {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  gap: var(--space-1) var(--space-3);
  align-items: baseline;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.92rem;
}

.weather-day:last-child {
  border-bottom: none;
}

.wd-day {
  font-weight: 600;
}

.wd-cond {
  color: var(--color-text-muted);
}

.wd-temp {
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.wd-rain {
  grid-column: 2 / -1;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.weather-foot {
  margin-top: var(--space-5);
}

/* Summary details */
.summary-card p.summary-disclaimer {
  background: var(--phase-prepare-bg);
  color: var(--phase-prepare-fg);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

/* Sources in About */
.about-content ul.sources-list {
  list-style: none;
  padding-left: 0;
  margin: 0 0 var(--space-4);
}

.sources-list li {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.sources-list li:last-child {
  border-bottom: none;
}

.sources-list a {
  color: var(--color-accent);
  font-weight: 600;
}

.sources-list p {
  margin: var(--space-1) 0 0;
  font-size: 0.9rem;
}

.about-content p.section-note {
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .provenance-item {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .weather-day {
    grid-template-columns: 4.5rem 1fr auto;
  }
}

@media print {
  .kind-tag,
  .pill {
    border: 1px solid #999;
  }

  .provenance-item,
  .rating-item,
  .weather-day,
  .sources-list li {
    break-inside: avoid;
  }

  .region-card,
  .weather-callout,
  .disclaimer-block,
  .weather-now,
  .weather-days,
  .calendar {
    border: 1px solid #ccc;
  }

  .cal-cell {
    background: none;
    border: 1px solid #bbb;
  }
}

/* The printed summary now carries the same detail as the downloaded plan. */
.summary-card h4 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin: var(--space-5) 0 var(--space-2);
}

.summary-options {
  list-style: decimal;
  padding-left: 1.2em;
}

.summary-option {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.summary-options > li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.summary-card p.summary-marked {
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.summary-card ul.summary-ratings {
  list-style: none;
  margin: var(--space-2) 0 0;
  padding: 0;
}

.summary-card ul.summary-ratings li {
  padding: var(--space-1) 0;
  border-bottom: 1px solid var(--color-border);
}

.summary-card ul.summary-ratings li:last-child {
  border-bottom: none;
}

.summary-card p.summary-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: var(--space-2) 0 0;
}

/* Offline, review, location, and the four information kinds. */

.offline-banner {
  background: #46360f;
  color: #fff8ec;
  text-align: center;
  padding: var(--space-2) var(--space-4);
  font-size: 0.9rem;
  font-weight: 600;
}

.home-kinds {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

@media (min-width: 640px) {
  .home-kinds {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kind-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
}

.kind-card h2 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 var(--space-2);
}

.kind-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* The four kinds of information carry the same four washes as their .kind-tag
   chips, so a block is named by its fill and its label rather than by a
   coloured stripe down one edge. */
.kind-card-user,
.data-user,
.summary-strip.data-user {
  background: #e8efe6;
}

.kind-card-illustrative,
.data-illustrative {
  background: #f0e4d0;
}

/* Deliberately excluded: washing every option card amber would make the whole
   results list one colour and blunt the point of having four washes. The card
   keeps the plain surface and names its kind in the meta line instead. */
.option-card.data-illustrative {
  background: var(--color-surface);
}

.kind-card-regional,
.data-regional,
.region-card.data-regional {
  background: #e1e8ec;
}

.kind-card-weather,
.data-weather,
.weather-callout.data-weather {
  background: #dde8f2;
}

.review-banner {
  margin-bottom: var(--space-4);
}

/* Amber while a suggestion is unchecked, green once an officer has signed it
   off. The heading above the text always names the state in words too, so the
   colour is a reinforcement rather than the only signal. */
.review-card {
  background: #f0e4d0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
}

.review-card.review-reviewed {
  background: var(--color-accent-soft);
}

.review-card.review-mixed {
  background: #f7e0c0;
}

.review-label {
  margin: 0 0 var(--space-1);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.review-card p {
  margin: 0;
  font-size: 0.95rem;
}

.review-banner.compact .review-card {
  padding: var(--space-3) var(--space-4);
}

.disclaimer-block.compact {
  padding: var(--space-4);
}

.location-context,
.location-card {
  background: #e1e8ec;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin: 0 0 var(--space-5);
}

.location-context h2,
.location-card h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.location-context p,
.location-card p {
  margin: 0 0 var(--space-2);
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.location-context p:last-child,
.location-card p:last-child {
  margin-bottom: 0;
}

.option-confirm,
.summary-card .option-confirm {
  font-size: 0.88rem;
  color: var(--color-text);
  margin: 0 0 var(--space-3);
}

.option-card.is-interested,
.stacked-option.is-interested,
.summary-option.is-interested {
  border-color: var(--color-accent);
  box-shadow: inset 0 0 0 1px var(--color-accent);
}

.draft-notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.plan-tools {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.tools-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.weather-ok {
  font-size: 0.88rem;
  color: var(--color-accent);
  margin: 0 0 var(--space-3);
}

.schemes-list li.is-secondary {
  opacity: 1;
}

@media (max-width: 480px) {
  .calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cal-cell {
    min-height: 4.5rem;
  }

  .stacked-option {
    padding: var(--space-3);
  }

  .option-card,
  .summary-card,
  .region-card,
  .checklist-card,
  .schemes-card {
    padding: var(--space-4);
  }

  .compare-table {
    min-width: 0;
  }

  .weather-now {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: var(--space-3);
  }

  .weather-day {
    grid-template-columns: 1fr auto;
  }

  .wd-cond {
    grid-column: 1 / -1;
  }

  .wd-rain {
    grid-column: 1 / -1;
  }

  .summary-options {
    padding-left: 0;
    list-style: none;
  }
}

@media print {
  .offline-banner,
  .plan-tools {
    display: none !important;
  }

  .review-card,
  .location-card,
  .option-card {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}

/* ------------------------------------------------------------------
   Additions: the forecast note, the month view, the generated questions,
   the office visit card, saved plans, reading aloud and the home screen
   offline card. Same tokens and spacing scale as the rest of the file.
   On the results screen the colour washes stay reserved for where they
   say where something came from, so content sections keep the plain
   surface and name their kind with a chip.
   ------------------------------------------------------------------ */

/* -- Something in the forecast -- */

.timing-note {
  background: #dde8f2;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin: 0 0 var(--space-5);
}

.timing-note h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.timing-note p {
  margin: 0 0 var(--space-2);
  font-size: 0.95rem;
}

.timing-note p:last-child {
  margin-bottom: 0;
}

/* -- The month ahead, for the options on the shortlist -- */

.month-view,
.questions-block,
.plans-empty {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin: 0 0 var(--space-5);
}

.month-view h2,
.questions-block h2,
.plans-empty h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.month-view > p,
.questions-block > p {
  margin: 0 0 var(--space-3);
  font-size: 0.95rem;
}

.month-list {
  list-style: none;
  margin: 0 0 var(--space-3);
  padding: 0;
}

.month-row {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.month-row:last-child {
  border-bottom: none;
}

.month-option {
  font-weight: 600;
  font-size: 0.95rem;
}

/* The month is tagged with the same phase tint the calendar uses, so the two
   views read as the same information told twice rather than two ideas. */
.month-phase {
  display: inline-block;
  justify-self: start;
  font-size: 0.88rem;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}

/* -- Questions to ask -- */

.question-list {
  margin: 0;
  padding-left: 1.4em;
}

.question-item {
  margin: 0 0 var(--space-3);
  padding-left: var(--space-1);
}

.question-item:last-child {
  margin-bottom: 0;
}

.question-text {
  display: block;
  font-size: 0.98rem;
  line-height: 1.5;
}

.question-about {
  display: block;
  margin-top: var(--space-1);
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* -- Questions as a tickable checklist -- */

/* The visit list doubles as the list to tick during the visit. The rows are
   labels around real checkboxes, so the whole row is a tap target big enough
   for a thumb, and keyboard users land on the box itself, not on the words. */
.question-checklist {
  list-style: none;
  padding-left: 0;
}

.question-tick {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: var(--space-2);
  align-items: start;
  cursor: pointer;
  padding: var(--space-2) var(--space-1);
  margin: 0 calc(var(--space-1) * -1);
  border-radius: var(--radius-sm);
}

.question-tick:hover {
  background: var(--color-accent-soft);
}

/* The box is drawn by hand so it stays visible at any magnification and
   prints as a box even where browsers would fade a native checkbox. The
   native input stays in charge of state, hidden off screen where a mouse
   cannot click it twice. */
.question-tick input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.question-box {
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border: 2px solid var(--color-text);
  border-radius: var(--radius-sm);
  background: #fff;
  flex: none;
}

.question-tick input[type="checkbox"]:checked + .question-box {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* The tick itself is drawn, not printed as a font glyph, because font ticks
   are the first thing to vanish on cheap printers. Two short bars make the
   tick, and they read as done even in plain black and white. */
.question-tick input[type="checkbox"]:checked + .question-box::after {
  content: "";
  display: block;
  width: 6px;
  height: 12px;
  margin: 2px 0 0 8px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.question-tick input[type="checkbox"]:focus-visible + .question-box {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.question-counter {
  margin: var(--space-3) 0 0;
  font-weight: 700;
}

/* On paper the boxes are ink on the page and the tick instruction is gone,
   because there is nobody left to tick for. Native-looking boxes print best
   when they are this simple. */
@media print {
  .question-tick {
    display: block;
    padding: 0 0 var(--space-1);
  }

  .question-box {
    display: inline-block;
    width: 11pt;
    height: 11pt;
    margin: 0 6pt 0 0;
    vertical-align: baseline;
  }

  .question-tick input[type="checkbox"]:checked + .question-box {
    background: #fff;
    border-color: #000;
  }

  /* Ink on paper cannot rely on the green fill, so a printed tick is drawn
     in black bars. A checked box prints as a boxed tick; an unchecked box
     prints empty for a pen to fill in during the visit. */
  .question-tick input[type="checkbox"]:checked + .question-box::after {
    content: "";
    display: block;
    width: 3pt;
    height: 7pt;
    margin: 0 0 0 3.5pt;
    border: solid #000;
    border-width: 0 1.5pt 1.5pt 0;
    transform: rotate(45deg);
  }
}

/* -- Office visit card -- */

/* -- Office visit card hero -- */

/* The visit card is the artefact this whole app exists to produce, so its
   screen is treated as a hero, not as one result among many. The actions sit
   above the card where a thumb can reach them, and the primary action is
   large. No gradient, no glass, just clear spacing and one big button. */
.visit-hero {
  margin-bottom: var(--space-5);
}

.visit-hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 var(--space-2);
}

.visit-hero .screen-title {
  margin-top: 0;
}

/* The single large primary action on a screen. It is taller than the standard
   48px floor and a touch wider, because it is the one a farmer commits to with
   a whole hand rather than a thumb. Size only: the green comes from
   .btn-primary, so this and the press state stay in step. */
.btn-lg {
  min-height: 3.25rem;
  padding: var(--space-3) var(--space-5);
  font-size: 1.05rem;
}

.visit-mode-hint {
  margin: 0 0 var(--space-2);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* -- Visit mode -- */

/* Standing with an officer, the farmer needs only the card, the questions to
   tick and the reading controls. Everything else is chrome for a different
   moment, so visit mode hides it. The class is on the screen and the hiding
   is done here rather than by removing nodes, so leaving visit mode restores
   the exact same screen with no re-render and no lost scroll position. */
#screen-visit.is-visit-mode .visit-mode-hide {
  display: none !important;
}

#screen-visit.is-visit-mode #visit-mode-exit-row {
  display: block;
}

#screen-visit.is-visit-mode .visit-hero .screen-title {
  font-size: 1.15rem;
}

/* In visit mode the reading controls should stay put and be easy to hit, so
   the stop button keeps its size and the status line is given a little room. */
#screen-visit.is-visit-mode .read-controls {
  margin-top: var(--space-3);
}

/* The exit control is the one thing a farmer needs while standing at the
   counter, so in visit mode it becomes a fixed bar at the bottom of the
   screen. It never scrolls away, it is a large tap target, and it is the
   only fixed element in the app, used only for this moment. */
#screen-visit.is-visit-mode .visit-mode-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  margin: 0;
  padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

#screen-visit.is-visit-mode .visit-mode-bar .btn {
  width: 100%;
}

/* Room at the foot of the card so the fixed bar never covers the last line
   of the notes section. */
#screen-visit.is-visit-mode .visit-card {
  margin-bottom: calc(64px + var(--space-5));
}

/* In visit mode the read-aloud button is the primary way to use the card
   hands-free, so it is given the large primary treatment and full width. */
#screen-visit.is-visit-mode #btn-visit-read {
  width: 100%;
  min-height: 56px;
  font-size: 1.05rem;
}

#screen-visit.is-visit-mode .read-controls .results-actions {
  margin-bottom: var(--space-2);
}

/* -- What to expect at the office -- */

.office-panel {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-5) 0;
}

.office-panel h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 var(--space-3);
}

.office-list {
  margin: 0 0 var(--space-3);
  padding-left: 1.4em;
}

.office-list li {
  margin: 0 0 var(--space-3);
  line-height: 1.5;
}

.office-closing {
  margin: 0;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.visit-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-5);
}

.visit-head {
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-4);
}

/* The shared review banner also sits in the visit card head, so it shares the
   same card spacing without a second copy of the rules. */
.visit-head .review-card {
  margin-top: var(--space-3);
}

.visit-head h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.visit-date {
  margin: 0 0 var(--space-2);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* The plan name leads the card, because it is the one line a farmer holding a
   handful of printed cards will recognise. It is given a little more weight
   and size than the date so the eye lands on it first, but it stays in the
   muted tone: it labels the card, it is not a headline of its own. */
.visit-plan-name {
  margin: 0 0 var(--space-2);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
}

.visit-section {
  margin: 0 0 var(--space-5);
}

.visit-section h3 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-2);
}

.visit-answers {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  font-size: 0.92rem;
}

.visit-answers dt {
  font-weight: 600;
}

.visit-answers dd {
  margin: 0;
}

.visit-options {
  margin: 0 0 var(--space-2);
  padding-left: 1.4em;
  font-size: 0.95rem;
}

.visit-options li {
  margin: 0 0 var(--space-2);
}

.visit-flag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--color-accent-soft);
  color: #263c1d;
  padding: 1px var(--space-2);
  border-radius: var(--radius-sm);
}

.visit-support {
  margin: 0 0 var(--space-2);
  padding-left: 1.2em;
  font-size: 0.92rem;
}

.visit-support li {
  margin: 0 0 var(--space-1);
}

.visit-note,
.visit-foot {
  margin: var(--space-2) 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.visit-lines {
  margin-top: var(--space-2);
}

.visit-line {
  height: 26px;
  border-bottom: 1px solid var(--color-border);
}

.visit-reference {
  margin: var(--space-2) 0 0;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.visit-reference-note {
  margin: var(--space-1) 0 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* The code on the card. It sits with the reference so the two are read as one
   thing, and it is kept in a quiet white box because a dark or patterned
   background would stop a camera reading it. On screen it is centred in a
   narrow card; on paper it keeps the same size. */
.visit-qr {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  margin: var(--space-3) 0;
}

.visit-qr-canvas {
  display: block;
  background: #fff;
  border: 1px solid var(--color-border);
  padding: 6px;
  width: 156px;
  height: 156px;
  box-sizing: content-box;
}

.visit-qr-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  max-width: 24rem;
}

.plan-reference {
  margin: var(--space-1) 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Give the printing of the card one page, and keep sections whole. */
@page {
  margin: 12mm;
}

@media print {
  .visit-card {
    border: none;
    border-radius: 0;
    padding: 0;
    font-size: 10.5pt;
    line-height: 1.35;
  }

  .visit-section,
  .visit-head {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Every section, not just these, must keep its shape, and the whole card is
     allowed to be a little tighter on paper than on screen. */
  .visit-section {
    margin: 0 0 8pt;
  }

  .visit-section h3 {
    font-size: 10.5pt;
    margin: 0 0 3pt;
    padding-bottom: 1pt;
  }

  .visit-answers,
  .visit-options,
  .visit-support,
  .question-text {
    font-size: 10.5pt;
  }

  /* The reference is the one line an officer reads aloud or writes down, so on
     paper it is set larger than the body rather than the same size. It costs a
     few points of height, which the fitter can take back out of the notes area
     if the card is near the page limit. */
  .visit-reference {
    font-size: 12pt;
    font-weight: 600;
  }

  .visit-answers dt,
  .visit-answers dd {
    padding: 0 0 1pt;
  }

  .visit-note {
    font-size: 9pt;
    margin: 2pt 0 0;
  }

  .visit-qr-note {
    font-size: 9pt;
  }

  /* On paper the code is kept a fixed, generous size so it stays readable by
     a phone camera. It is never stretched past the pixels it was drawn in. */
  .visit-qr-canvas {
    width: 40mm;
    height: 40mm;
    box-sizing: content-box;
  }

  .visit-qr {
    break-inside: avoid;
    page-break-inside: avoid;
    margin: 6pt 0;
  }

  .visit-head .review-card {
    background: #f2f2f2;
    border: 1px solid #999;
  }

  .visit-line {
    height: 24px;
    border-bottom: 1px solid #999;
  }

  .visit-flag {
    background: none;
    border: 1px solid #666;
    color: #000;
  }

  /* A short, ruled area for the office to write in, not the five full lines
     of the screen card. On a full card the notes are the first thing that
     would spill onto a second page, and a half-drawn ruled area across a page
     break is worse than none, so the space for it comes out of the print
     layout rather than pushing the questions onto a second sheet. */
  .visit-lines .visit-line:nth-child(n + 4) {
    display: none;
  }

  .visit-line {
    height: 20px;
  }

  /* The one-page fitter marks a part for trimming by setting data-fit-trim="1"
     on it, only when it measured the card as too tall for the sheet. A trimmed
     part is hidden on paper but never on screen, and only the notes area and
     the support list are ever eligible, so the answers, the options, the
     questions and the review wording always survive to paper. */
  @media print {
    [data-fit-part][data-fit-trim="1"] {
      display: none;
    }
  }
}

/* -- Saved plans -- */

.plans-list,
.plans-compare {
  margin: 0 0 var(--space-5);
}

.plans-heading {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 var(--space-3);
}

.plans-cards {
  list-style: none;
  margin: 0;
  padding: 0;
}

.plan-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin: 0 0 var(--space-4);
}

.plan-card.is-chosen {
  border-color: var(--color-accent);
  border-width: 2px;
  padding: calc(var(--space-4) - 1px);
}

/* The note a farmer keeps after the visit. Plain text, saved on request. */
.plan-notes {
  margin: 0.9rem 0 0.5rem;
}

.plan-notes-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.plan-notes textarea {
  width: 100%;
  min-height: 4.5rem;
  padding: 0.6rem;
  border: 1px solid #9a9585;
  border-radius: 6px;
  background: #fffdf7;
  color: #26231c;
  font: inherit;
  line-height: 1.45;
}

.plan-notes textarea:focus {
  outline: 3px solid #2f5d3a;
  outline-offset: 1px;
}

.plan-card h3 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 var(--space-2);
}

.plan-meta,
.plan-lead {
  margin: 0 0 var(--space-2);
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

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

.plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.plan-actions .btn {
  flex: 1 1 auto;
}

/* -- The name of the plan being edited, on the results screen -- */

.plan-name-tag {
  margin: 0 0 var(--space-4);
  padding: var(--space-2) var(--space-3);
  background: var(--color-accent-soft);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

/* -- Home screen offline card -- */

.home-offline {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin: 0 0 var(--space-5);
}

.home-offline h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.home-offline p {
  margin: 0 0 var(--space-3);
  font-size: 0.95rem;
}

.home-offline .hint {
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

/* -- Offline guidance panel -- */

/* A calm panel, not an error. The point is to answer "what can I still do",
   so the half that works comes first and the single item that does not is
   kept small and unalarming. The tint only deepens when the device is
   genuinely offline, which is the moment it earns the attention. */
.offline-panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-alt);
  padding: var(--space-4);
  margin: var(--space-3) 0;
}

.offline-panel.is-offline {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
}

.offline-panel-state {
  margin: 0 0 var(--space-3);
  font-weight: 700;
}

.offline-panel-cols {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 560px) {
  .offline-panel-cols {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
  }
}

.offline-panel-col h3 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-2);
}

.offline-works,
.offline-needs {
  margin: 0;
  padding-left: 1.3em;
  font-size: 0.92rem;
}

.offline-works li {
  margin: 0 0 var(--space-1);
}

.offline-needs li {
  margin: 0 0 var(--space-2);
}

.offline-needs strong {
  display: block;
}

@media (max-width: 520px) {
  .visit-answers {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .visit-answers dt {
    margin-top: var(--space-2);
  }

  .plan-actions .btn {
    flex: 1 1 100%;
  }
}

/* The honest gap state. Used when the catalogue has no entries for an
   altitude zone: it should read as an answer, not as an empty list. */
.zone-gap {
  margin: 1.5rem 0;
  padding: 1.15rem 1.25rem;
  border: 1px solid #b9892f;
  border-radius: 12px;
  background: #fdf6e7;
}

.zone-gap h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

.zone-gap h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.checklist-plain {
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.15rem;
}

.checklist-plain li {
  margin-bottom: 0.4rem;
}

/* Source tags under an option. The label is the institution; the sentence
   beside it says exactly what that document supports, so a tag cannot be read
   as a general endorsement of the option. */
.source-tags {
  margin: 0.4rem 0 0.6rem;
  padding-left: 1.1rem;
}

.source-tags li {
  margin-bottom: 0.45rem;
  line-height: 1.45;
}

.source-tags a {
  font-weight: 600;
}

.source-for {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.85rem;
  color: #4a4a42;
}

/* How old a document is, and what it covers. Set on its own line so a long
   label never squeezes the sentence it belongs to, and dark enough to read on
   a phone in daylight. */
.source-scope {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid #8a7a52;
  border-radius: 999px;
  background: #f4efe0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #3d3320;
}

.visit-option-meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  color: #4a4a42;
}

/* Per-entry officer review badge. Small on purpose: it is a fact about the
   entry, not a warning competing with the option itself. */
.review-badge {
  margin: 0.35rem 0 0.6rem;
  font-size: 0.82rem;
  line-height: 1.4;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  display: inline-block;
}

.review-badge-not {
  background: #f4efe2;
  border: 1px solid #c9b98d;
  color: #544a2c;
}

.review-badge-reviewed {
  background: #e8f0e6;
  border: 1px solid #8ba17f;
  color: #2f4a2c;
}

.visit-review {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #5a5a50;
}

/* Shown while a translation has not been checked by a native speaker. It sits
   above everything and is not dismissible: it is a statement about the words
   on the screen, not a tip. */
.translation-notice {
  padding: 0.7rem 1rem;
  background: #fdf6e7;
  border-bottom: 1px solid #b9892f;
  color: #4a3a12;
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
}

/* Urdu. Nastaliq if the device has it, a readable Naskh fallback otherwise.
   Line height is larger because the script needs the vertical room. */
[lang="ur"] {
  font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Segoe UI", Tahoma, sans-serif;
  line-height: 1.9;
}

[dir="rtl"] body {
  text-align: right;
}

[dir="rtl"] .site-header .logo,
[dir="rtl"] .nav-menu {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-menu {
  padding-right: 0;
}

[dir="rtl"] .checklist,
[dir="rtl"] .checklist-plain,
[dir="rtl"] .source-tags,
[dir="rtl"] .visit-support,
[dir="rtl"] .office-list {
  padding-right: 1.2rem;
  padding-left: 0;
}

[dir="rtl"] .field,
[dir="rtl"] .option-card,
[dir="rtl"] .visit-card,
[dir="rtl"] .screen-intro,
[dir="rtl"] .hero {
  text-align: right;
}

[dir="rtl"] .progress-fill {
  margin-left: auto;
}

/* Catalogue prose stays left to right even in an RTL interface: it is English
   text, and mirroring English is harder to read, not easier. */
[dir="rtl"] .option-card p,
[dir="rtl"] .option-card li,
[dir="rtl"] .visit-card p,
[dir="rtl"] .visit-card li {
  direction: ltr;
  text-align: right;
}

/* Questions grouped under the option they belong to. This is the order the
   conversation happens in, so the grouping is functional, not decorative. */
.visit-option-questions {
  margin: 0.5rem 0 0.9rem;
}

.visit-option-questions h4 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.visit-doc-list {
  margin: 0.3rem 0 0.6rem;
  padding-left: 1.15rem;
}

.visit-doc-list li {
  margin-bottom: 0.35rem;
  line-height: 1.45;
}

/* The optional field-test questions. Visually quieter than the card, because
   the card is the artefact and this is a favour the farmer is doing us. */
.feedback-block {
  margin: 1.75rem 0;
  padding: 1.1rem 1.2rem;
  border: 1px dashed #9a9a88;
  border-radius: 10px;
  background: #faf8f2;
}

.feedback-block h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.feedback-question {
  border: 0;
  padding: 0;
  margin: 0 0 1rem;
}

.feedback-question legend {
  font-weight: 600;
  margin-bottom: 0.4rem;
  padding: 0;
}

.feedback-form textarea {
  width: 100%;
  font: inherit;
  padding: 0.6rem;
  border: 1px solid #8a8a7a;
  border-radius: 8px;
  min-height: 4.5rem;
}

/* ------------------------------------------------------------------
   Phone reality.

   The field-test phone is a 360px Android in daylight, held in one hand,
   often while standing. Three target sizes were still under the 48px the
   brief asks for, and a few blocks were padded for a desk. Nothing here
   changes the layout above 480px.
   ------------------------------------------------------------------ */

#lang-select,
.nav-toggle,
.btn-quiet {
  min-height: 48px;
}

.nav-toggle {
  width: 48px;
  height: 48px;
}

/* A line of text that happens to be a link is not a tap target in the same
   sense as a button; a link styled as one still is, and .btn already covers
   it. This only lifts the controls that were genuinely too small. */

@media (max-width: 480px) {
  .container {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }

  .hero h1,
  .screen-title {
    font-size: clamp(1.55rem, 7.5vw, 2rem);
    line-height: 1.2;
  }

  .hero-lead,
  .screen-intro {
    font-size: 1rem;
  }

  .option-card,
  .checklist-card,
  .schemes-card,
  .summary-strip,
  .feedback-block {
    padding: var(--space-4);
  }

  .btn {
    padding: 0 var(--space-4);
  }

  /* Long words, URLs and Urdu do not always break where a desk layout
     expects. Break inside a word only when there is no other way. */
  .option-card,
  .visit-card,
  .checklist-card,
  .schemes-card,
  .summary-card {
    overflow-wrap: break-word;
  }

  .compare-table {
    min-width: 420px;
    font-size: 0.9rem;
  }

  .provenance-item,
  .provenance-compact .provenance-item {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Motion here is decoration: the progress bar eases, banners slide in, the
   menu animates. A person who has told their phone to reduce motion still
   needs every word, so the movement goes and the information stays. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* The district land reference. It is background, not advice, so it reads as a
   quiet data card: no accent border, no call to action, and the caveat sits
   above the detail rather than under it. */
.land-card {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin: var(--space-4) 0 var(--space-5);
}

.land-card h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.land-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: var(--space-4) 0 var(--space-2);
}

.land-card p {
  margin: 0 0 var(--space-3);
  font-size: 0.92rem;
}

.land-caveat {
  border-left: 3px solid var(--color-border);
  padding-left: var(--space-3);
  color: var(--color-text-muted);
}

.land-facts {
  display: grid;
  grid-template-columns: minmax(6rem, 8rem) 1fr;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  font-size: 0.92rem;
}

.land-facts dt {
  font-weight: 700;
  color: var(--color-text-muted);
}

.land-facts dd {
  margin: 0;
}

.land-card ul {
  margin: 0 0 var(--space-3);
  padding-left: 1.1rem;
  font-size: 0.92rem;
}

.land-sources {
  margin-top: var(--space-3);
  font-size: 0.85rem;
}

.land-sources summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
}

@media print {
  .land-card {
    break-inside: avoid;
  }
}

/* Photos of the plot, kept with the plan and printed under the card. */
.visit-photos {
  margin: var(--space-4) 0 0;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
}

.visit-photos-title {
  margin: 0 0 var(--space-2);
  font-size: 1.05rem;
}

.visit-photos-note {
  margin: 0 0 var(--space-3);
  font-size: 0.9rem;
}

.photo-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.photo-slot {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.photo-slot-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.photo-slot-empty,
.photo-slot-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #f1eee4;
}

.photo-slot-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  font-size: 0.8rem;
  text-align: center;
}

.photo-slot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.photo-slot-actions .btn {
  min-height: 40px;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
}

@media (max-width: 560px) {
  .photo-slots {
    grid-template-columns: 1fr;
  }
}

@media print {
  .visit-photos {
    break-inside: avoid;
    padding: 0;
    border: 0;
  }

  .visit-photos .photo-slots {
    grid-template-columns: repeat(3, 1fr);
  }

  .visit-photos .photo-slot-img {
    max-height: 45mm;
    aspect-ratio: auto;
  }

  .visit-photos .photo-slot-empty {
    display: none;
  }
}

/* The timeline under the card. Screen only: the printed sheet keeps the three
   card shots, so adding a state does not change what an officer receives. */
.photo-timeline {
  margin: var(--space-4) 0 0;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.photo-timeline-title {
  margin: 0 0 var(--space-2);
  font-size: 0.95rem;
}

.photo-timeline-note {
  margin: 0 0 var(--space-3);
  font-size: 0.85rem;
}

.photo-timeline-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.photo-timeline-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.photo-timeline-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.photo-timeline-thumb {
  flex: 0 0 84px;
  width: 84px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #f1eee4;
}

.photo-timeline-body {
  flex: 1 1 auto;
  min-width: 0;
}

.photo-timeline-meta {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.photo-timeline-note {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.photo-timeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.photo-timeline-note-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.photo-timeline-note-form input {
  flex: 1 1 8rem;
  min-width: 0;
  min-height: 40px;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font: inherit;
  font-size: 0.9rem;
}

.photo-compare {
  margin: 0 0 var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
}

.photo-compare-title {
  margin: 0 0 var(--space-2);
  font-size: 0.9rem;
}

.photo-compare-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.photo-compare-figure {
  margin: 0;
}

.photo-compare-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #f1eee4;
}

.photo-compare-caption {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

/* The description block. It states what is not connected before it offers a
   switch, so the choice is never mistaken for a feature. */
.photo-observe {
  margin: var(--space-4) 0 0;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.photo-observe-title {
  margin: 0 0 var(--space-2);
  font-size: 0.95rem;
}

.photo-observe-note {
  margin: 0 0 var(--space-2);
  font-size: 0.85rem;
}

.photo-observe-consent {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin: 0 0 var(--space-3);
  font-size: 0.9rem;
}

.photo-observe-consent input {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
}

.photo-observe #btn-observe-try {
  min-height: 48px;
}

.land-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
}

.land-chip {
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.land-chip:hover,
.land-chip:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.land-card h2:focus {
  outline: none;
}

.land-copy {
  min-height: 44px;
  margin: 0 0 var(--space-3);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.land-copy:hover,
.land-copy:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.land-details {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-2);
}

.land-summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
}

.land-summary::marker {
  color: var(--color-accent);
}

.land-summary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* The chips and the copy button changed border and colour on focus, which is
   visible but weaker than the ring every other control gets. Keyboard focus
   should look the same wherever it lands. */
.land-chip:focus-visible,
.land-copy:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* The skip link is the first thing a keyboard user needs, so it gets the ring
   whether or not the browser decides the focus came from the keyboard. */
.skip-link:focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* Jumping to another district replaces the card, so focus moves to its heading
   to tell a keyboard or screen-reader user that the content changed. A heading
   is not focusable by default, hence tabindex="-1" in the panel; this is the
   only rule that needs to show where the reader has landed. */
#land-preview h2:focus,
#about-village h2:focus {
  outline: 3px solid #1f4d1f;
  outline-offset: 4px;
  border-radius: 4px;
}

/* The card's actions sit side by side on a wide screen and stack on a narrow
   one. Each keeps a 44px target, because these are the controls a farmer taps
   one-handed while standing in a field. */
.land-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.land-actions > button {
  min-height: 44px;
}

/* Tehsil names are reference text, not controls, so they wrap as small chips
   rather than a list that pushes the card down a screen. */
.land-tehsils {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.land-tehsils li {
  padding: 4px 9px;
  border: 1px solid #cfd8cf;
  border-radius: 999px;
  font-size: 14px;
}

/* A newer version is waiting. Shown instead of reloading under someone who is
   midway through a plan, a photo or a print. */
.update-strip {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-3);
  padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12);
}

.update-strip p {
  margin: 0;
  font-size: 0.9rem;
}

.update-strip .btn {
  min-height: 48px;
}

/* Timeline actions are three small buttons beside a thumbnail. The default
   button padding widened them enough to wrap one per line. */
.photo-timeline-actions .btn {
  flex: 0 0 auto;
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
}

/* In Urdu the page is right to left, and English prose is still shown in
   several places (the About panel, the offline list, this app's own
   explanations). Without this, a full stop at the end of an English sentence
   is drawn at the start of the line. `plaintext` lets each paragraph take its
   direction from its own first strong letter, so English reads left to right
   and Urdu right to left in the same document. */
[dir="rtl"] p,
[dir="rtl"] li,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4 {
  unicode-bidi: plaintext;
}
