/*
 * Kittangi Partnership, shared stylesheet.
 * Used by index.html and every generated <slug>.html (scripts/build.py).
 *
 * The look is the whalstreet /kittangi section as it shipped in the 2026-10
 * Apple-style redesign (monochrome, no rounded corners, IBM Plex Sans body,
 * JetBrains Mono for dates, open row lists with chevrons). Tokens below are
 * whalstreet's light-theme values. No pink: the mark is solid ink; the favicon,
 * the masthead mark and the masthead name sit on a subtle yellow tile.
 */

:root {
  --bg:             #ffffff;
  --surface:        #ffffff;
  --surface-alt:    #f5f5f7;
  --border:         #d2d2d7;
  --border-subtle:  #e8e8ed;
  --text:           #1d1d1f;
  --text-secondary: #6e6e73;
  --text-faint:     #86868b;
  --hover:          #f5f5f7;
  --highlight:      #ffff6e;
  --brand-tile:     #fff0b3;   /* the favicon tile yellow, behind the masthead mark + name */
  --font: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --brand-font: 'Plus Jakarta Sans', var(--font);
}

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

html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Shell: the site chrome is a 1280 column like whalstreet; content narrows inside it. */
.shell {
  width: 100%;
  max-width: 1280px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
}
main { flex: 1 1 auto; display: flex; flex-direction: column; }

/* Header: the lockup, left-aligned like a site nav, over a hairline */
.site-header {
  display: flex;
  align-items: center;
  height: 56px;
  border-bottom: 1px solid var(--border-subtle);   /* masthead hairline: removed then restored 2026-10-19 (Ashwin) */
}
/* Investor login, top right: whalstreet's "Sign in" pill (r-pill r-pill-primary,
   measured 2026-10-19): ink fill, white 12px/400 IBM Plex Sans, 7px 12px, square,
   28px tall, fade on hover. Dummy: no action. */
.nav-login {
  margin-left: auto;
  /* The yellow tile's 38px height, so its top and bottom line up with KITTANGI. */
  display: inline-flex;
  align-items: center;
  height: 38px;
  /* Text = whalstreet's "Sign in" exactly (IBM Plex Sans 12px/400, -0.12px, the
     browser's default smoothing; this site sets antialiased on body, which thins it).
     Ashwin 2026-10-19: "the font still doesnt look right. check whalstreet.com". */
  font-family: var(--font);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.12px;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  line-height: 1;
  padding: 0 14px;
  border-radius: 0;
  border: 1px solid #1d1d1f;
  background: #1d1d1f;
  color: #ffffff;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.32s cubic-bezier(0.4, 0, 0.6, 1);
}
.nav-login:hover { opacity: 0.86; }
/* Disabled (Ashwin 2026-10-19: "signify it is currently disabled"): Apple's disabled
   grey, no hover, not-allowed cursor. No "coming soon" text (house rule). */
.nav-login:disabled {
  background: var(--surface-alt);
  border-color: var(--border-subtle);
  color: var(--text-faint);
  cursor: not-allowed;
}
.nav-login:disabled:hover { opacity: 1; }
.nav-login:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px 5px 5px;
  background: var(--brand-tile);
  text-decoration: none;
  color: var(--text);
  font-family: var(--brand-font);
}
/* ONE continuous yellow tile behind the mark and the name, with a margin of
   yellow around the mark's outline like the favicon (Ashwin 2026-10-19). */
.brand-mark { width: 28px; height: 28px; flex: 0 0 auto; color: var(--text); }
.brand-lockup { display: flex; flex-direction: column; line-height: 1; }
.brand-word { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.brand-sub {
  display: flex;
  justify-content: space-between;   /* letters spread to the wordmark's width */
  margin-top: 4px;
  font-weight: 700;
  font-size: 6px;
}

/* Index: the two sections, side by side; open lists (no boxes) */
.kit-index {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 88px 0 60px;
}
.kit-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));   /* Fieldnotes · Research reports · Partnership letters */
  flex: 1 1 auto;
}
.kit-col { min-width: 0; padding: 0 26px; }
.kit-col:first-child { padding-left: 0; }
.kit-col:last-child { padding-right: 0; }
/* Vertical hairline between the three sections (Ashwin 2026-10-19; removed 10-18,
   back now). Desktop only: phones stack the sections. */
.kit-col + .kit-col { border-left: 1px solid var(--border-subtle); }
/* Continuous lines (Ashwin 2026-10-19: "the lines should be continuous, not
   broken"): on the INNER sides the title line and the row hairlines run the full
   26px column padding, so they meet the vertical line; the text keeps its place
   (padding grows by the same amount). Outer sides keep the -16px hover inset. */
.kit-col:not(:first-child) h2,
.kit-col:not(:first-child) .kit-group { margin-left: -26px; }
.kit-col:not(:first-child) h2,
.kit-col:not(:first-child) .kit-row { padding-left: 26px; }
.kit-col:not(:first-child) .kit-sub { padding-left: 46px; }
.kit-col:not(:last-child) h2,
.kit-col:not(:last-child) .kit-group { margin-right: -26px; }
.kit-col:not(:last-child) h2,
.kit-col:not(:last-child) .kit-row { padding-right: 26px; }
.kit-col h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15;
  /* a 1px ink line under each section title (Ashwin 2026-10-19) */
  /* -16px sides like .kit-group, so this line and the row hairlines share their ends */
  margin: 0 -16px; padding: 0 16px 12px; border-bottom: 1px solid var(--text); }

/* No box (Ashwin 2026-10-19: "i want it simpler … getting rid of the boxes"):
   a plain list with hairlines between entries. The -16px side margin keeps the
   rows' 16px padding (and the hover fill) while the titles line up with the h2. */
.kit-group {
  margin: 4px -16px 0;   /* was 18px: the title line to the first row is now ~18px (Ashwin 2026-10-19) */
}
.kit-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
  transition: background 120ms ease;
}
/* No row hairlines (Ashwin 2026-10-19): the only line is the one under each
   section title. Top-level entries are grouped by space instead: a little extra
   above each, sub-entries stay tight under their parent. */
.kit-row + .kit-row:not(.kit-sub) { margin-top: 6px; }
.kit-row:not(.kit-head):hover, .kit-row:focus-visible { background: var(--hover); }
.kit-head { cursor: default; }
.kit-t { flex: 0 1 auto; min-width: 0; font-size: 15px; font-weight: 400; line-height: 1.35; color: var(--text); }
.kit-n { color: var(--text-faint); }
.kit-sub { padding: 0 16px 10px 36px; }
.kit-sub .kit-t { font-size: 12px; color: var(--text-secondary); }
.kit-row:has(+ .kit-sub) { padding-bottom: 10px; }

/* Article page */
.piece { max-width: 720px; width: 100%; margin: 0 auto; padding: 32px 0 80px; }
.piece-date {
  font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text); margin-bottom: 10px;
}
.piece-title { font-size: 36px; font-weight: 600; letter-spacing: -0.6px; line-height: 1.15; margin: 0 0 22px; }
.piece-rule { border: none; border-top: 3px double var(--text); margin: 0 0 28px; }

.piece h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; margin: 44px 0 14px; }
.piece p { font-size: 16px; line-height: 1.72; margin: 0 0 18px; }
.piece p.small { font-size: 13.5px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 12px; }
.piece strong { font-weight: 700; }
.piece em { font-style: italic; }
.piece sup { font-size: .7em; line-height: 0; vertical-align: super; }
.piece mark { background: var(--highlight); color: inherit; padding: 1px 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.piece ul { margin: 0 0 18px; padding-left: 22px; }
.piece li { font-size: 16px; line-height: 1.72; margin-bottom: 8px; }
.callout {
  margin: 24px 0;
  padding: 14px 18px;
  background: var(--surface-alt);
  border-left: 3px solid var(--text);
  font-size: 16px;
  line-height: 1.65;
}
.table-wrap { overflow-x: auto; margin: 8px 0 24px; }
.piece table { border-collapse: collapse; }
.piece th {
  text-align: left; font-size: 10.5px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--text-faint); padding: 6px 14px 6px 0; border-bottom: 1px solid var(--border);
}
.piece td {
  font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums;
  padding: 7px 14px 7px 0; border-bottom: 1px solid var(--border-subtle);
}
.piece figure { margin: 22px 0 28px; }
.piece figure img { display: block; max-width: 100%; height: auto; }

.pdf-row { display: flex; justify-content: flex-end; margin-top: 36px; }
.pdf-dl { display: inline-flex; color: var(--text-secondary); line-height: 0; }
.pdf-dl:hover { color: var(--text); }

.piece-nav {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 2px solid var(--text);
  display: flex;
  gap: 12px;
}
.piece-nav a {
  flex: 1 1 0;
  min-width: 0;
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  color: inherit;
  text-decoration: none;
}
.piece-nav a:hover { background: var(--hover); }
.piece-nav .nav-eyebrow { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 6px; }
.piece-nav .nav-next { text-align: right; }
.piece-nav .nav-title { font-size: 14px; font-weight: 700; line-height: 1.35; letter-spacing: -0.2px; }

/* Footer */
.site-footer {
  padding: 14px 0 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 11px;
  color: var(--text-faint);
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
  .kit-index { padding-top: 40px; }
  .kit-cols { grid-template-columns: 1fr; }
  .kit-col { padding: 0; }
  .kit-col + .kit-col { border-left: 0; }
  .kit-col h2, .kit-col .kit-group { margin-left: -16px !important; margin-right: -16px !important; }
  .kit-col h2, .kit-col .kit-row { padding-left: 16px !important; padding-right: 16px !important; }
  .kit-col .kit-sub { padding-left: 36px !important; }
  .kit-col + .kit-col { margin-top: 40px; }
  .piece-title { font-size: 28px; }
  .piece p, .piece li { font-size: 15px; }
  .piece-nav { flex-direction: column; }
  .piece-nav .nav-next { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
