/* Round seven — the final version.
   Everything decided in round six is baked in here:
   type    — Brygada 1918 for display, Fira Sans for text
   mark    — none; the wordmark alone carries the nav
   colour  — green for links and navigation, umber for the eyebrow and at
             most one emphasised word per page. Whitney's palette (locked
             17 August) revised 1 Sep: forest green and red-orange umber sat
             129 degrees apart with the umber at 77% chroma, which read as a
             collegiate clash. Moved to olive and clay — 67 degrees apart,
             lower chroma — holding every contrast ratio unchanged. */

:root{
  --ink:#141714;
  --ink-2:#4A5148;
  --ink-3:#6E756C;   /* darkened 1 Sep for AA contrast (4.62:1) */
  --rule:#E2E5E0;
  --rule-2:#EFF1EE;  /* lists, subordinate to the section rule */
  --field:#85927C;   /* form control borders — 3.20:1, WCAG 1.4.11 */
  --paper:#FCFCFB;

  --green:#3B512C;
  --green-2:#567243;
  --umber:#795231;

  --display:'Brygada 1918', Georgia, serif;
  --text:'Fira Sans', system-ui, sans-serif;
}

*{box-sizing:border-box;margin:0;padding:0}

/* transition banner — remove once the rename has settled in */
.banner{background:var(--green);color:#EAECE8;text-align:center;
        font-size:.8rem;letter-spacing:.03em;padding:.5rem 1.2rem;
        margin:0 calc(50% - 50vw)}
html{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
body{
  background:var(--paper);color:var(--ink);
  font-family:var(--text);
  font-size:16.6px;line-height:1.58;letter-spacing:-.006em;
  max-width:44rem;margin:0 auto;padding:0 1.75rem 6rem;
}

/* nav — the wordmark and a plain row of links over a hairline */
nav{display:flex;gap:1.6rem;flex-wrap:wrap;align-items:baseline;
    padding:2.2rem 0 1rem;border-bottom:1px solid var(--rule);margin-bottom:3.4rem;
    font-size:.95rem}
nav a{color:var(--ink-2);text-decoration:none}
nav a:hover{color:var(--green)}
nav a.here{color:var(--ink);font-weight:600}
nav .mark{font-family:var(--display);font-size:1.4rem;font-weight:600;
          letter-spacing:-.01em;color:var(--ink);margin-right:.4rem}

/* the eyebrow — umber, the colour decision made visible */
.eyebrow{font-size:.72rem;letter-spacing:.13em;text-transform:uppercase;
         font-weight:600;color:var(--umber);margin-bottom:1.1rem}

h1{font-family:var(--display);font-weight:600;
   font-size:clamp(2.2rem,5.2vw,3.1rem);line-height:1.12;letter-spacing:-.015em;
   margin-bottom:1.3rem}
h1 em{font-size:1em;color:var(--umber)}
h2{font-family:var(--display);font-weight:600;font-size:1.6rem;
   line-height:1.24;letter-spacing:-.01em;margin:0 0 .9rem}
h3{font-size:1rem;font-weight:600;letter-spacing:-.005em;margin:0 0 .35rem}
p{margin-bottom:1.15rem;color:var(--ink-2)}
p.lead{font-family:var(--display);font-size:1.32rem;line-height:1.46;
       color:var(--ink);margin-bottom:1.6rem}
a{color:var(--green);text-decoration:underline;
  text-decoration-color:#C0C7BB;text-underline-offset:3px;text-decoration-thickness:1px}
a:hover{text-decoration-color:var(--green)}
em{font-family:var(--display);font-style:italic;font-size:1.05em}
strong{font-weight:600;color:var(--ink)}
/* the one umber word a page is allowed */
strong.umber{color:var(--umber)}

/* every section is a titled block sitting on its own rule */
section{border-top:1px solid var(--rule);padding-top:2rem;margin-top:2.8rem}
section:first-of-type{border-top:0;padding-top:0;margin-top:0}
.sec-label{font-size:.72rem;letter-spacing:.13em;text-transform:uppercase;
           font-weight:600;color:var(--green);margin-bottom:1rem}
/* one level below .sec-label — groups items within a section */
.sub-label{font-size:.68rem;letter-spacing:.13em;text-transform:uppercase;
           font-weight:600;color:var(--ink-3);margin:0 0 .7rem}

/* a plain link list, not cards */
.links{list-style:none}
.links li{border-bottom:1px solid var(--rule-2);padding:.85rem 0}
.links li:last-child{border-bottom:0}
.links a{font-family:var(--display);font-size:1.2rem;font-weight:500;
         text-decoration:none;color:var(--ink)}
.links a:hover{color:var(--green)}
.links span{display:block;font-size:.92rem;color:var(--ink-3);margin-top:.1rem}

/* facts — hairlines, no box */
dl.facts{margin-top:.4rem}
dl.facts div{display:flex;justify-content:space-between;gap:1.5rem;
             padding:.6rem 0;border-bottom:1px solid var(--rule-2)}
dl.facts div:first-child{border-top:1px solid var(--rule-2)}
dl.facts dt{font-size:.8rem;letter-spacing:.09em;text-transform:uppercase;
            color:var(--ink-3);padding-top:.22rem}
dl.facts dd{text-align:right;color:var(--ink)}

.three{margin-top:1.2rem}
.three > div{padding:.9rem 0;border-bottom:1px solid var(--rule-2)}
.three > div:last-child{border-bottom:0}
.three p{margin:0;font-size:.97rem}

/* the pair of side-by-side calls to action on the homepage */
.cta{display:flex;gap:2.4rem;flex-wrap:wrap;margin-top:.4rem}
.cta a{font-family:var(--display);font-size:1.15rem;font-weight:500;
       text-decoration:none;color:var(--green)}
.cta a:hover{text-decoration:underline;text-underline-offset:3px}

/* a figure with its caption */
img{max-width:100%;height:auto;display:block}
figure{margin:1.4rem 0}
figure > img{margin-inline:auto}
figcaption{font-size:.88rem;color:var(--ink-3);line-height:1.55;margin-top:.6rem}

/* leadership portraits — two up, names beneath, nothing else */
.people{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem;margin:0 0 1.7rem}
.people figure{margin:0}
.people img{width:100%;aspect-ratio:1;object-fit:cover}
.people figcaption{font-family:var(--display);font-size:1.05rem;font-weight:500;
                   color:var(--ink);line-height:1.3;margin-top:.55rem}

/* news items — a date over a headline */
/* .links span also matches this, and is more specific — hence .links .newsdate */
.links .newsdate{display:block;font-size:.78rem;letter-spacing:.06em;color:var(--ink-3);
                 margin:0 0 .15rem}

/* essay — byline, section heads, footnotes */
.byline{margin:0 0 1.1rem;font-size:.92rem;color:var(--ink-3);line-height:1.5}
.byline-name{font-family:var(--display);font-size:1.1rem;font-weight:500;
             color:var(--ink);margin-bottom:.05rem}
.essay h2{font-size:1.3rem;margin:2.6rem 0 .8rem}
.essay sup{font-size:.7em;line-height:0}
.essay sup a{text-decoration:none}
.notes{margin:3rem 0 0 1.2rem;padding-top:1.4rem;border-top:1px solid var(--rule-2);
       font-size:.92rem;color:var(--ink-3)}
.notes li{margin-bottom:.45rem}
.backref{text-decoration:none}

/* citation popovers — the reference shown in place, no trip to the bottom */
.refpop{position:absolute;z-index:20;max-width:min(24rem,calc(100vw - 2rem));
        background:var(--paper);border:1px solid var(--rule);border-radius:2px;
        box-shadow:0 3px 14px rgba(20,23,20,.10);padding:.6rem .8rem;
        font-size:.9rem;line-height:1.45;color:var(--ink-2)}
.refpop a{text-decoration-thickness:1px}
sup.ref > a{cursor:pointer}

/* the datasheet request form */
.form{margin:1.6rem 0 0;max-width:32rem}
.field{margin-bottom:1.25rem}
.field label{display:block;font-size:.8rem;letter-spacing:.09em;text-transform:uppercase;
             font-weight:600;color:var(--ink-2);margin-bottom:.4rem}
.field input,.field textarea{
  width:100%;font:inherit;font-size:1rem;color:var(--ink);background:var(--paper);
  border:1px solid var(--field);border-radius:2px;padding:.6rem .7rem}
.field textarea{min-height:6.5rem;resize:vertical;line-height:1.5}
.field input:focus,.field textarea:focus{
  outline:none;border-color:var(--green);box-shadow:0 0 0 2px rgba(59,81,44,.14)}
.field .hint{font-size:.85rem;color:var(--ink-3);margin-top:.3rem}
/* the honeypot: off-screen rather than display:none, which bots skip */
.trap{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.form button{font:inherit;font-weight:600;font-size:.95rem;color:var(--paper);
             background:var(--green);border:0;border-radius:2px;
             padding:.62rem 1.3rem;cursor:pointer}
.form button:hover{background:#334726}
.form button[disabled]{opacity:.55;cursor:default}
.formnote{font-size:.88rem;color:var(--ink-3);margin-top:1rem;line-height:1.5}
.status{margin-top:1.2rem;font-size:.97rem;line-height:1.55}
.status.ok{color:var(--ink)}
.status.bad{color:var(--umber)}

/* a quiet, link-like button — the site has no icons, so it says what it does */
.printlink{font:inherit;font-size:.88rem;color:var(--ink-3);background:none;border:0;
           padding:0;margin:0 0 2.4rem;cursor:pointer;text-decoration:underline;
           text-decoration-color:var(--rule);text-underline-offset:3px}
.printlink:hover{color:var(--green);text-decoration-color:var(--green)}

/* legal page — two long documents, one after the other */
.jump{display:flex;gap:1.5rem;flex-wrap:wrap;margin:0 0 2.6rem;font-size:.95rem}
.legal h2{margin:0 0 1.3rem}                     /* the document title */
.legal h3{font-family:var(--display);font-weight:600;font-size:1.12rem;
          line-height:1.3;letter-spacing:-.005em;margin:2.2rem 0 .7rem}
.legal ol,.legal ul{margin:0 0 1.15rem 1.35rem}
.legal ul ul{margin:.45rem 0 .55rem 1.15rem}
.legal li{margin-bottom:.5rem;color:var(--ink-2)}
.lastmod{font-size:.88rem;color:var(--ink-3);margin-bottom:1.7rem}
/* the California disclosure table — scrolls in its own box on narrow screens */
.tablewrap{overflow-x:auto;margin:0 0 1.35rem}
.legal table{border-collapse:collapse;width:100%;min-width:30rem;font-size:.94rem}
.legal th,.legal td{text-align:left;vertical-align:top;line-height:1.5;
                    padding:.6rem 1.1rem .6rem 0;border-bottom:1px solid var(--rule-2)}
.legal td{color:var(--ink-2)}
.legal th{color:var(--ink);font-weight:600;border-bottom-color:var(--rule)}

/* footer — left // middle // right */
footer{border-top:1px solid var(--rule);margin-top:3.6rem;padding-top:1.3rem;
       font-size:.88rem;color:var(--ink-3);display:flex;justify-content:space-between;
       gap:1.5rem;flex-wrap:wrap}
footer a{color:var(--ink-2);text-decoration:none;margin-right:0}
footer a:hover{color:var(--green)}

@media(max-width:34rem){
  dl.facts div{flex-direction:column;gap:.1rem}
  dl.facts dd{text-align:left}
}


/* ---------------------------------------------------------------------------
   Print. Also what you get from "Save as PDF", which is how most people will
   take the essay away. Drops the page furniture, sets the text in the display
   serif at a paper size, and prints citation URLs in full so the notes are
   usable off-screen.
   --------------------------------------------------------------------------- */
@media print {
  @page{margin:20mm}
  .banner,nav,.jump,.printlink,.backref{display:none !important}
  html,body{background:#fff}
  /* 150mm is about 78 characters at this size — a readable measure.
     Without it the text runs the full width of the page. */
  body{max-width:150mm;margin:0 auto;padding:0;color:#000;
       font-family:var(--display);font-size:10.5pt;line-height:1.5;letter-spacing:0}
  p,li,dd,td{color:#000}
  a{color:#000;text-decoration:none}
  h1{font-size:21pt;line-height:1.15;margin-bottom:.35em}
  h2{font-size:14pt} h3{font-size:11.5pt}
  h1,h2,h3,.sec-label,.sub-label{break-after:avoid;page-break-after:avoid;color:#000}
  .eyebrow{color:#000;font-size:8pt;letter-spacing:.16em}
  .byline{color:#000;margin-bottom:1.6em}
  .byline-name{font-size:12pt}
  p,li{orphans:3;widows:3}
  figure,table,.notes li,.people figure{break-inside:avoid;page-break-inside:avoid}
  .lastmod,.figcaption,figcaption{color:#333}
  /* a citation is no use on paper without its address */
  .notes a[href^="http"]::after{content:" — " attr(href);font-size:8pt;word-break:break-all}
  .notes a[href$=".html"]::after{content:" — arborneuroscience.org/" attr(href);font-size:8pt}
  .notes{border-top:1px solid #999;color:#000}
  footer{border-top:1px solid #999;color:#000;font-size:8.5pt;display:block}
  footer div{display:inline;margin-right:1.2em}
}
