/* ==========================================================================
   Sobo Aviation Research — research note stylesheet
   Working-paper direction: sheet on desk, sidenote apparatus.
   Type: Newsreader (display + body) · IBM Plex Mono (utility)
   ========================================================================== */

:root{
  --desk:   #e3e1d9;
  --sheet:  #fcfbf8;
  --ink:    #14181f;
  --muted:  #5d6169;
  --rule:   #cfccc2;
  --signal: #f2b705;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --sheet-w: 1160px;
  --margin-w: 232px;
  --margin-gap: 40px;
  --pad: clamp(1.5rem, 4.5vw, 5rem);
}

*{ box-sizing: border-box; }

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

body{
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 17.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; }

:focus-visible{
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- utility type ---------- */
.mono{
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ---------- masthead (sits on the desk, outside the sheet) ---------- */
.masthead{
  width: min(100%, var(--sheet-w));
  margin-inline: auto;
  padding: 1.6rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.masthead__logo img{ height: 42px; width: auto; }
.masthead__nav{
  display: flex;
  gap: 1.6rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.masthead__nav a{
  text-decoration: none;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.masthead__nav a:hover{ color: var(--ink); border-bottom-color: var(--signal); }

/* ---------- the sheet ---------- */
.sheet{
  width: min(100%, var(--sheet-w));
  margin: 0 auto 4rem;
  background: var(--sheet);
  border: 1px solid var(--rule);
  box-shadow: 0 1px 0 rgba(20,24,31,.04), 0 18px 40px -34px rgba(20,24,31,.5);
}
.sheet__inner{ padding: clamp(2.5rem, 5vw, 4.5rem) var(--pad) clamp(3rem, 6vw, 5rem); }

/* ---------- article head ---------- */
.eyebrow{
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.6rem;
  padding-bottom: 0.9rem;
  border-bottom: 2px solid var(--signal);
  display: block;
}

/* ---------- head: text column + side column for provenance ---------- */
.head{
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--margin-w);
  column-gap: var(--margin-gap);
  align-items: start;
}
.head__side{ padding-top: 0.5rem; }
@media (max-width: 1000px){
  .head{ grid-template-columns: 1fr; }
  .head__side{ padding-top: 0; }
}

.title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.15rem, 5.1vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: -0.021em;
  margin: 0 0 1.5rem;
  max-width: 21ch;
}

.standfirst{
  font-size: clamp(1.18rem, 2.1vw, 1.5rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.45;
  color: #33383f;
  max-width: 48ch;
  margin: 0 0 2.4rem;
}

.byline{
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.005em;
  color: var(--muted);
  line-height: 1.62;
  margin: 0 0 2.6rem;
  border-top: 1px solid var(--rule);
  padding-top: 0.75rem;
}
.byline b{
  display: block;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-size: 0.68rem;
  margin-bottom: 0.55rem;
}
@media (max-width: 1000px){
  .byline{ max-width: 62ch; }
}

/* meta strip */
.meta{
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.4rem 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem 1rem;
  margin-bottom: 3.4rem;
}
.meta div{ min-width: 0; }
.meta dt{
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.meta dd{
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
}
@media (max-width: 860px){
  .meta{ grid-template-columns: repeat(2, 1fr); }
}

/* ---------- body column with sidenote margin ---------- */
.body{ padding-right: calc(var(--margin-w) + var(--margin-gap)); }
@media (max-width: 1000px){
  .body{ padding-right: 0; }
}

.body p{ margin: 0 0 1.25rem; max-width: 68ch; }
.body p.first{ margin-top: 0; }

.h2{
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.42rem, 2.5vw, 1.95rem);
  line-height: 1.16;
  letter-spacing: -0.014em;
  margin: 3.6rem 0 1.3rem;
  clear: right;
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
}
.h2 .num{
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--signal);
  flex: none;
  position: relative;
  top: -0.25em;
}
.h2--plain{ padding-left: 0; }
.h2--plain::before{
  content: "";
  width: 26px;
  height: 2px;
  background: var(--signal);
  flex: none;
  position: relative;
  top: -0.32em;
}

.h3{
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2.4rem 0 0.9rem;
  clear: right;
}

/* ---------- sidenotes ---------- */
.note{
  float: right;
  width: var(--margin-w);
  margin-right: calc((var(--margin-w) + var(--margin-gap)) * -1);
  margin-bottom: 1.6rem;
  margin-left: var(--margin-gap);
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.62;
  letter-spacing: 0.005em;
  color: var(--muted);
  text-transform: none;
  border-top: 1px solid var(--rule);
  padding-top: 0.75rem;
}
.note b{
  display: block;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-size: 0.62rem;
  margin-bottom: 0.5rem;
}
.note--flag{ border-top-color: var(--signal); border-top-width: 2px; }
.note--flag b{ color: #8a6a02; }

@media (max-width: 1000px){
  .note{
    float: none;
    width: auto;
    margin: 1.8rem 0;
    border-top: none;
    border-left: 2px solid var(--rule);
    padding: 0.15rem 0 0.15rem 1.1rem;
    max-width: 62ch;
  }
  .note--flag{ border-left-color: var(--signal); }
}

/* ---------- in brief ---------- */
.brief{
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  counter-reset: brief;
  max-width: 68ch;
}
.brief li{
  position: relative;
  padding-left: 2.4rem;
  margin-bottom: 1.05rem;
  line-height: 1.6;
}
.brief li::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 18px;
  height: 2px;
  background: var(--signal);
}

/* ---------- figures ---------- */
.figure{
  margin: 2.6rem calc((var(--margin-w) + var(--margin-gap)) * -1) 2.8rem 0;
  clear: right;
}
@media (max-width: 1000px){
  .figure{ margin-right: 0; }
}
.figure__frame{
  background: #fff;
  border: 1px solid var(--rule);
  padding: 1.1rem;
}
.figure img{ width: 100%; height: auto; }
.figure figcaption{
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 0.85rem;
  max-width: 74ch;
}
.figure figcaption b{
  color: var(--signal);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-right: 0.5rem;
}

/* ---------- equation ---------- */
.eq{
  margin: 1.9rem 0;
  padding: 1.3rem 1.4rem;
  background: #f4f2ec;
  border-left: 2px solid var(--signal);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.9;
  overflow-x: auto;
  white-space: nowrap;
  clear: right;
}

/* ---------- tables ---------- */
.tbl-wrap{
  margin: 2.2rem calc((var(--margin-w) + var(--margin-gap)) * -1) 2.6rem 0;
  clear: right;
  overflow-x: auto;
}
@media (max-width: 1000px){ .tbl-wrap{ margin-right: 0; } }

table{
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}
caption{
  text-align: left;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 0.8rem;
}
caption b{ color: var(--signal); font-weight: 600; margin-right: 0.5rem; }
thead th{
  text-align: right;
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 0.85rem 0.6rem;
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}
thead th:first-child{ text-align: left; padding-left: 0.6rem; }
tbody td{
  text-align: right;
  padding: 0.52rem 0.85rem;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
tbody td:first-child{ text-align: left; padding-left: 0.6rem; }
tbody tr:last-child td{ border-bottom: 1px solid var(--ink); }

.sig{ color: var(--signal); font-weight: 600; }
.nsig{ color: #b3b0a7; }

tr.win td{ background: rgba(242,183,5,.10); font-weight: 500; }
tr.win td:first-child{ box-shadow: inset 2px 0 0 var(--signal); }

.tbl-note{
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 0.8rem;
  max-width: 74ch;
}

/* ---------- references ---------- */
.refs{
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  max-width: 74ch;
  font-size: 0.88rem;
  line-height: 1.55;
}
.refs li{
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  text-indent: -1.4rem;
  padding-left: 1.4rem;
}
.refs li:first-child{ border-top: 1px solid var(--rule); }
.refs a{ color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--rule); word-break: break-word; }
.refs a:hover{ color: var(--ink); border-bottom-color: var(--signal); }

/* ---------- end mark + footer ---------- */
.endmark{
  margin: 3.2rem 0 0;
  clear: right;
  border-top: 1px solid var(--rule);
  padding-top: 1.4rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 68ch;
}

.foot{
  width: min(100%, var(--sheet-w));
  margin-inline: auto;
  padding: 0 var(--pad) 4rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 1.8;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.foot img{ height: 34px; width: auto; opacity: .9; }
.foot .disc{ max-width: 46ch; text-align: right; }
@media (max-width: 640px){
  .foot{ flex-direction: column; align-items: flex-start; }
  .foot .disc{ text-align: left; }
}

/* ==========================================================================
   Page-level components — home and research index
   ========================================================================== */

/* ---------- hero: sits directly on the desk, no sheet ---------- */
.hero{
  width: min(100%, var(--sheet-w));
  margin-inline: auto;
  padding: clamp(3.5rem, 9vw, 7.5rem) var(--pad) clamp(3rem, 7vw, 6rem);
}
.hero__statement{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 6.4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.026em;
  margin: 0 0 2rem;
  max-width: 16ch;
}
.hero__statement em{ font-style: italic; font-weight: 300; }
.hero__sub{
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  line-height: 1.55;
  color: #33383f;
  max-width: 52ch;
  margin: 0 0 2.6rem;
}
.hero__meta{
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2.2rem;
}

/* ---------- section head inside a sheet ---------- */
.sec{ margin-bottom: clamp(3.5rem, 7vw, 5.5rem); }
.sec:last-child{ margin-bottom: 0; }
.sec__label{
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.4rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--signal);
}
.sec__title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin: 0 0 1.6rem;
  max-width: 22ch;
}
.sec p{ margin: 0 0 1.2rem; max-width: 66ch; }

/* two-column section: prose + margin apparatus */
.sec--split{
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--margin-w);
  column-gap: var(--margin-gap);
  align-items: start;
}
.sec--split .sec__label,
.sec--split .sec__title,
.sec--split > p{ grid-column: 1; }
.sec--split .side{ grid-column: 2; grid-row: 1 / span 20; }
@media (max-width: 1000px){
  .sec--split{ grid-template-columns: 1fr; }
  .sec--split .side{ grid-column: 1; grid-row: auto; }
}

.side{
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.62;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 0.75rem;
}
.side b{
  display: block;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-size: 0.62rem;
  margin-bottom: 0.55rem;
}
.side dl{ margin: 0; }
.side dt{
  color: var(--ink);
  font-weight: 500;
  margin-top: 0.9rem;
}
.side dt:first-child{ margin-top: 0; }
.side dd{ margin: 0.1rem 0 0; }

/* ---------- capability stack (rows, not cards) ---------- */
.stack{ border-top: 1px solid var(--rule); margin-top: 0.5rem; }
.stack__row{
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.stack__label{
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink);
}
.stack__body{ margin: 0; max-width: 62ch; font-size: 0.98rem; line-height: 1.62; }
@media (max-width: 760px){
  .stack__row{ grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ---------- research entry ---------- */
.entry{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: clamp(1.8rem, 4vw, 3.4rem);
  align-items: start;
}
.entry + .entry{
  border-top: 1px solid var(--rule);
  padding-top: 2.4rem;
  margin-top: 2.8rem;
}
@media (max-width: 940px){
  .entry{ grid-template-columns: 1fr; }
}
.entry__meta{
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}
.entry__title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.14;
  letter-spacing: -0.016em;
  margin: 0 0 1rem;
  max-width: 24ch;
}
.entry__title a{
  text-decoration: none;
  background-image: linear-gradient(var(--signal), var(--signal));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 2px;
  transition: background-size .25s ease;
  padding-bottom: 2px;
}
.entry__title a:hover{ background-size: 100% 2px; }
@media (prefers-reduced-motion: reduce){
  .entry__title a{ transition: none; }
}
.entry__sub{
  font-size: 1.02rem;
  line-height: 1.6;
  color: #33383f;
  margin: 0 0 1.6rem;
  max-width: 54ch;
}
.entry__fig{ margin: 0; }
.entry__fig .figure__frame{ padding: 0.8rem; }
.entry__fig figcaption{
  font-family: var(--mono);
  font-size: 0.64rem;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 0.7rem;
}

/* key numbers row */
.keys{
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 2.6rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.1rem;
  margin-bottom: 1.8rem;
}
.keys div{ min-width: 0; }
.keys dt{
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.keys dd{
  margin: 0;
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ---------- link ---------- */
.go{
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid var(--signal);
  padding-bottom: 0.3rem;
}
.go:hover{ color: #8a6a02; }

/* ---------- contact ---------- */
.contact{
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--margin-w);
  column-gap: var(--margin-gap);
  align-items: end;
}
@media (max-width: 1000px){
  .contact{ grid-template-columns: 1fr; row-gap: 2rem; align-items: start; }
}
.contact__mail{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.4rem, 3.2vw, 2.3rem);
  letter-spacing: -0.015em;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.3rem;
  display: inline-block;
  word-break: break-word;
}
.contact__mail:hover{ border-bottom-color: var(--signal); }
