/* mikesand.ai components (v1 direction, mockup). Depends on tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.55;
  font-kerning: normal;
}
@media (min-width: 48rem) { body { font-size: var(--step-1); } }
img, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 600; letter-spacing: -0.012em; }
p { margin: 0; }
a { color: inherit; text-decoration-line: underline; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2.5px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 1px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Page frame: one wrapper owns the side gutter */
.page { max-width: calc(var(--wide) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); padding-block: 0 var(--s-8); display: flex; flex-direction: column; gap: var(--s-8); }
.page--narrow { max-width: calc(52rem + 2 * var(--gutter)); }

/* Mono labels: the evidence voice */
.kicker, .meta, .label {
  font-family: var(--font-mono); font-size: var(--step--1); line-height: 1.5;
  letter-spacing: 0.04em; font-variant-numeric: tabular-nums;
}
.kicker { text-transform: uppercase; color: var(--red); letter-spacing: 0.07em; }
.label  { text-transform: uppercase; color: var(--muted); letter-spacing: 0.07em; }
.meta   { color: var(--muted); }

/* Site header */
.site-header {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: var(--s-2) var(--s-6); padding-block: var(--s-5) var(--s-4); border-bottom: 1px solid var(--rule);
}
.wordmark { font-weight: 700; font-size: var(--step-2); letter-spacing: -0.02em; text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s-5); }
.site-nav a { text-decoration: none; padding-block: 0.6rem; font-size: var(--step-0); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 0.45em; }
.site-nav .email { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); user-select: all; }
@media (max-width: 40rem) { .site-nav .email { display: none; } }

/* Home hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); align-items: start; }
@media (min-width: 52rem) { .hero { grid-template-columns: minmax(0, 1fr) 15rem; gap: var(--s-8); } }
.hero-text { display: flex; flex-direction: column; gap: var(--s-5); max-width: 46rem; }
.hero h1 { font-size: var(--step-hed); line-height: 1.04; letter-spacing: -0.025em; font-weight: 700; }
.dek { font-size: var(--step-2); line-height: 1.45; color: var(--ink-2); max-width: 40rem; }
.dek a { text-decoration-thickness: 1px; }
.portrait { width: 100%; max-width: 15rem; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; }
@media (max-width: 51.99rem) { .portrait { max-width: 9rem; order: -1; } }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); }

.button {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--s-5);
  border: 1px solid var(--ink); border-radius: var(--radius);
  font: 500 var(--step-0)/1 var(--font-sans); text-decoration: none; color: var(--ink); background: transparent; cursor: pointer;
}
.button--solid { background: var(--ink); color: var(--paper); }
.button:hover { text-decoration: none; box-shadow: inset 0 -3px 0 var(--red); }
.copyable { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); user-select: all; }

/* Track record: dated proof of "since 2013" */
.track { list-style: none; margin: 0; padding: var(--s-4) 0; border-block: 1px solid var(--rule);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: var(--s-3) var(--s-5); }
.track li { display: flex; gap: var(--s-3); align-items: baseline; font-size: var(--step-0); }
.track .year { font-family: var(--font-mono); font-size: var(--step--1); color: var(--red); font-variant-numeric: tabular-nums; }
.track a { text-decoration-color: var(--rule); }
.track a:hover { text-decoration-color: var(--red); }

/* Lead evidence: the One Medical recording */
.evidence { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5) var(--s-7); align-items: start; }
@media (min-width: 48rem) { .evidence { grid-template-columns: 17rem minmax(0, 1fr); } }
.evidence-figure { margin: 0; display: flex; flex-direction: column; gap: var(--s-2); max-width: 17rem; }
.evidence-figure img { border: 1px solid var(--rule); border-radius: 14px; }
.evidence-body { display: flex; flex-direction: column; gap: var(--s-4); max-width: 38rem; }
.evidence-body h2 { font-size: var(--step-4); line-height: 1.1; }

/* Proof cards: equal edges, rule on top, media slot first */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: var(--s-7) var(--s-6); }
.card { display: flex; flex-direction: column; gap: var(--s-3); padding-top: var(--s-4); border-top: 2px solid var(--ink); min-width: 0; }
.card h3 { font-size: var(--step-2); line-height: 1.2; }
.card p { font-size: var(--step-0); }
.card-media { aspect-ratio: 16 / 10; width: 100%; max-width: 100%; background: var(--wash); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.card-media--pages { gap: 0; padding: var(--s-4) var(--s-4) 0; align-items: flex-end; }
.card-media--pages img { width: 34%; border: 1px solid var(--rule); box-shadow: 0 1px 0 var(--rule); margin-inline: -3%; }
.card-media--pages img:nth-child(1) { transform: rotate(-4deg) translateY(4%); }
.card-media--pages img:nth-child(3) { transform: rotate(4deg) translateY(4%); }
.card-media--pages img:nth-child(2) { position: relative; z-index: 1; }

/* Placeholder: marks where media will go (mockup only) */
.placeholder { border: 1px dashed var(--muted); background: var(--wash); color: var(--muted);
  font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.45; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: var(--s-4); }

/* Section heads on the home page */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s-2) var(--s-5); }
.section-head h2 { font-size: var(--step-3); }

/* Article pages (write-up, project, NIST) */
.crumbs { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); padding-top: var(--s-5); }
.crumbs a { text-decoration-color: var(--rule); }
.article-head { display: flex; flex-direction: column; gap: var(--s-4); max-width: 48rem; }
.article-head h1 { font-size: var(--step-4); line-height: 1.08; letter-spacing: -0.02em; }
@media (min-width: 48rem) { .article-head h1 { font-size: 2.75rem; } }
.byline { display: flex; align-items: center; gap: var(--s-3); }
.byline img { width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; }
.prose { display: flex; flex-direction: column; gap: var(--s-5); max-width: var(--measure); }
.prose h2 { font-size: var(--step-3); line-height: 1.2; padding-top: var(--s-4); }
.prose h2 .num { font-family: var(--font-mono); font-size: var(--step--1); color: var(--red); display: block; letter-spacing: 0.07em; margin-bottom: var(--s-1); }

/* Fact list: label/value pairs in mono */
.facts { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s-1) var(--s-5);
  font-family: var(--font-mono); font-size: var(--step--1); line-height: 1.6; color: var(--ink-2); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.summary { background: var(--wash); padding: var(--s-4) var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); max-width: var(--measure); }
.summary p { font-size: var(--step-0); }

/* Two-column article with aside; stacks below 60rem */
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7); align-items: start; }
@media (min-width: 60rem) { .with-aside { grid-template-columns: minmax(0, 1fr) 16rem; } }
.aside { display: flex; flex-direction: column; gap: var(--s-5); font-size: var(--step-0); }
.aside h2 { font-size: var(--step--1); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 400; }
.aside ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.pdf-thumb { width: 8.5rem; border: 1px solid var(--rule); }

/* Primary document: E10-Wa, structure not font */
.doc-sheet { background: var(--sheet); border: 1px solid var(--rule); max-width: calc(var(--measure) + 4.5rem); }
.doc-sheet__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-1) var(--s-4); padding: var(--s-3) var(--s-5); border-bottom: 1px solid var(--rule); }
.doc-sheet__body { padding: var(--s-5) var(--s-5) var(--s-6); display: flex; flex-direction: column; gap: var(--s-4); font-size: var(--step-0); line-height: 1.62; }
@media (min-width: 40rem) { .doc-sheet__body { padding: var(--s-6) var(--s-7) var(--s-7); } }
.doc-sheet__body p, .doc-sheet__body li { max-width: var(--measure); }
.doc-sheet__body strong { font-weight: 600; }
.doc-sheet__body blockquote { margin: 0; padding-left: var(--s-4); border-left: 2px solid var(--rule); color: var(--ink-2); }
.doc-sheet__body ul, .doc-sheet__body ol { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: var(--s-2); }
.doc-sheet__body .table-scroll { overflow-x: auto; border: 1px solid var(--rule); }
.doc-sheet__body table { border-collapse: collapse; font-size: var(--step--1); min-width: 40rem; }
.doc-sheet__body th, .doc-sheet__body td { border-bottom: 1px solid var(--rule); padding: var(--s-2) var(--s-3); text-align: left; vertical-align: top; }
.doc-sheet__body th { font-family: var(--font-mono); font-weight: 500; color: var(--muted); }

/* Recording treatments (msai-E15a) */
.clips { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 16rem)); gap: var(--s-5); }
.clip { margin: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.clip video { border: 1px solid var(--rule); border-radius: 14px; background: var(--wash); }
.filmstrip { margin: 0; display: flex; flex-direction: column; gap: var(--s-3); max-width: 100%; }
.filmstrip__scroll { overflow-x: auto; }
.filmstrip ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(6.5rem, 1fr)); gap: var(--s-2); min-width: 40rem; }
.filmstrip li { display: flex; flex-direction: column; gap: var(--s-1); }
.filmstrip li img { border: 1px solid var(--rule); border-radius: 8px; }
.filmstrip .t { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.filmstrip .t b { color: var(--red); font-weight: 500; }

/* Video facade: click-to-load YouTube (the one third-party exception) */
.facade { display: flex; flex-direction: column; gap: var(--s-2); max-width: 36rem; }
.facade__frame { aspect-ratio: 16 / 9; max-width: 100%; background: var(--ink); color: var(--paper); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: var(--s-3); padding: var(--s-5); text-align: center; text-decoration: none; }
.facade__frame:hover { text-decoration: none; }
.facade__play { font: 500 var(--step-0)/1 var(--font-sans); border: 1px solid currentColor; padding: var(--s-3) var(--s-5); border-radius: var(--radius); }
.facade__frame .meta { color: inherit; opacity: 0.8; }

/* One work, many views */
.work-ref { border-top: 1px solid var(--rule); padding-top: var(--s-3); display: flex; flex-direction: column; gap: var(--s-1); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chips a { display: inline-block; font-family: var(--font-mono); font-size: var(--step--1); padding: 0.35rem 0.6rem; border: 1px solid var(--rule); text-decoration: none; border-radius: var(--radius); }
.chips a:hover { border-color: var(--ink); }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); border-top: 1px solid var(--rule); padding-top: var(--s-4); }

/* Footer */
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3) var(--s-6); padding-block: var(--s-5); border-top: 1px solid var(--rule); font-size: var(--step--1); color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.site-footer a { text-decoration-color: var(--rule); }



@media print {
  .site-nav, .actions, .facade, .clips, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
}

/* Home crossfade strip (msai-E15-W): only where there is room */
.crossfade { display: none; margin: 0; flex-direction: column; gap: var(--s-2); }
@media (min-width: 64rem) { .crossfade { display: flex; } }
.crossfade ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 6.5rem)); gap: var(--s-2); }
.crossfade li { display: flex; flex-direction: column; gap: 2px; }
.crossfade img { border: 1px solid var(--rule); border-radius: 6px; }
.crossfade .t { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--red); font-variant-numeric: tabular-nums; }

/* Origin + track record: the 2013 photo anchors "since 2013" */
.origin { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4) var(--s-6); align-items: center; border-block: 1px solid var(--rule); padding-block: var(--s-4); }
@media (min-width: 48rem) { .origin { grid-template-columns: 15rem minmax(0, 1fr); } }
.origin-figure { margin: 0; display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: var(--s-3); align-items: end; }
.origin-figure img { width: 5.5rem; aspect-ratio: 11 / 18; object-fit: cover; object-position: 50% 20%; border: 1px solid var(--rule); }
.origin .track { border-block: 0; padding: 0; }
.origin .track { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
@media (max-width: 40rem) { .origin .track { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); } }

/* Notes in primary documents (SP 1353 has 18 numbered notes + references).
   Endnotes, as in the document as sent; the reference marker links down, the note links back. */
.doc-sheet__body sup a.fnref { font-family: var(--font-mono); font-size: 0.72em; color: var(--red); text-decoration: none; padding-inline: 0.1em; }
.doc-sheet__body sup a.fnref:hover { text-decoration: underline; }
.doc-notes { border-top: 1px solid var(--rule); padding-top: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }
.doc-notes ol { margin: 0; padding-left: 2.2em; display: flex; flex-direction: column; gap: var(--s-2); font-size: var(--step--1); line-height: 1.55; }
.doc-notes li::marker { font-family: var(--font-mono); color: var(--red); }
.doc-notes li:target { background: var(--wash); outline: 1px solid var(--rule); outline-offset: 4px; }
.doc-notes .fnback { font-family: var(--font-mono); text-decoration: none; margin-left: 0.4em; }
.doc-refs ul { list-style: none; padding-left: 0; }
.doc-refs li { padding-left: 1.5em; text-indent: -1.5em; overflow-wrap: anywhere; }
/* List markers as in the PDF as sent (SP 1353: ● bullets, ⚠ for the use-case to avoid) */
.doc-sheet__body ul.mark-dot { list-style-type: "●  "; }
.doc-sheet__body ul.mark-warn { list-style-type: "⚠  "; }

/* ---- Production additions (build agent, 2026-10-13) ---- */
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: var(--s-2) var(--s-4); z-index: 10; }
.skip:focus { left: var(--s-4); top: var(--s-2); }
.page-main { display: flex; flex-direction: column; gap: var(--s-8); }
.stack { display: flex; flex-direction: column; gap: var(--s-5); }
.stack--wide { gap: var(--s-6); min-width: 0; }
.refs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: var(--s-6); }
.work-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; max-width: 48rem; }
.work-row { display: flex; flex-direction: column; gap: var(--s-2); padding-block: var(--s-5); border-top: 1px solid var(--rule); }
.work-row:first-child { border-top: 2px solid var(--ink); }
.work-row h2 { font-size: var(--step-2); line-height: 1.25; }
.work-row h2 a { text-decoration-color: var(--rule); }
.work-row h2 a:hover { text-decoration-color: var(--red); }
.skills-index { display: flex; flex-direction: column; gap: var(--s-5); }
.skill-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: var(--s-6) var(--s-7); }
.skill-group { display: flex; flex-direction: column; gap: var(--s-2); border-top: 1px solid var(--rule); padding-top: var(--s-3); }
.skill-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); font-size: var(--step-0); }
.skill-lines li:target { background: var(--wash); outline: 1px solid var(--rule); outline-offset: 4px; }
.skill-note { color: var(--ink-2); }
.skill-lines strong { font-weight: 600; }
.link-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.project-photo { margin: 0; display: flex; flex-direction: column; gap: var(--s-2); max-width: 15rem; }
.project-photo img { border: 1px solid var(--rule); }
.card-media--mark { flex-direction: column; gap: var(--s-2); text-decoration: none; }
.mark-type { font-weight: 700; font-size: var(--step-3); letter-spacing: -0.02em; }
.doc-sheet__body ul.doc-list--warn { list-style: none; padding-left: 1.6em; }
.doc-sheet__body ul.doc-list--warn > li::before { content: "\26A0\FE0E"; display: inline-block; width: 1.6em; margin-left: -1.6em; color: var(--red); }
.doc-sheet__body hr { border: 0; border-top: 1px solid var(--rule); margin: var(--s-2) 0; width: 100%; }
.doc-notes ol.notes { padding-left: 2.6em; }
.cv-head, .contact { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); align-items: start; }
@media (min-width: 48rem) { .cv-head, .contact { grid-template-columns: minmax(0, 1fr) 16rem; } }
.cv-photo { width: 100%; max-width: 16rem; aspect-ratio: 3 / 2; object-fit: cover; border: 1px solid var(--rule); }
.cv-h { font-size: var(--step--1); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 400; border-bottom: 1px solid var(--rule); padding-bottom: var(--s-2); margin-bottom: var(--s-4); }
.cv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-5); max-width: var(--measure); }
.cv-role { display: flex; flex-direction: column; gap: var(--s-1); }
.cv-role h3 { font-size: var(--step-1); }
.plain-list { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: var(--s-2); max-width: var(--measure); }
.contact-email { font-size: var(--step-3); font-weight: 600; }
@media print {
  .site-header, .site-footer, .cv-photo, .crumbs { display: none !important; }
  .page { max-width: none; padding: 0; gap: 12pt; }
  .page-main { gap: 14pt; }
  a { color: #000; text-decoration: none; }
  .kicker, .meta, .label, .cv-h { color: #333 !important; }
  .cv-list, .plain-list { max-width: none; }
  @page { margin: 16mm; }
}
.facade__iframe { aspect-ratio: 16 / 9; width: 100%; max-width: 36rem; border: 0; background: var(--ink); }
.card-media--shot { align-items: flex-start; }
.card-media--shot picture, .card-media--shot img { width: 100%; height: 100%; }
.card-media--shot img { object-fit: cover; object-position: 50% 0; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 14rem)); gap: var(--s-5); }
.shot { margin: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.shot img { border: 1px solid var(--rule); border-radius: 14px; }
