
  /* Accent colors follow a soil-moisture map: dry soil (ochre) to wet (deep blue). */
  :root {
    --paper: #FFFFFF;
    --surface: #FFFFFF;
    --hover: #F3F5F6;
    --ink: #172026;
    --ink-2: #505B61;
    --line: #DCE1E3;
    --link: #1E5C86;
    --tag-bg: #EDF0F1;
    --r0: #B07A3B; --r1: #CDB47E; --r2: #A9C3AE; --r3: #4F93A3; --r4: #1E5C86;
    --arm: rgba(255,255,255,.8);
    --warn: #D08A12; --warn-ink: #8A5300;
    --new-bg: #DCEAF2; --new-ink: #1E5C86;
    /* Question colors from matplotlib's tab20c: where = blue, when = orange, how much = green.
       Text on each is white or black, whichever the fill needs. */
    --q-where: #3182BD; --q-when: #FD8D3C; --q-how: #74C476;
    /* Essential: tab20c green for the mark, a darker green for readable text */
    --ess: #23793B; --ess-mark: #31A354;
    /* Rising: tab20c purple for the star, a darker purple for readable text */
    --rise: #5B4F9E; --rise-mark: #756BB1;
    --shadow: rgba(21,36,44,.28);
    --gutter: 24px;
    --sans: "Fira Sans", "Helvetica Neue", Arial, sans-serif;
    --head: var(--sans);
    --chip-ring: transparent;
    color-scheme: light;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --paper: #0F1A1F; --surface: #15232A; --hover: #18282F; --ink: #E3EAE8; --ink-2: #9DAEB2;
      --line: #2B3C43; --link: #8BC2E0; --tag-bg: #1E3038;
      --r0: #A57540; --r1: #BFA670; --r2: #86A898; --r3: #3F86A0; --r4: #2F72A3;
      --arm: rgba(255,255,255,.7);
      --warn: #E9A23B; --warn-ink: #F2B85C;
      --new-bg: #1B3747; --new-ink: #A9D3EC;
      --ess: #74C476; --ess-mark: #74C476;
      --rise: #BCBDDC; --rise-mark: #9E9AC8;
      --shadow: rgba(0,0,0,.6); --chip-ring: rgba(255,255,255,.32);
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --paper: #0F1A1F; --surface: #15232A; --hover: #18282F; --ink: #E3EAE8; --ink-2: #9DAEB2;
    --line: #2B3C43; --link: #8BC2E0; --tag-bg: #1E3038;
    --r0: #A57540; --r1: #BFA670; --r2: #86A898; --r3: #3F86A0; --r4: #2F72A3;
    --arm: rgba(255,255,255,.7);
    --warn: #E9A23B; --warn-ink: #F2B85C;
    --new-bg: #1B3747; --new-ink: #A9D3EC;
    --ess: #74C476; --ess-mark: #74C476;
    --rise: #BCBDDC; --rise-mark: #9E9AC8;
    --shadow: rgba(0,0,0,.6); --chip-ring: rgba(255,255,255,.32);
    color-scheme: dark;
  }

  * { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; }
  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 1.0625rem/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
  }
  a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
  a:hover { text-decoration-thickness: 2px; }
  :focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 2px; }
  .skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 4px; }
  .skip:focus { left: 16px; }

  .wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

  /* Header */
  .site-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  /* The EJ mark (assets/ej.svg, the old site's favicon) goes before the name in every page's header. */
  .site-name { display: inline-flex; align-items: center; gap: 10px; font: 500 1.2rem/1.2 var(--head); color: var(--ink); text-decoration: none; }
  .ej { display: block; flex: none; width: 30px; height: 30px; border-radius: 50%; }
  .site-name:hover .ej { box-shadow: 0 0 0 3px var(--tag-bg); }
  .site-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: .95rem; }
  .site-nav a { color: var(--ink-2); text-decoration: none; }
  .site-nav a:hover { color: var(--ink); text-decoration: underline; }
  .site-nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }
  /* The "Research" menu (assets/nav.js): its pages drop down under it on hover, click or tap. */
  /* On the irrigation and human-driven processes pages, "Research" is marked as the section you are in. */
  .site-nav a[data-section="current"] { color: var(--ink); font-weight: 500; }

  /* Hero */
  .hero { padding-top: 72px; }
  h1 {
    font: 500 clamp(2.5rem, 6.2vw, 4.4rem)/1.02 var(--head);
    letter-spacing: -0.015em;
    margin: 0;
    max-width: 13ch;
  }
  .lede { font-size: 1.2rem; line-height: 1.55; color: var(--ink-2); max-width: 58ch; margin: 24px 0 0; }

  .scales { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 56px 0 0; padding: 0; }
  .scale { margin: 0; }
  .scale svg { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 4px; }
  .scale figcaption { margin-top: 12px; }
  .scale strong { display: block; font: 500 1.2rem/1.2 var(--head); }
  .scale span { display: block; font-size: .875rem; color: var(--ink-2); margin-top: 2px; }
  .scales-note { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 20px; font-size: .9rem; color: var(--ink-2); }
  .scales-note p { margin: 0; max-width: 62ch; }
  .legend { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
  .legend .ramp { width: 120px; height: 10px; border-radius: 2px; background: linear-gradient(90deg, var(--r0), var(--r1), var(--r2), var(--r3), var(--r4)); }

  .scales.animate .scale svg { animation: resolve 1s cubic-bezier(.2,.7,.2,1) both; }
  .scales.animate .scale:nth-child(2) svg { animation-delay: .3s; }
  .scales.animate .scale:nth-child(3) svg { animation-delay: .6s; }
  .scales.animate .scale:nth-child(4) svg { animation-delay: .9s; }
  @keyframes resolve { from { filter: blur(10px); opacity: 0; } to { filter: blur(0); opacity: 1; } }
  @media (prefers-reduced-motion: reduce) { .scales.animate .scale svg { animation: none; } }

  /* Sections */
  section { padding-top: 96px; }
  h2 { font: 500 2rem/1.15 var(--head); letter-spacing: -0.01em; margin: 0; }
  h3 { font: 500 1.35rem/1.25 var(--head); margin: 0; }
  .intro { color: var(--ink-2); max-width: 62ch; margin: 12px 0 0; }


  details.more { margin-top: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  details.more summary { cursor: pointer; list-style: none; padding: 18px 0; font: 500 1.15rem/1.3 var(--head); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
  details.more summary::-webkit-details-marker { display: none; }
  details.more summary::after { content: "+"; font: 400 1.5rem/1 var(--sans); color: var(--ink-2); }
  details.more[open] summary::after { content: "\2212"; }
  details.more ul { margin: 0 0 8px; padding-left: 1.2em; max-width: 72ch; }
  details.more li { margin: 8px 0; }
  details.more .credit { font-size: .85rem; color: var(--ink-2); margin: 12px 0 22px; }

  .findings, details.more ul { list-style: disc; }
  .findings li::marker { color: var(--r3); }
  /* Why irrigation matters: three facts with pictures and sources, then the gap */
  .why-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 24px; }
  .why-fact { margin: 0; min-width: 0; }
  .why-fact img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: var(--surface); }
  .why-pic { position: relative; }
  .why-tag { position: absolute; top: 8px; padding: 2px 8px; border-radius: 3px; background: rgba(15, 26, 31, .66); color: #fff; font: 600 .72rem/1.4 var(--sans); }
  .why-tag.l { left: 8px; } .why-tag.r { right: 8px; } .why-tag.bl { top: auto; bottom: 8px; left: 8px; }
  .why-tag .why-short { display: none; }
  .why-fact figcaption { margin-top: 10px; font-size: .9rem; line-height: 1.5; color: var(--ink-2); }
  .why-fact figcaption strong, .why-gap li strong { color: var(--ink); font-weight: 600; }
  .why-fact .src { display: inline-block; margin: 4px 10px 0 0; font-size: .78rem; }
  .why-gap { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: center; margin-top: 26px; padding: 18px 20px; border: 1px solid var(--line); border-left: 4px solid var(--q-when); border-radius: 8px; background: var(--surface); }
  .why-gap img { display: block; width: 100%; border-radius: 6px; }
  .why-gap-text { min-width: 0; }
  .why-gap h3 { margin: 0 0 6px; font: 500 1.2rem/1.3 var(--head); }
  .why-gap ul { margin: 0; padding-left: 1.1em; list-style: disc; }
  .why-gap li { margin: 6px 0; font-size: .92rem; line-height: 1.5; color: var(--ink-2); }
  .why-gap li::marker { color: var(--q-when); }
  .why-bridge { margin: 10px 0 0; font: 500 1rem/1.45 var(--head); color: var(--ink); }
  .bridge { font: 400 1.3rem/1.4 var(--head); max-width: 58ch; margin: 36px 0 0; padding-left: 20px; border-left: 3px solid var(--r3); }

  /* Studies */
  .studies-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px 32px; }
  .filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
  .filters legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .filters button {
    font: 500 .9rem/1 var(--sans); color: var(--ink); background: transparent;
    border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; cursor: pointer;
  }
  .filters button:hover { border-color: var(--ink-2); }
  .filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .filters .n { opacity: .65; margin-left: 4px; font-weight: 400; }
  .count { font-size: .9rem; color: var(--ink-2); margin: 16px 0 0; }

  .study-list { list-style: none; margin: 16px 0 0; padding: 0; }
  .study { display: grid; grid-template-columns: 6rem minmax(0, 1fr) minmax(0, 300px); gap: 32px; padding: 40px 0; border-top: 1px solid var(--line); }
  .study[hidden] { display: none; }
  .study-when .yr { display: block; font: 500 1.75rem/1 var(--head); }
  .study-when .sc { display: block; font-size: .85rem; color: var(--ink-2); margin-top: 8px; }
  .study-title { font: 500 1.4rem/1.25 var(--head); margin: 0; }
  .study-title a { color: inherit; text-decoration: none; }
  .study-title a:hover { text-decoration: underline; }
  .venue { margin: 8px 0 0; font-size: .95rem; color: var(--ink-2); }
  .venue em { font-style: italic; color: var(--ink); }
  .authors { margin: 2px 0 0; font-size: .9rem; color: var(--ink-2); }
  .authors strong { color: var(--ink); font-weight: 600; }
  .summary { margin: 18px 0 0; max-width: 62ch; }
  .findings { margin: 10px 0 0; padding-left: 1.2em; max-width: 62ch; }
  .findings li { margin: 6px 0; }
  .study-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 20px; }
  .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
  .tag { font-size: .8rem; line-height: 1; padding: 6px 10px; border-radius: 999px; background: var(--tag-bg); }
  .actions { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .92rem; font-weight: 500; }
  .linkbtn { font: inherit; color: var(--link); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
  .linkbtn:hover { text-decoration-thickness: 2px; }

  .study-fig { margin: 0; }
  .study-fig a { display: block; }
  .study-fig img, .study-fig svg { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); }
  .study-fig svg { aspect-ratio: 1; max-width: 220px; }
  .study-fig figcaption { font-size: .8rem; line-height: 1.45; color: var(--ink-2); margin-top: 8px; }

  /* Related */
  .related { list-style: none; margin: 24px 0 0; padding: 0; }
  .related li { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 32px; padding: 18px 0; border-top: 1px solid var(--line); }
  .related .yr { font: 500 1.15rem/1.4 var(--head); color: var(--ink-2); }
  .related .t { font: 500 1.1rem/1.35 var(--head); }
  .related .t a { color: var(--ink); text-decoration: none; }
  .related .t a:hover { text-decoration: underline; }
  .related p { margin: 4px 0 0; font-size: .92rem; color: var(--ink-2); max-width: 70ch; }

  /* Research landscape table */
  .bleed { width: min(1280px, calc(100vw - 2 * var(--gutter))); margin-left: calc(50% - min(640px, 50vw - var(--gutter))); }
  .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  .lit-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
  .lit-search { position: relative; flex: 1 1 240px; max-width: 340px; }
  .lit-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
  .lit-search input {
    width: 100%; font: 400 .95rem/1.2 var(--sans); color: var(--ink); background: var(--surface);
    border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px 11px 36px;
  }
  .lit-search input::placeholder { color: var(--ink-2); opacity: .85; }
  .seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
  .seg button { font: 500 .88rem/1 var(--sans); color: var(--ink); background: transparent; border: 0; border-left: 1px solid var(--line); padding: 11px 13px; cursor: pointer; }
  .seg button:first-child { border-left: 0; }
  .seg button:hover { background: var(--tag-bg); }
  .seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
  .lit-select { position: relative; display: inline-block; }
  .lit-select select {
    appearance: none; -webkit-appearance: none; font: 500 .88rem/1.2 var(--sans); color: var(--ink);
    background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 34px 10px 12px; cursor: pointer;
  }
  .lit-select::after {
    content: ""; position: absolute; right: 14px; top: 50%; width: 6px; height: 6px; pointer-events: none;
    border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: translateY(-70%) rotate(45deg);
  }
  .lit-reset { font: 500 .88rem/1 var(--sans); color: var(--link); background: none; border: 0; padding: 8px 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
  .lit-reset[hidden] { display: none; }
  /* One Filter button holds the less-used filters and the legend. */
  .lit-filter-btn { display: inline-flex; align-items: center; gap: 6px; font: 500 .88rem/1 var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px; cursor: pointer; }
  .lit-filter-btn svg { width: 10px; height: 10px; transition: transform .15s; }
  .lit-filter-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
  .lit-filter-btn:hover { background: var(--tag-bg); }
  .lit-filter-btn.on { border-color: var(--ink); }
  .lit-controls #lit-count { margin: 0 0 0 auto; font-size: .88rem; color: var(--ink-2); }
  .lit-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; font-size: .88rem; color: var(--ink-2); }
  .lit-panel[hidden] { display: none; }

  .lit-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; margin-top: 20px; font-size: .88rem; color: var(--ink-2); }
  .lit-meta p { margin: 0; }
  .lit-legend { display: flex; flex-wrap: wrap; gap: 6px 22px; }
  .lit-legend > span { display: inline-flex; align-items: center; gap: 8px; }
  .lit-legend > span[hidden] { display: none; }
  .lit-meta-l { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
  .lit-sort { display: inline-flex; align-items: center; gap: 8px; }
  .lit-sort select { padding: 6px 30px 6px 10px; font-size: .84rem; }
  .lit-sort .lit-select::after { right: 12px; }

  .lit { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; margin-top: 10px; font-size: .9rem; line-height: 1.4; }
  .lit th { text-align: left; vertical-align: bottom; font: 500 .8rem/1.3 var(--sans); color: var(--ink-2); padding: 10px; border-bottom: 1px solid var(--ink-2); white-space: nowrap; }
  .lit th .sort { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
  .lit th .sort:hover { color: var(--ink); }
  .lit th .arrow { width: 8px; height: 8px; opacity: .35; }
  .lit th[aria-sort] .arrow { opacity: 1; }
  .lit th[aria-sort="ascending"] .arrow { transform: rotate(180deg); }
  .lit td { padding: 10px; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
  .lit tbody tr:first-child td { border-top: 0; }
  .lit tr[hidden] { display: none; }
  .lit .c-status { width: 116px; }
  .lit .c-year { width: 58px; white-space: nowrap; }
  .lit .c-q { width: 190px; }
  .lit .c-area { width: 14%; }
  .lit .c-period { width: 92px; white-space: nowrap; }
  .lit .c-res { width: 140px; }
  .one { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .lit tr.open .one { white-space: normal; overflow: visible; }

  /* A closed row lifts on hover. An open row and its details form one flat block. */
  .lit tr.row { cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
  .lit tr.row:not(.open):hover { transform: scale(1.01); box-shadow: 0 12px 28px -18px var(--shadow); position: relative; z-index: 2; background: var(--surface); }
  .lit tr.row:not(.open):hover td,
  .lit tr.row:not(.open):hover + tr.detail[hidden] + tr.row td { border-top-color: transparent; }
  .lit tr.row.open, .lit tr.detail { background: var(--hover); }
  .lit tr.row.open > td:first-child, .lit tr.detail > td { box-shadow: inset 3px 0 0 var(--r4); }

  .yr-cell { font: 500 1rem/1.35 var(--head); font-variant-numeric: tabular-nums; }
  .st { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; line-height: 1.35; white-space: nowrap; }
  .st-pub { color: var(--ink-2); }
  .st-pre { color: var(--warn-ink); font-weight: 600; }
  .pulse { position: relative; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--warn); }
  .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--warn); animation: ping 1.8s cubic-bezier(0, 0, .2, 1) infinite; }
  @keyframes ping { 0% { transform: scale(1); opacity: .75; } 80%, 100% { transform: scale(2.7); opacity: 0; } }
  .dot-pub { flex: none; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink-2); }
  .new { display: inline-block; font: 600 .7rem/1 var(--sans); padding: 3px 6px; border-radius: 4px; background: var(--new-bg); color: var(--new-ink); }
  .badges { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 5px; }
  .ess { display: inline-flex; align-items: center; gap: 4px; font: 600 .76rem/1 var(--sans); color: var(--ess); white-space: nowrap; }
  .ess svg { flex: none; width: 12px; height: 12px; color: var(--ess-mark); }
  .ess-link { font-weight: 500; color: var(--ess); }

  .ti { font: 500 1.04rem/1.3 var(--head); color: var(--ink); text-decoration: none; }
  .ti:hover { text-decoration: underline; }
  .lt { width: 100%; margin: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; font: 500 .97rem/1.35 var(--head); color: var(--ink); }
  .lt:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
  .by { margin: 4px 0 0; font-size: .84rem; color: var(--ink-2); }
  .lit .by { margin-top: 2px; font-size: .82rem; }
  .by em { font-style: italic; }

  .q { display: flex; flex-wrap: wrap; gap: 4px; }
  .q span { font: 500 .74rem/1 var(--sans); padding: 5px 7px; border-radius: 4px; color: var(--ink-2); border: 1px dashed var(--q-c, var(--line)); background: var(--q-tint, transparent); white-space: nowrap; }
  .lit .q span { font-size: .7rem; padding: 4px 6px; }
  /* Each question keeps its color: solid when the study answers it, a faint outline when it doesn't. */
  .q-where { --q-c: var(--q-where); --q-t: #FFFFFF; --q-tint: rgba(49, 130, 189, .08); }
  .q-when { --q-c: var(--q-when); --q-t: #10222E; --q-tint: rgba(253, 141, 60, .10); }
  .q-how_much { --q-c: var(--q-how); --q-t: #10222E; --q-tint: rgba(116, 196, 118, .12); }
  .q span.on { background: var(--q-c, var(--r4)); border: 1px solid var(--q-c, var(--r4)); color: var(--q-t, #fff); font-weight: 600; }
  .seg button[class^="q-"][aria-pressed="true"] { background: var(--q-c); color: var(--q-t); }
  .seg button[class^="q-"][aria-pressed="true"] .qdot { box-shadow: 0 0 0 1.5px var(--q-t); }
  .qdot { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 2px; background: var(--q-c); vertical-align: 0; }
  .sub { display: block; font-size: .8rem; color: var(--ink-2); margin-top: 2px; }
  .muted { color: var(--ink-2); }

  .res-list { display: flex; flex-wrap: wrap; gap: 4px; }
  .res { display: inline-flex; align-items: center; gap: 4px; font: 500 .74rem/1 var(--sans); padding: 4px 6px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); color: var(--link); text-decoration: none; white-space: nowrap; }
  .res:hover { border-color: var(--link); }
  .res svg { flex: none; width: 11px; height: 11px; }
  .res-links { margin: 0; padding: 0; list-style: none; }
  .res-links li + li { margin-top: 3px; }

  .lit tr.detail td { padding: 2px 10px 22px; border-top: 0; }
  .lit tr.detail td > div { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px 40px; padding-left: calc(116px + 58px); }
  .lit tr.detail p { margin: 0 0 10px; max-width: 64ch; }
  .lit tr.detail .note { font-size: .86rem; color: var(--warn-ink); }
  .lit tr.detail dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: .86rem; }
  .lit tr.detail dt { color: var(--ink-2); }
  .lit tr.detail dd { margin: 0; }
  .lit tr.detail .acts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; font-weight: 500; margin-top: 4px; }

  .lit-review { margin-top: 28px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: .92rem; }
  .lit-review p { margin: 0; max-width: 78ch; }
  .lit-review p + p { margin-top: 8px; }
  .lit-review strong { font-weight: 600; }
  .lit-review .acts { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 10px; font-weight: 500; }
  .prop { display: inline-block; font: 600 .7rem/1 var(--sans); padding: 2px 5px; border-radius: 4px; border: 1px solid var(--link); color: var(--link); }
  .chk { font-size: .74rem; color: var(--warn-ink); }
  .lit-empty td { padding: 40px 12px; text-align: center; color: var(--ink-2); }
  .lit-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 28px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--ink-2); }
  .lit-foot p { margin: 0; max-width: 70ch; }
  .lit-foot .acts { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
  .lit-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 18px; font-size: .9rem; }
  .lit-suggest label { font-weight: 500; margin-right: 4px; }
  .lit-suggest input { flex: 1 1 12rem; max-width: 19rem; min-width: 0; font: 400 .9rem/1.2 var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
  .lit-suggest input::placeholder { color: var(--ink-2); opacity: .85; }
  .lit-suggest input[aria-invalid="true"] { border-color: var(--warn); }
  .lit-suggest-msg { flex-basis: 100%; margin: 0; font-size: .84rem; color: var(--ink-2); }
  .lit-suggest-msg:empty { display: none; }
  .btn { font: 500 .9rem/1 var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; cursor: pointer; }
  .btn:hover { border-color: var(--ink-2); }
  .btn[hidden] { display: none; }

  @media (prefers-reduced-motion: reduce) {
    .pulse::after { animation: none; }
    .lit tr.row { transition: none; }
  }

  @media (max-width: 980px) {
    .lit thead { display: none; }
    .lit, .lit tbody { display: block; }
    .lit tr.row {
      display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 12px;
      grid-template-areas: "year status status" "study study study" "q q q" "area area period" "res res res";
      padding: 14px 10px; border-top: 1px solid var(--line);
    }
    .lit tbody tr.row:first-child { border-top: 0; }
    .lit tr.row:not(.open):hover { transform: none; box-shadow: none; background: var(--hover); }
    .lit tr.row td { display: block; width: auto; padding: 0; border: 0; }
    .lit tr.row.open > td:first-child { box-shadow: none; }
    .lit tr.row.open { box-shadow: inset 3px 0 0 var(--r4); }
    .lit .c-year { grid-area: year; }
    .lit tr.row .c-status { grid-area: status; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
    .lit .c-status .badges { margin: 0; }
    .lit .c-study { grid-area: study; }
    .lit .c-q { grid-area: q; margin-top: 2px; }
    .lit .c-area { grid-area: area; }
    .lit .c-area .sub { display: none; }
    .lit .c-period { grid-area: period; color: var(--ink-2); }
    .lit .c-res { grid-area: res; }
    .lit tr.row .c-res.empty { display: none; }
    .lit .lt.one { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .lit tr.open .lt.one { display: block; -webkit-line-clamp: unset; }
    .lit tr.detail:not([hidden]) { display: block; }
    .lit tr.detail td { display: block; padding: 0 10px 20px; }
    .lit tr.detail td > div { grid-template-columns: minmax(0, 1fr); padding-left: 0; }
    .lit-empty, .lit-empty td { display: block; }
  }

  /* Essential reading: tabs and journal-first cards, colored by question */
  .g-big { --g: #636363; --gt: #FFFFFF; }
  .g-where { --g: var(--q-where); --gt: #FFFFFF; }
  .g-when { --g: var(--q-when); --gt: #10222E; }
  .g-how_much { --g: var(--q-how); --gt: #10222E; }
  .rtabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
  .rtab { display: inline-flex; align-items: center; gap: 8px; font: 500 .9rem/1 var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 9px 13px; cursor: pointer; }
  .rtab:hover { border-color: var(--ink-2); }
  .rtab i { width: 9px; height: 9px; border-radius: 2px; background: var(--g, var(--ink)); }
  .rtab small { font-size: .8rem; opacity: .75; }
  .rtab[aria-pressed="true"] { background: var(--g, var(--ink)); border-color: var(--g, var(--ink)); color: var(--gt, var(--paper)); }
  .rtab[aria-pressed="true"] i { box-shadow: 0 0 0 1.5px var(--gt, var(--paper)); }
  .rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); align-items: start; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
  .rc { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
  .rc:hover, .rc.open { border-color: var(--g); }
  .rc:hover { box-shadow: 0 8px 20px -16px var(--shadow); }
  .rc-btn { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 0 14px 13px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
  .rc-band { display: flex; justify-content: space-between; margin: 0 -14px 6px; padding: 6px 14px; background: var(--g); color: var(--gt); font: 600 .72rem/1.2 var(--sans); }
  .rc-jr { font: 600 .98rem/1.2 var(--sans); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .rc-t { font: 500 .92rem/1.32 var(--sans); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
  .rc.open .rc-t { -webkit-line-clamp: unset; }
  .rc-by { font-size: .78rem; color: var(--ink-2); }
  .rc-more { padding: 0 14px 14px; }
  .rc-more[hidden] { display: none; }
  .rc-more p { margin: 0 0 8px; font-size: .84rem; line-height: 1.45; color: var(--ink-2); }
  .rc-more a { font: 500 .86rem/1 var(--sans); }
  @media (prefers-reduced-motion: reduce) { .rc { transition: none; } }

  /* Rising (editor's picks) */
  .picks { margin-top: 32px; }
  .picks-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; }
  .picks h3 { display: flex; align-items: center; gap: 10px; font: 500 1.35rem/1.25 var(--head); }
  .picks .intro { margin-top: 6px; }
  .star { flex: none; width: 1em; height: 1em; color: var(--link); }
  .pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-top: 18px; }
  .pick { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
  .pick .note { margin: 4px 0 0; font: italic 400 1.02rem/1.5 var(--head); }
  .pick .q { margin-top: auto; padding-top: 8px; }
  .pickb { display: inline-flex; align-items: center; gap: 4px; font: 600 .76rem/1 var(--sans); color: var(--rise); white-space: nowrap; }
  .pickb .star, .picks h3 .star { color: var(--rise-mark); }
  .pickb .star { width: 12px; height: 12px; }
  .pick { border-top: 3px solid var(--rise-mark); }

  @media (max-width: 760px) {
  }

  /* Footer */
  .site-foot { margin-top: 112px; border-top: 1px solid var(--line); padding: 32px 0 56px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; font-size: .9rem; color: var(--ink-2); }
  .site-foot p { margin: 0; max-width: 56ch; }
  .site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
  /* Profile links in the footer are icons (assets/icons.svg); each link names its site for screen readers and on hover. */
  .site-foot .foot-links { gap: 2px; margin: -8px -9px; }
  .foot-links a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink-2); transition: color .15s, background-color .15s; }
  .foot-links a:hover { background: var(--hover); }
  .foot-links a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
  .foot-links svg { width: 20px; height: 20px; fill: currentColor; }

  /* Profile icons in each site's own colour, wherever they appear (footer, About, Contact panel). GitHub's mark only
     comes in black, so it uses GitHub's purple; the envelope (the contact form) uses the site's blue. */
  :root { --b-scholar: #4285F4; --b-rg: #00B5A6; --b-github: #6E40C9; --b-linkedin: #0A66C2; --b-youtube: #FF0000; --b-mail: #1E5C86; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --b-scholar: #6FA1F8; --b-rg: #2ED3C4; --b-github: #A984F2; --b-linkedin: #4D9BE6; --b-youtube: #FF4D4D; --b-mail: #8BC2E0; } }
  :root[data-theme="dark"] { --b-scholar: #6FA1F8; --b-rg: #2ED3C4; --b-github: #A984F2; --b-linkedin: #4D9BE6; --b-youtube: #FF4D4D; --b-mail: #8BC2E0; }
  :is(.foot-links, .ab-links, .cp-links) a[href*="scholar.google"] svg { color: var(--b-scholar); }
  :is(.foot-links, .ab-links, .cp-links) a[href*="researchgate.net"] svg { color: var(--b-rg); }
  :is(.foot-links, .ab-links, .cp-links) a[href*="github.com"] svg { color: var(--b-github); }
  :is(.foot-links, .ab-links, .cp-links) a[href*="linkedin.com"] svg { color: var(--b-linkedin); }
  :is(.foot-links, .ab-links, .cp-links) a[href*="youtube.com"] svg { color: var(--b-youtube); }
  :is(.foot-links, .ab-links) a[href$="#contact"] svg { color: var(--b-mail); }

  .toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 6px; font-size: .92rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
  .toast.show { opacity: 1; transform: translate(-50%, 0); }

  @media (max-width: 860px) {
    .study { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 32px 0; }
    .study-when { display: flex; align-items: baseline; gap: 12px; }
    .study-when .sc { margin-top: 0; }
    .study-fig { max-width: 440px; }
    .related li { grid-template-columns: 4rem minmax(0, 1fr); gap: 16px; }
    .why-facts { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .why-fact { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; align-items: start; }
    .why-fact img { aspect-ratio: 4 / 3; }
    .why-fact figcaption { margin-top: 0; font-size: .86rem; }
    .why-tag { top: 5px; padding: 1px 5px; font-size: .62rem; } .why-tag.l { left: 5px; } .why-tag.r { right: 5px; } .why-tag.bl { top: auto; bottom: 5px; left: 5px; } .why-tag .why-long { display: none; } .why-tag .why-short { display: inline; }
    /* Phone: the picture sits beside the heading; the list and bridge run full width below. */
    .why-gap { grid-template-columns: 112px minmax(0, 1fr); gap: 4px 14px; padding: 16px; }
    .why-gap-text { display: contents; }
    .why-gap h3 { align-self: center; margin: 0; font-size: 1.08rem; }
    .why-gap ul, .why-bridge { grid-column: 1 / -1; }
    .why-gap ul { margin-top: 8px; }
  }
  @media (max-width: 640px) {
    :root { --gutter: 16px; }
    .wrap { padding: 0 16px; }
    .hero { padding-top: 48px; }
    section { padding-top: 72px; }
    .scales { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
    .bridge { font-size: 1.15rem; }
  }
.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}

  /* Under the water-cycle map: the way on to the irrigation page (index.html). */
  .cycle-cta { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; align-items: center; gap: 20px; margin: 28px 0 8px; padding: 14px 22px 14px 14px; border: 1px solid var(--line); border-left: 4px solid var(--q-how); border-radius: 12px; color: var(--ink); text-decoration: none; background: var(--surface); transition: box-shadow .2s, transform .2s, border-color .2s; }
  .cycle-cta:hover { box-shadow: 0 10px 28px var(--shadow); transform: translateY(-1px); }
  .cycle-cta img { display: block; width: 160px; height: 90px; object-fit: cover; border-radius: 8px; }
  .cycle-cta-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .cycle-cta-k { font: 500 .86rem/1.5 var(--sans); color: var(--ink-2); }
  .cycle-cta-t { font: 500 1.25rem/1.3 var(--head); }
  .cycle-cta-s { font-size: .9rem; line-height: 1.45; color: var(--ink-2); }
  .cycle-cta-go { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 1.25rem; transition: transform .2s; }
  .cycle-cta:hover .cycle-cta-go { transform: translateX(3px); }
  @media (max-width: 620px) {
    .cycle-cta { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding: 12px; }
    .cycle-cta img { width: 88px; height: 66px; }
    .cycle-cta-t { font-size: 1.05rem; }
    .cycle-cta-s, .cycle-cta-go { display: none; }
  }
  @media (prefers-reduced-motion: reduce) { .cycle-cta, .cycle-cta-go { transition: none; } .cycle-cta:hover { transform: none; } }


/* The NASA spotlight interview card, used on the About page and on the blog's spotlight post: the interview's portrait,
   its title and a "Read" cue, like a link preview. */
.ab-spot { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: stretch; max-width: 660px; margin: 40px 0 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ab-spot:hover { border-color: var(--link); box-shadow: 0 12px 28px rgba(15,26,31,.13); transform: translateY(-2px); }
.ab-spot:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.ab-spot-pic { display: block; width: 100%; height: 100%; min-height: 132px; object-fit: cover; }
.ab-spot-text { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 16px 20px; }
.ab-spot-kind { font: 600 .86rem/1.2 var(--sans); color: var(--ink-2); }
.ab-spot-title { font: 500 1.15rem/1.3 var(--head); color: var(--ink); }
.ab-spot-where { font-size: .92rem; line-height: 1.4; color: var(--ink-2); }
.ab-spot-go { margin-top: 4px; font-size: .92rem; font-weight: 500; color: var(--link); }
.ab-spot:hover .ab-spot-go { text-decoration: underline; }
@media (max-width: 520px) {
  .ab-spot { grid-template-columns: 96px minmax(0, 1fr); }
  .ab-spot-pic { min-height: 96px; }
  .ab-spot-text { padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) { .ab-spot { transition: none; } .ab-spot:hover { transform: none; } }

/* Contact panel (assets/nav.js). Wide screens: the page moves left to make room (html.cp-push). Narrow screens: the
   panel slides over the page with a shade behind it (html.cp-over). */
:root { --cp-w: 360px; }
body { transition: margin-right .3s ease; }
html.cp-push body { margin-right: var(--cp-w); }
html.cp-push { overflow-x: hidden; }
.cp { position: fixed; z-index: 1000; top: 0; right: 0; bottom: 0; width: var(--cp-w); max-width: 100%; overflow-y: auto; padding: 22px 24px 28px; border-left: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: -18px 0 50px rgba(15,26,31,.12); transform: translateX(100%); visibility: hidden; transition: transform .3s ease, visibility 0s linear .3s; font-family: var(--sans); }
.cp.open { transform: none; visibility: visible; transition: transform .3s ease; }
.cp-shade { position: fixed; inset: 0; z-index: 999; background: rgba(16,35,43,.45); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s linear .3s; }
html.cp-over .cp-shade { opacity: 1; visibility: visible; transition: opacity .3s; }
.cp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cp-ej { flex: none; width: 40px; height: 40px; border-radius: 50%; }
.cp-head > div { flex: 1; min-width: 0; }
.cp h2 { margin: 2px 0 0; font: 500 1.4rem/1.2 var(--head); color: var(--ink); }
.cp-close { flex: none; align-self: flex-start; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.cp-close:hover { background: var(--hover); }
.cp-lead { margin: 0 0 18px; font-size: .95rem; line-height: 1.55; color: var(--ink-2); }
.cp-form { display: grid; gap: 12px; margin: 0 0 26px; }
.cp-form[hidden], .cp-done[hidden] { display: none; }
.cp-field { display: grid; gap: 5px; font-size: .85rem; font-weight: 500; color: var(--ink); }
.cp-field em { font-style: normal; font-weight: 400; color: var(--ink-2); }
.cp-field input, .cp-field textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink); font: 400 .95rem/1.45 var(--sans); }
.cp-field textarea { min-height: 128px; resize: vertical; }
.cp-field input:focus, .cp-field textarea:focus { border-color: var(--link); outline: 2px solid color-mix(in srgb, var(--link) 25%, transparent); outline-offset: 0; }
.cp-field [aria-invalid="true"] { border-color: #C0392B; }
.cp-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cp-send { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 2px; }
.cp-send .cp-btn { cursor: pointer; font-family: var(--sans); }
.cp-send .cp-btn:disabled { opacity: .55; cursor: default; }
.cp-status { flex: 1 1 160px; margin: 0; font-size: .85rem; line-height: 1.45; color: var(--ink-2); }
.cp-status[data-kind="error"] { color: #B03A2E; }
.cp-privacy { margin: 0; font-size: .8rem; color: var(--ink-2); }
.cp-done { margin: 0 0 26px; padding: 16px 18px; border: 1px solid color-mix(in srgb, #2E8B57 45%, var(--line)); border-radius: 12px; background: color-mix(in srgb, #2E8B57 8%, var(--surface)); }
.cp-done-title { margin: 0 0 4px; font-weight: 600; color: var(--ink); }
.cp-done-copy { margin: 0 0 12px; font-size: .9rem; color: var(--ink-2); }
.cp-again { background: var(--surface); cursor: pointer; font-family: var(--sans); }
.cp-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: .9rem; font-weight: 500; text-decoration: none; }
.cp-btn:hover { background: var(--hover); }
.cp-primary { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.cp-primary:hover { background: var(--ink); opacity: .88; }
.cp-h { margin: 0 0 6px; font: 600 .95rem/1.3 var(--sans); color: var(--ink); }
.cp-links { margin: 0 0 24px; padding: 0; list-style: none; }
.cp-links a { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.cp-links li:last-child a { border-bottom: 0; }
.cp-links a:hover { background: var(--hover); }
.cp-links svg { flex: none; width: 20px; height: 20px; fill: currentColor; }
.cp-links span:first-of-type { flex: 1; }
.cp-out { color: var(--ink-2); font-size: .85rem; }
.cp :focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { body, .cp, .cp-shade { transition: none; } }
