/*
 * Tuinboek: prototype of design direction A (issue #56, docs/design/principes.md).
 * Everything is scoped to body.preview so the existing screens keep their look.
 * Rows instead of cards, colour only for urgency, Gedaan on the right.
 */

@font-face {
  font-family: Newsreader;
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/newsreader-latin-ext-8661244e.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Newsreader;
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/newsreader-latin-dd08b472.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/atkinson-hyperlegible-latin-ext-400-6592975a.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/atkinson-hyperlegible-latin-400-6ec68adf.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/atkinson-hyperlegible-latin-ext-700-7e26211f.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/atkinson-hyperlegible-latin-700-00cbe79e.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body.preview {
  --pv-ground: #FCFCFA;
  --pv-ink: #16201A;
  --pv-ink-soft: #3F4741;
  --pv-muted: #5E655F;
  --pv-rule: #E3E4DF;
  --pv-rule-soft: #EEEFEA;
  --pv-quiet: #C9CBC4;
  --pv-urgent: #B4410C;
  --pv-serif: "Newsreader", georgia, serif;
  --pv-sans: "Atkinson Hyperlegible", verdana, sans-serif;
  --pv-bar: 128px;

  margin: 0;
  background: var(--pv-ground);
  color: var(--pv-ink);
  font-family: var(--pv-sans);
  font-size: 16px;
  line-height: 1.45;
}

.preview h1,
.preview h2,
.preview h3 {
  margin: 0;
  font-family: var(--pv-serif);
  font-weight: 500;
}

.preview p { margin: 0; }

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

.pv-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px calc(var(--pv-bar) + 24px + env(safe-area-inset-bottom));
}

.pv-flash:empty { display: none; }

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

.pv-accent,
.pv-urgent { color: var(--pv-urgent); }

.pv-label {
  font-family: var(--pv-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pv-muted);
}

.preview h2.pv-label {
  font-family: var(--pv-sans);
  font-weight: 700;
}

.pv-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 4px;
}

.pv-summary {
  font-size: 29px;
  line-height: 1.22;
  text-wrap: balance;
}

.pv-title {
  font-size: 32px;
  line-height: 1.1;
}

.pv-title--plant {
  font-size: 42px;
  line-height: 1.05;
}

.pv-status { font-size: 17px; }

.pv-tasks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pv-group { padding-top: 16px; }

.pv-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--pv-rule);
}

/* A task: the row opens in place; Gedaan stays on the right, under the thumb. */
.pv-task {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--pv-rule);
  transition: opacity 0.2s ease;
}

.pv-task__body {
  flex: 1;
  min-width: 0;
}

.pv-task__summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 52px;
  list-style: none;
  cursor: pointer;
}

.pv-task__summary::-webkit-details-marker { display: none; }

.pv-task__heading {
  font-size: 21px;
  line-height: 1.2;
}

.pv-task__body[open] .pv-task__heading { font-size: 23px; }

.pv-task__line {
  font-size: 15px;
  color: var(--pv-muted);
}

.pv-task--last-weekend .pv-urgent { font-weight: 700; }

.pv-task__detail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
}

.pv-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
}

.pv-task__actions {
  display: flex;
  gap: 20px;
}

.pv-text-button {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--pv-ink);
  font: inherit;
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.pv-check {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 2px solid var(--pv-quiet);
  border-radius: 50%;
  background: var(--pv-ground);
  color: var(--pv-muted);
  cursor: pointer;
}

.pv-task--closing .pv-check,
.pv-task--last-weekend .pv-check {
  border-color: var(--pv-ink);
  color: var(--pv-ink);
}

.pv-check:focus-visible,
.pv-text-button:focus-visible,
.pv-task__summary:focus-visible {
  outline: 2px solid var(--pv-ink);
  outline-offset: 3px;
}

.pv-text-button:disabled,
.pv-check:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pv-task.is-done { opacity: 0.35; }

.pv-task.is-done .pv-task__heading { text-decoration: line-through; }

.pv-task.is-done .pv-check {
  border-color: var(--pv-ink);
  background: var(--pv-ink);
  color: var(--pv-ground);
}

.pv-later {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pv-later__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pv-supplies {
  color: var(--pv-muted);
  font-size: 15px;
}

.pv-supplies strong {
  color: var(--pv-ink);
  font-weight: 400;
}

/* Plant lookup and plant page */
.pv-lookup {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pv-input {
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--pv-rule);
  border-radius: 26px;
  background: var(--pv-ground);
  color: var(--pv-ink);
  font: inherit;
  font-size: 17px;
}

.pv-plant-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 56px;
  padding: 8px 0;
  border-bottom: 1px solid var(--pv-rule);
  text-decoration: none;
}

.pv-plant-link__name {
  font-family: var(--pv-serif);
  font-size: 20px;
}

.pv-text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--pv-muted);
}

.pv-topbar {
  display: flex;
  justify-content: space-between;
  margin: -16px -8px 0;
}

.pv-topbar .pv-text-link { padding: 0 8px; }

.pv-back {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  text-decoration: none;
}

.pv-head--plant {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--pv-rule);
}

.pv-care {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--pv-rule);
}

.pv-care__text {
  font-family: var(--pv-serif);
  font-size: 23px;
  line-height: 1.3;
}

.pv-camera {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border-radius: 28px;
  background: var(--pv-ink);
  color: var(--pv-ground);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.pv-photo {
  width: 100%;
  border-radius: 12px;
}

.pv-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Bottom bar: search first, under the thumb, then the tabs. */
.pv-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--pv-rule);
  background: var(--pv-ground);
}

.pv-search {
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 608px;
  width: 100%;
  min-height: 52px;
  margin: 0 auto;
  padding: 0 18px;
  border-radius: 26px;
  background: var(--pv-rule-soft);
  color: var(--pv-ink-soft);
  font-size: 17px;
  text-decoration: none;
}

.preview .pv-search { color: var(--pv-ink-soft); }

.pv-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 608px;
  width: 100%;
  margin: 0 auto;
  font-size: 14px;
}

.pv-nav__item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
}

.preview .pv-nav__item { color: var(--pv-muted); }

.preview .pv-nav__item[aria-current="page"] {
  color: var(--pv-ink);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .pv-task { transition: none; }
}

/* ?datum=: the prototype on another day, for testing (Preview::BaseController) */
.pv-other-day {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--pv-rule);
  font-size: 15px;
}

.pv-other-day a { white-space: nowrap; }

.pv-day {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
  font-size: 15px;
}

.pv-day__row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.pv-day__row .pv-input { flex: 1; }
