/* GrønThy: a daily check-in app for a social farm in Thy.
   The app screens on the project page are built live in HTML from the prototype's own look
   (deep field green, leaf green, serif headings, Poppins text), so the check-in actually works.
   The case study below has its own look: a growing season told as field notes. */

/* ---------- Project theme ---------- */
.t-gronthy { --idr: #1e8a42; --idr-ink: #ffffff; --band: #12542a; --accent-hover: #17602f; }
.t-gronthy .pj-hero { background: var(--band); }
.t-gronthy .btn-red { background: #1e7a3c; color: #fff; }
.t-gronthy .btn-red:hover { background: var(--accent-hover); }
.t-gronthy .pj-outcome-list .k { color: #7cc47f; }
[data-theme="light"] .t-gronthy { --idr: #1a7a3a; }
[data-theme="light"] .t-gronthy .pj-outcome-list .k { color: #1a7a3a; }

/* ---------- Tokens ---------- */
.gt, .gt-case {
  --gt-field: #185a30;   /* deep field green: headers, primary buttons */
  --gt-leaf: #66a23c;    /* leaf green: secondary buttons, highlights */
  --gt-green: #1e8a42;   /* signal green: active states */
  --gt-mint: #e8f2e3;    /* soft green surfaces */
  --gt-ink: #1f2a22;
  --gt-ink-2: #5b665d;
  --gt-line: #e3e8e0;
  --gt-soil: #6b4a2b;
  --gt-sun: #f2c14e;
  --gt-serif: "Merriweather", Georgia, serif;
  --gt-sans: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --gt-mono: "IBM Plex Mono", ui-monospace, monospace;
}

/* ---------- Live phone screens ---------- */
.pj-phone:has(.gt-screen) { container-type: inline-size; }
.gt-screen {
  position: relative; display: flex; flex-direction: column; aspect-ratio: 9 / 19.5; overflow: hidden;
  border-radius: clamp(14px, 2.1vw, 26px); background: #fff; color: var(--gt-ink);
  font-family: var(--gt-sans); font-size: 5.6cqw; line-height: 1.35; text-align: left;
}
.gt-btn svg { flex: none; width: 1.3em; height: 1.3em; }
.gt-screen * { box-sizing: border-box; }
.gt-sb { display: flex; justify-content: space-between; align-items: center; padding: 0.9em 1.5em 0.4em; font-size: 0.7em; font-weight: 600; }
.gt-sb i { width: 2.4em; height: 0.9em; border-radius: 0.3em; border: 0.12em solid currentColor; position: relative; }
.gt-sb i::after { content: ""; position: absolute; inset: 0.12em 0.5em 0.12em 0.12em; background: currentColor; border-radius: 0.1em; }
.gt-back { display: flex; align-items: center; gap: 0.4em; padding: 0.4em 1.2em; font-family: var(--gt-serif); font-weight: 700; font-size: 0.78em; }
.gt-back::before { content: ""; width: 0.5em; height: 0.5em; border-left: 0.14em solid currentColor; border-bottom: 0.14em solid currentColor; transform: rotate(45deg); }
.gt-body { flex: 1; min-height: 0; overflow: hidden; padding: 0.6em 1.2em 0.6em; display: flex; flex-direction: column; gap: 0.7em; }
.gt-h { font-family: var(--gt-serif); font-weight: 700; font-size: 1.25em; line-height: 1.25; color: var(--gt-ink); }
.gt-h.is-sm { font-size: 0.95em; }
.gt-p { font-size: 0.72em; line-height: 1.5; color: var(--gt-ink-2); }
.gt-meta { font-size: 0.62em; color: var(--gt-ink-2); }
.gt-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.4em; width: 100%; min-height: 2.3em; padding: 0.4em 0.8em;
  border: 0; border-radius: 0.45em; background: var(--gt-field); color: #fff; font: 600 0.72em/1.2 var(--gt-sans); cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
}
.gt-btn:hover { background: #12482a; }
.gt-btn:active { transform: scale(0.98); }
.gt-btn.is-leaf { background: var(--gt-leaf); }
.gt-btn.is-leaf:hover { background: #568c31; }
.gt-btn.is-line { background: #fff; color: var(--gt-field); box-shadow: inset 0 0 0 0.14em var(--gt-field); }
.gt-btn[aria-pressed="true"] { background: var(--gt-green); }
.gt-nav { display: flex; justify-content: space-around; padding: 0.7em 1em 1.1em; border-top: 1px solid var(--gt-line); margin-top: auto; }
.gt-nav i { width: 1.1em; height: 1.1em; border-radius: 0.3em; border: 0.13em solid #9aa59c; }
.gt-nav i.is-on { border-color: var(--gt-green); background: var(--gt-green); }

/* Energy check-in */
.gt-energy { display: grid; gap: 0.55em; }
.gt-energy button {
  display: flex; align-items: center; gap: 0.7em; width: 100%; padding: 0.75em 0.9em; border: 0.12em solid var(--gt-line); border-radius: 0.6em;
  background: #fff; color: var(--gt-ink); font: 600 0.8em/1.2 var(--gt-sans); cursor: pointer; text-align: left; transition: border-color 0.2s, background-color 0.2s;
}
.gt-energy button::before { content: ""; flex: none; width: 1em; height: 1em; border-radius: 50%; border: 0.14em solid #b5bfb6; background: #fff; transition: inherit; }
.gt-energy button span { margin-left: auto; font-weight: 400; font-size: 0.82em; color: var(--gt-ink-2); }
.gt-energy button:hover { border-color: var(--gt-leaf); }
.gt-energy button[aria-pressed="true"] { border-color: var(--gt-green); background: var(--gt-mint); }
.gt-energy button[aria-pressed="true"]::before { border-color: var(--gt-green); background: radial-gradient(circle, var(--gt-green) 0 45%, #fff 50%); }
.gt-note { display: flex; gap: 0.5em; align-items: flex-start; padding: 0.6em 0.7em; border-radius: 0.5em; background: var(--gt-mint); font-size: 0.64em; line-height: 1.45; color: var(--gt-field); }

/* Home: green header, stamp in, tasks */
.gt-top { background: var(--gt-field); color: #fff; padding-bottom: 1em; }
.gt-top .gt-sb { color: #fff; }
.gt-hello { display: flex; align-items: center; gap: 0.6em; padding: 0.3em 1.2em 0.8em; }
.gt-avatar { flex: none; display: grid; place-items: center; width: 2.2em; height: 2.2em; border-radius: 50%; background: var(--gt-leaf); color: #fff; font: 700 0.8em/1 var(--gt-serif); }
.gt-hello small { display: block; font-size: 0.6em; opacity: 0.8; }
.gt-hello b { font-family: var(--gt-serif); font-size: 0.9em; }
.gt-next { margin: 0 1.2em 0.7em; padding: 0.6em 0.7em; border-radius: 0.55em; background: #fff; color: var(--gt-ink); display: grid; grid-template-columns: 2em 1fr; gap: 0.1em 0.6em; align-items: center; }
.gt-next .gt-veg { grid-row: span 2; }
.gt-next b { font-size: 0.68em; }
.gt-top .gt-btn { width: auto; margin: 0 1.2em; background: transparent; box-shadow: inset 0 0 0 0.12em #fff; }
.gt-top .gt-btn[aria-pressed="true"] { background: var(--gt-leaf); box-shadow: none; }
.gt-row { display: flex; justify-content: space-between; align-items: baseline; }
.gt-tasks { display: grid; gap: 0.45em; }
.gt-tasks li { display: grid; grid-template-columns: 2em 1fr auto; gap: 0.6em; align-items: center; padding: 0.5em 0.6em; border-radius: 0.55em; background: #fff; box-shadow: 0 0.15em 0.6em rgba(24, 90, 48, 0.12); animation: gt-in 0.35s var(--ease-out, ease) both; }
.gt-tasks li[hidden] { display: none; }
.gt-tasks b { display: block; font-size: 0.66em; line-height: 1.3; }
.gt-tasks small { font-size: 0.56em; color: var(--gt-ink-2); }
@keyframes gt-in { from { opacity: 0; transform: translateY(0.4em); } }
.gt-lvl { padding: 0.25em 0.55em; border-radius: 99em; font-size: 0.52em; font-weight: 600; background: var(--gt-mint); color: var(--gt-field); white-space: nowrap; }
.gt-lvl.is-2 { background: #fbefcf; color: #6b4a12; }
.gt-lvl.is-3 { background: #f6dccd; color: #7a3416; }
.gt-veg { display: grid; place-items: center; width: 2em; height: 2em; border-radius: 0.5em; background: var(--gt-mint); color: var(--gt-field); }
.gt-veg svg { width: 1.3em; height: 1.3em; }

/* Task detail */
.gt-hero-ill { display: grid; place-items: center; height: 7.5em; margin: 0 1.2em; border-radius: 0.8em; background: var(--gt-mint); color: var(--gt-field); }
.gt-hero-ill svg { width: 5em; height: 5em; }
.gt-status { display: inline-flex; align-items: center; gap: 0.35em; font-size: 0.62em; color: var(--gt-green); font-weight: 600; }
.gt-status::before { content: ""; width: 0.6em; height: 0.6em; border-radius: 50%; background: currentColor; }
.gt-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4em; }
.gt-chips span { display: grid; gap: 0.15em; justify-items: center; padding: 0.5em 0.3em; border-radius: 0.5em; background: var(--gt-leaf); color: #fff; font-size: 0.56em; text-align: center; }
.gt-chips b { font-size: 1.3em; }

/* Field map */
.gt-map { position: relative; flex: 1; min-height: 0; margin: 0 -1.2em; background: #dfe9d3; overflow: hidden; }
.gt-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gt-map-card { position: absolute; left: 0.8em; right: 0.8em; bottom: 0.8em; padding: 0.7em 0.8em; border-radius: 0.7em; background: #fff; box-shadow: 0 0.3em 1em rgba(0, 0, 0, 0.18); display: grid; gap: 0.4em; }

/* Contact */
.gt-gitte { display: grid; justify-items: center; gap: 0.3em; padding: 0.6em 0; text-align: center; }
.gt-gitte .gt-avatar { width: 4.2em; height: 4.2em; font-size: 1.1em; background: var(--gt-field); }
.gt-hours { text-align: center; font-size: 0.66em; color: var(--gt-ink-2); }
.gt-hours b { display: block; font-family: var(--gt-serif); font-size: 1.5em; color: var(--gt-ink); }

/* Profile pills */
.gt-pills { display: grid; gap: 0.4em; margin: 0 1.2em; }
.gt-pills div { display: flex; justify-content: space-between; align-items: center; padding: 0.45em 0.6em; border-radius: 0.45em; background: #fff; color: var(--gt-ink); font-size: 0.6em; }
.gt-pills span { padding: 0.15em 0.6em; border-radius: 0.3em; background: var(--gt-leaf); color: #fff; font-weight: 600; }
.gt-pills span.is-sun { background: #c59a2a; }
.gt-shift { display: flex; justify-content: space-between; font-size: 0.6em; padding: 0.35em 0; border-bottom: 1px solid var(--gt-line); }
.gt-shift em { font-style: normal; color: var(--gt-green); font-weight: 600; }

/* Guide for other farms */
.gt-model-mini { display: grid; place-items: center; height: 7em; border-radius: 0.7em; background: #f4f2ea; color: var(--gt-field); }
.gt-model-mini svg { width: 9em; height: 6.4em; }
.gt-video { position: relative; height: 5.2em; border-radius: 0.6em; background: linear-gradient(135deg, #3d6b3f, #8fb46a); display: grid; place-items: center; }
.gt-video::after { content: ""; width: 2.2em; height: 1.5em; border-radius: 0.4em; background: #e02d2d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M3.5 2.5l4 2.5-4 2.5z' fill='%23fff'/%3E%3C/svg%3E") center / 60% no-repeat; }
.gt-post { display: grid; gap: 0.3em; padding: 0.6em 0.7em; border-radius: 0.6em; border: 1px solid var(--gt-line); }
.gt-post b { font-family: var(--gt-serif); font-size: 0.72em; }

/* Panels that hold live screens on the project page */
.pj-panel.gt-live { background: #e9efe3; }
[data-theme="light"] .pj-panel.gt-live { background: #e4ecdd; }
.gt-live .pj-phone { box-shadow: 0 30px 60px -30px rgba(18, 84, 42, 0.55); }
.gt-hint { display: block; margin-top: 14px; font-family: var(--gt-sans); font-size: 13px; color: var(--fg-3); }

/* ======================================================================
   Case study: a growing season, told as field notes
   ====================================================================== */
.gtc-hero { position: relative; overflow: hidden; border-radius: 20px; background: #12321f; color: #f3efe4; padding: clamp(28px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: clamp(24px, 5vw, 72px); align-items: end; }
.gtc-logo { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 24px; border-radius: 16px; background: #f3efe4; }
.gtc-logo img { width: 46px; height: auto; }
.gtc-hero h1 { font-family: var(--gt-serif); font-weight: 900; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.375rem); line-height: 1.12; letter-spacing: 0; max-width: 19ch; color: #fff; text-wrap: balance; }
.gtc-lede { margin-top: 20px; font-family: var(--gt-sans); font-size: 1.0625rem; line-height: 1.7; color: #d9e4d3; }
.gtc-facts { display: grid; font-family: var(--gt-sans); }
.gtc-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid rgba(243, 239, 228, 0.2); font-size: 14px; }
.gtc-facts div:last-child { border-bottom: 1px solid rgba(243, 239, 228, 0.2); }
.gtc-facts dt { color: #a9c79a; }
.gtc-facts dd { color: #fff; text-align: right; }

/* The season: five growth stages */
.gtc-season { margin-top: clamp(28px, 4vw, 44px); }
.gtc-season ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.gtc-season a { display: grid; gap: 8px; justify-items: start; padding: 16px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--fg) 14%, transparent); color: var(--fg); text-decoration: none; transition: border-color 0.2s, background-color 0.2s; }
.gtc-season a:hover { border-color: var(--gt-leaf); background: color-mix(in srgb, var(--gt-leaf) 10%, transparent); }
.gtc-season svg { width: 34px; height: 34px; color: var(--gt-leaf); }
.gtc-season span { font-family: var(--gt-mono); font-size: 12px; color: var(--fg-3); }
.gtc-season b { font-family: var(--gt-serif); font-weight: 700; font-size: 15px; line-height: 1.35; }

/* Stage sections */
.gtc-body { padding-bottom: clamp(48px, 7vw, 96px); }
.gtc-stage { padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid color-mix(in srgb, var(--fg) 12%, transparent); scroll-margin-top: 80px; display: grid; gap: 28px; }
.gtc-stage-head { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 20px; align-items: center; }
.gtc-glyph { grid-row: span 2; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--gt-field); color: #cfe6bf; }
.gtc-glyph svg { width: 32px; height: 32px; }
.gtc-kicker { font-family: var(--gt-mono); font-size: 13px; color: var(--gt-leaf); }
.gtc-stage h2 { font-family: var(--gt-serif); font-weight: 700; font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.5rem); line-height: 1.2; letter-spacing: 0; max-width: 24ch; color: var(--fg); text-wrap: balance; }
.gtc-stage > p { font-family: var(--gt-sans); font-size: 1rem; line-height: 1.75; color: var(--fg-2); }
.gtc-stage > p + p { margin-top: -12px; }
.gtc-fig { margin: 0; }
.gtc-fig img { width: 100%; height: auto; border-radius: 12px; background: #fff; }
.gtc-fig figcaption { margin-top: 12px; font-family: var(--gt-sans); font-size: 13px; line-height: 1.5; color: var(--fg-3); }
.gtc-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }

/* Interview as transcript excerpts, with the line numbers from the transcript */
.gtc-transcript { display: grid; gap: 14px; }
.gtc-interview { display: grid; gap: 16px; }
.gtc-pick { font-family: var(--gt-sans); font-size: 14px; color: var(--fg-3); }
.gtc-line { margin: 0; max-width: none; padding: 20px 24px; animation: gt-in 0.35s var(--ease-out, ease) both; border-radius: 12px; background: #f3efe4; color: #2a2a22; border-left: 4px solid var(--gt-leaf); }
.gtc-line .ln { font-family: var(--gt-mono); font-size: 12px; color: #7a7a6a; padding-top: 4px; }
.gtc-line p { font-family: var(--gt-serif); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem); line-height: 1.6; }
.gtc-line cite { display: block; margin-top: 8px; font-family: var(--gt-sans); font-style: normal; font-size: 13px; color: #6b6b5b; }
.gtc-line.is-sticky-note { border-left-color: var(--gt-sun); }
.gtc-line[hidden] { display: none; }

/* Open coding: filter the quotes by theme */
.gtc-codes { display: flex; flex-wrap: wrap; gap: 8px; }
.gtc-codes button { padding: 9px 16px; border-radius: 999px; border: 0; background: var(--c); color: #2a2a22; font: 500 14px/1.2 var(--gt-sans); cursor: pointer; opacity: 0.55; transition: opacity 0.2s, box-shadow 0.2s; }
.gtc-codes button:hover { opacity: 0.85; }
.gtc-codes button[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--fg); }
.gtc-line .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.gtc-line .tags i { padding: 2px 8px; border-radius: 999px; background: var(--c); font-family: var(--gt-sans); font-style: normal; font-size: 11px; color: #2a2a22; }

/* Value mapping */
.gtc-value { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gtc-value > div { padding: 22px 20px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--fg) 14%, transparent); font-family: var(--gt-sans); }
.gtc-value h3 { font-family: var(--gt-serif); font-weight: 700; font-size: 17px; color: var(--fg); }
.gtc-value ul { margin-top: 12px; display: grid; gap: 8px; }
.gtc-value li { position: relative; padding-left: 18px; font-size: 14px; line-height: 1.55; color: var(--fg-2); }
.gtc-value li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--gt-leaf)); }
.gtc-value .is-missed { --dot: #c9834f; }
.gtc-value .is-opp { background: var(--gt-field); border-color: transparent; --dot: var(--gt-sun); }
.gtc-value .is-opp h3, .gtc-value .is-opp li { color: #f3efe4; }

/* From the greenhouse model to the app */
.gtc-map { display: grid; gap: 0; border-radius: 14px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--fg) 14%, transparent); }
.gtc-map li { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1.3fr); gap: 16px; align-items: center; padding: 16px 20px; font-family: var(--gt-sans); }
.gtc-map li + li { border-top: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); }
.gtc-map b { font-family: var(--gt-serif); font-weight: 700; font-size: 16px; color: var(--fg); }
.gtc-map li > span:first-of-type { font-size: 13px; color: var(--fg-3); }
.gtc-map .arr { width: 28px; height: 2px; background: var(--gt-leaf); position: relative; }
.gtc-map .arr::after { content: ""; position: absolute; right: 0; top: -4px; width: 8px; height: 8px; border-top: 2px solid var(--gt-leaf); border-right: 2px solid var(--gt-leaf); transform: rotate(45deg); }
.gtc-map p { font-size: 14px; line-height: 1.55; color: var(--fg-2); }
.gtc-map .model { display: grid; gap: 2px; }

/* Input, activity, output */
.gtc-chain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: s; }
.gtc-chain li { position: relative; padding: 22px 28px 22px 20px; background: #f3efe4; color: #2a2a22; font-family: var(--gt-sans); clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%, 18px 50%); }
.gtc-chain li:first-child { clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%); border-radius: 12px 0 0 12px; }
.gtc-chain li:last-child { background: var(--gt-field); color: #f3efe4; }
.gtc-chain li + li { margin-left: -6px; padding-left: 34px; }
.gtc-chain b { display: block; font-family: var(--gt-mono); font-size: 12px; font-weight: 500; opacity: 0.75; }
.gtc-chain span { display: block; margin-top: 6px; font-size: 14px; line-height: 1.55; }

/* Leverage points */
.gtc-levers { display: grid; gap: 6px; }
.gtc-levers li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 14px 18px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--fg) 12%, transparent); font-family: var(--gt-sans); }
.gtc-levers .n { font-family: var(--gt-mono); font-size: 20px; font-weight: 700; color: var(--gt-leaf); }
.gtc-levers b { font-family: var(--gt-serif); font-weight: 700; font-size: 16px; color: var(--fg); }
.gtc-levers p { margin-top: 4px; font-size: 14px; line-height: 1.55; color: var(--fg-2); }
.gtc-levers li.is-deep { background: color-mix(in srgb, var(--gt-leaf) 12%, transparent); border-color: transparent; }

/* Next season */
.gtc-next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gtc-next li { padding: 22px 20px; border-radius: 14px; background: #f3efe4; color: #2a2a22; font-family: var(--gt-sans); }
.gtc-next svg { width: 28px; height: 28px; color: var(--gt-field); margin-bottom: 12px; }
.gtc-next b { display: block; font-family: var(--gt-serif); font-weight: 700; font-size: 17px; line-height: 1.35; }
.gtc-next p { margin-top: 8px; font-size: 14px; line-height: 1.65; color: #4d4d40; }

.gt-case .case-end { margin-top: 8px; }

@media (max-width: 900px) {
  .gtc-hero { grid-template-columns: 1fr; }
  .gtc-season ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gtc-value, .gtc-next, .gtc-pair { grid-template-columns: 1fr; }
  .gtc-chain { grid-template-columns: 1fr; gap: 6px; }
  .gtc-chain li, .gtc-chain li:first-child { clip-path: none; border-radius: 12px; }
  .gtc-chain li + li { margin-left: 0; padding-left: 20px; }
}
@media (max-width: 600px) {
  .gtc-season ol { grid-template-columns: 1fr 1fr; }
  .gtc-map li { grid-template-columns: 1fr; gap: 6px; }
  .gtc-map .arr { transform: rotate(90deg); margin: 4px 0 4px 8px; }
}
@media (prefers-reduced-motion: reduce) { .gt-tasks li { animation: none; } }
