/* Portrait, field notes and the local inference lab share one editorial grid. */
.studio-home, .lab-page {
  --ink: #142721; --paper: #f8f8f5; --pine: #153e35; --mint: #b8ebcf;
  --rule: #d5dcd6; --measure: 1184px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0;
}
.studio-home { overflow-x: clip; }
.studio-home .topbar { background: #fafbf9; backdrop-filter: none; }
.studio-home .topbar .brand { color: var(--ink); }
.studio-home .nav a.active { color: #185e40; text-decoration: underline; text-underline-offset: 5px; }
.portrait-intro { isolation: isolate; position: relative; overflow: hidden; display: flex; align-items: center; min-height: min(640px,calc(100svh - 170px)); padding: 64px max(5%,calc((100% - var(--measure)) / 2)); background: #ded6ca; color: var(--ink); }
.portrait-stage { position: absolute; z-index: -1; inset: 0 0 0 auto; width: 54%; mask-image: linear-gradient(to right,transparent,#000 24%); }
.portrait-photo { width: 100%; height: 100%; object-fit: cover; object-position: 52% 36%; display: block; }
.portrait-copy { max-width: 54%; }
.folio-label { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 24px; font: 600 .74rem/1.4 ui-monospace,Consolas,monospace; text-transform: uppercase; }
.folio-label i { display: inline-block; width: 24px; height: 2px; background: currentColor; }
.portrait-copy h1 { margin: 0; font-size: 5.3rem; line-height: .99; letter-spacing: 0; font-weight: 640; }
.portrait-copy h1 span { color: #256849; }
.portrait-role { font-size: 1.27rem; font-weight: 600; color: #254438; margin: 22px 0 9px; }
.portrait-lead { max-width: 45ch; line-height: 1.6; margin: 0; color: #324239; }
.portrait-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 26px; }
.portrait-links a, .folio-action, .local-more, .lab-chapters a, .report-link { font-size: .91rem; font-weight: 600; color: inherit; text-underline-offset: 4px; }
.portrait-links a:not(.folio-action) { padding-block: 8px; }
.folio-action { display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: white !important; padding: 14px 22px; text-decoration: none; border-radius: 100px; }
.folio-action:hover { background: #2b5244; }
.folio-wrap { width: min(calc(100% - 80px), var(--measure)); margin: auto; }
.local-feature { background: #102a25; color: #f3f8f4; padding-block: 64px 48px; }
.local-heading { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px 20px; padding-bottom: 32px; border-bottom: 1px solid #456158; }
.local-heading .folio-label { grid-column: 1 / -1; margin: 0; color: var(--mint); }
.local-heading h2, .report-title { font-size: 3.5rem; font-weight: 590; margin: 0; line-height: 1.06; text-wrap: balance; }
.local-more { color: var(--mint); padding-block: 8px; }
.lab-sequence { display: grid; grid-template-columns: 1.35fr 1fr; gap: 7%; padding-block: 32px; align-items: start; }
.lab-display { position: sticky; top: 100px; display: grid; isolation: isolate; aspect-ratio: 1.27; overflow: hidden; background: #111c19; border-radius: 4px; }
.lab-display img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 60% center; z-index: -1; }
.lab-display::after { content: ""; position: absolute; inset: 0; z-index: -1; background: #071d18; opacity: 0; }
.lab-readout { align-self: center; grid-area: 1/1; padding: 28px; display: grid; gap: 5px; opacity: 0; }
.lab-readout b { font: 550 4.4rem/1.05 system-ui,sans-serif; }
.lab-readout b small { font-size: 1.1rem; }
.lab-readout span, .lab-ruler { font: 500 .75rem/1.5 ui-monospace,monospace; color: #d1e6d8; }
.lab-readout span + b { margin-top: 14px; }
.lab-ruler { position: absolute; inset: auto 24px 18px; display: flex; align-items: center; gap: 12px; }
.lab-ruler span { position: relative; height: 2px; background: #6f817b; flex: 1; }
.lab-ruler span::before { content: ""; position: absolute; inset: 0; background: white; transform: scaleX(var(--travel,0)); transform-origin: left; }
.lab-chapters article { min-height: min(49svh,470px); display: flex; flex-direction: column; justify-content: center; align-items: start; padding-block: 38px; border-bottom: 1px solid #456158; }
.lab-chapters small, .retrieval-map small { font: 500 .76rem/1.4 ui-monospace,monospace; color: var(--mint); }
.lab-chapters h3 { margin: 14px 0 8px; font-size: 2.05rem; font-weight: 580; line-height: 1.14; }
.lab-chapters p { margin: 0; max-width: 43ch; color: #d1ded8; line-height: 1.75; }
.lab-chapters a { color: var(--mint); margin-top: 16px; }
.studio-home .ai-editorial { background: #f7f9f7; }
.studio-home .editorial-heading { text-align: left; max-width: none; margin: 0; }
.studio-home .editorial-heading h2, .studio-home .memory-vision h2 { font-size: 3.4rem; line-height: 1.06; }
.studio-home .editorial-heading > p:last-child { margin-left: 0; }
.retrieval-map { background: #e0ebe5; color: #173f34; padding: 28px 34px; display: grid; justify-items: start; }
.retrieval-map small { margin-bottom: 20px; color: #3e685a; }
.retrieval-map strong { padding: 3px 8px; font-size: 1.5rem; line-height: 1.3; font-weight: 550; }
.retrieval-map b { padding: 0 8px; color: #487663; }
.retrieval-lab:has([value="question"]:checked) .retrieval-map strong:first-of-type,
.retrieval-lab:has([value="source"]:checked) .retrieval-map strong:nth-of-type(2),
.retrieval-lab:has([value="answer"]:checked) .retrieval-map strong:last-of-type { background: #204c3f; color: white; }
.studio-home main > .memory-vision { background: #f2f0eb; color: #262d28; }
.studio-home .memory-vision-intro { min-height: 0; overflow: visible; display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; }
.studio-home .memory-vision p, .studio-home .memory-vision a, .studio-home .memory-topology, .studio-home .memory-topology strong { color: #40544b; }
.memory-die { display: grid; grid-template-columns: 1fr 1.25fr 1fr; align-items: center; gap: 4px; color: #234435; padding-block: 28px; }
.memory-die > * { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid #8ea797; font: 550 1.4rem ui-monospace,monospace; }
.memory-die b { color: white; background: #254d3e; outline: 1px solid #547969; outline-offset: 4px; }
.studio-home .memory-vision .memory-topology { border-color: #c3cdc5; }
.studio-home #expertise .tile { border-top-color: #a1b5aa; }
.studio-home .section-head h2 { font-size: 2.8rem; line-height: 1.1; }
.studio-home main > .chatgpt-ads-promo { isolation: isolate; background: #352741; min-height: 400px; }
.ads-type { position: absolute; right: 4%; top: 50%; transform: translateY(-55%); color: #bba3ca; font: 600 12rem/1 Georgia,serif; }
.ads-type span { color: #eeb88a; }
.studio-home .chatgpt-ads-promo-content { max-width: 57%; }
.studio-home .chatgpt-ads-promo-kicker, .studio-home .chatgpt-ads-promo-points { color: #e6cfea; }
.studio-home .software-group { border: 0; border-bottom: 1px solid #bdcdc3; border-radius: 0; }
.studio-home .software-group > summary { padding-inline: 5px; }
.studio-home .software-group > summary h3 { font-size: 1.2rem; }
.studio-home .career-card, .studio-home .career-item.active .career-card, .studio-home .career-item.passed .career-card { background: #edf3ee; border: 0; border-left: 3px solid #5a8069; border-radius: 0; }
.studio-home .certificate-card { border-radius: 3px; }
.studio-home .timeline-item { grid-template-columns: 60px 1fr; align-items: start; }
.studio-home .step { color: #436551; font: 500 2.35rem/1 ui-monospace,monospace; }
.studio-home .solution-number { font: 600 .74rem/1.4 ui-monospace,monospace; color: #416353; }
@media (min-width:901px) {
  .studio-home :is(#software,#approach) { display: grid; grid-template-columns: 1fr 1.8fr; gap: 64px; align-items: start; }
  .studio-home :is(#software,#approach) .section-head { position: sticky; top: 100px; margin: 0; }
  .studio-home #software .software-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .studio-home #approach .timeline { grid-template-columns: 1fr; gap: 0; }
  .studio-home #approach .timeline-item { padding-block: 26px; }
}
.studio-home #contact { text-align: left; }
.studio-home #contact h2 { font-size: 2.9rem; margin-left: 0; }
.studio-home #contact .hero-actions { justify-content: flex-start; }
.studio-home :is(.local-feature,.portrait-intro) a:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
@media (prefers-reduced-motion:no-preference) {
  .lab-sequence[data-scene] .lab-display img { transform: scale(calc(1 + var(--travel,0) * .29)) translateX(calc(var(--travel,0) * -3%)); }
  .lab-display::after, .lab-readout { transition: opacity .35s ease; }
  .lab-sequence:is([data-scene="1"],[data-scene="2"]) .lab-display::after { opacity: .83; }
  .lab-sequence[data-scene="1"] [data-frame="1"], .lab-sequence[data-scene="2"] [data-frame="2"] { opacity: 1; }
  @supports (animation-timeline: view()) {
    .memory-die { view-timeline-name: --memory; }
    .memory-die > :first-child, .memory-die > :last-child { animation: assemble linear both; animation-timeline: --memory; animation-range: entry 0% cover 42%; }
    .memory-die > :last-child { --apart: 18%; }
    @keyframes assemble { from { transform: translateX(var(--apart,-18%)) scale(.88); opacity: .35; } to { transform: none; opacity: 1; } }
    .portrait-stage { animation: portrait-exit linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
    @keyframes portrait-exit { to { transform: translateY(9%) scale(1.08); } }
  }
}
@media (max-width:1100px) {
  .portrait-copy h1 { font-size: 4rem; }
  .local-heading h2 { font-size: 2.8rem; }
  .ads-type { font-size: 9rem; }
}
@media (max-width:800px) {
  .folio-wrap { width: calc(100% - 40px); }
  .lab-chapters h3 { font-size: 1.6rem; }
  .studio-home .memory-vision-intro { gap: 20px; }
  .local-heading { grid-template-columns: 1fr; }
  .local-more { justify-self: start; }
}
@media (max-width:700px) {
  .portrait-intro { display: block; min-height: 0; padding: 0; }
  .portrait-stage { position: relative; width: 100%; height: clamp(175px,31svh,305px); mask-image: none; z-index: 0; }
  .portrait-photo { object-position: center 31%; }
  .portrait-copy { position: relative; max-width: none; padding: 22px 20px 30px; background: #ded6ca; }
  .portrait-copy .folio-label { margin-bottom: 10px; font-size: .68rem; }
  .portrait-copy h1 { font-size: 2.95rem; }
  .portrait-role { margin-top: 12px; font-size: 1.03rem; }
  .portrait-lead { font-size: .93rem; line-height: 1.5; }
  .portrait-links { gap: 4px 16px; margin-top: 15px; }
  .portrait-links a { font-size: .81rem; }
  .folio-action { padding: 11px 15px; }
  .local-feature { padding: 34px 0 20px; }
  .local-heading { padding-bottom: 20px; }
  .local-heading h2, .studio-home .editorial-heading h2, .studio-home .memory-vision h2, .studio-home .section-head h2, .studio-home #contact h2 { font-size: 2rem; }
  .lab-sequence { display: block; padding-block: 16px; }
  .lab-display { top: 62px; z-index: 2; height: clamp(140px,25svh,235px); aspect-ratio: auto; box-shadow: 0 -14px 0 #102a25; }
  .lab-display img { object-position: 50% 52%; }
  .lab-readout { padding: 16px 22px 28px; gap: 0; }
  .lab-readout b { font-size: 2rem; }
  .lab-readout span + b { margin-top: 4px; }
  .lab-ruler { bottom: 8px; }
  .lab-chapters article { min-height: 36svh; padding: 22px 0; }
  .studio-home .memory-vision-intro { display: flex; flex-direction: column; align-items: stretch; padding-top: 0; gap: 0; }
  .memory-die { align-self: center; width: min(100%,340px); padding-block: 4px 22px; }
  .ads-type { position: static; transform: none; font-size: 4.8rem; margin-bottom: 12px; }
  .studio-home .chatgpt-ads-promo-content { max-width: 100%; }
}
@media (max-width:700px) and (max-height:700px) {
  .portrait-stage { height: 185px; }
  .portrait-copy h1 { font-size: 2.45rem; }
  .portrait-copy { padding-block: 14px 18px; }
}
@media (prefers-reduced-motion:reduce), (max-height:490px) {
  .lab-display { position: relative; top: auto; }
  .lab-chapters article { min-height: auto; }
}

.lab-page { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.6; }
.lab-page *, .lab-page *::before, .lab-page *::after { box-sizing: border-box; }
.lab-page [id] { scroll-margin-top: 86px; }
.lab-page a { color: inherit; text-underline-offset: .2em; }
.lab-page :focus-visible { outline: 2px solid #297553; outline-offset: 4px; }
.report-skip { position: absolute; z-index: 5; padding: 12px; background: white; transform: translateY(-150%); }
.report-skip:focus { transform: none; }
.report-nav { position: sticky; z-index: 3; top: 0; min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px max(20px,calc((100% - var(--measure)) / 2)); background: #f8faf8; border-bottom: 1px solid var(--rule); }
.report-nav > a, .report-nav nav { display: flex; align-items: center; gap: 10px; }
.report-nav a { font-size: .87rem; font-weight: 600; text-decoration: none; }
.report-nav nav { gap: 18px; }
.report-hero { isolation: isolate; position: relative; overflow: hidden; color: white; display: grid; align-items: center; min-height: min(560px,65svh); background: #102019; }
.report-hero > img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.report-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,rgba(7,17,13,.95),rgba(7,17,13,.73) 37%,transparent 72%); }
.report-hero .folio-wrap { padding-block: 44px; }
.report-title { font-size: 5rem; }
.report-title span { color: var(--mint); }
.report-hero p:not(.folio-label) { max-width: 39ch; font-size: 1.12rem; line-height: 1.6; }
.report-hero a, .proof-grid a { color: var(--mint); font-weight: 600; }
.report-section, .report-end { padding-block: 66px; }
.report-section h2, .report-end h2 { margin: 0 0 18px; font-weight: 590; font-size: 2.7rem; line-height: 1.12; text-wrap: balance; }
.report-section .folio-label { margin-bottom: 12px; }
.report-intro, .report-note, .report-section details p { max-width: 78ch; }
.report-note { margin-top: 22px; color: #515e56; font-size: .9rem; }
.metric-select { border: 0; min-inline-size: 0; margin: 24px 0 0; padding: 0; }
.metric-select legend { font-size: .78rem; font-weight: 600; margin-block: 8px; }
.metric-tabs { display: none; }
.metric-plot { padding: 24px 0 0; margin: 0; }
.metric-plot figcaption { font-size: 1.22rem; font-weight: 650; }
.plot-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px 16px; margin-top: 16px; }
.plot-row span { font-weight: 550; }
.plot-row b, .plot-axis { font: 550 .84rem/1.5 ui-monospace,monospace; }
.plot-track { grid-column: 1/-1; background: #dfe5df; height: 9px; position: relative; }
.plot-track i { position: absolute; height: 100%; left: var(--start); width: calc(var(--end) - var(--start)); background: #276747; }
.plot-track i.range { background: repeating-linear-gradient(115deg,#317353 0 4px,#dbecdf 4px 7px); border-inline: 1px solid #175837; }
.plot-track i.point { height: 15px; width: 15px; background: #633768; border-radius: 50%; transform: translate(-50%,-3px); }
.plot-axis { display: flex; justify-content: space-between; color: #526055; }
@supports selector(:has(:checked)) {
  .metric-tabs { display: inline-flex; gap: 4px; padding: 4px; background: #e2e8e2; border-radius: 24px; }
  .metric-tabs label { position: relative; }
  .metric-tabs input { position: absolute; opacity: 0; }
  .metric-tabs span { display: block; padding: 8px 15px; font-size: .91rem; cursor: pointer; border-radius: 24px; }
  .metric-tabs input:checked + span { color: white; background: #194032; }
  .metric-tabs input:focus-visible + span { outline: 2px solid #277455; outline-offset: 2px; }
  .metric-plot { display: none; }
  .metric-select:has([value="decode"]:checked) .plot-decode, .metric-select:has([value="banda"]:checked) .plot-banda, .metric-select:has([value="costo"]:checked) .plot-costo { display: block; }
}
.report-band { color: white; background: #12362d; }
.proof-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 30px; margin-top: 26px; }
.proof-grid article { border-top: 1px solid #779689; padding-top: 16px; }
.proof-grid small, .proof-grid i { font: 500 .78rem ui-monospace,monospace; }
.proof-grid strong { display: block; font: 580 3rem/1.3 system-ui,sans-serif; margin-top: 10px; }
.proof-grid p { color: #d6e4db; }
.report-table { max-width: 100%; overflow-x: auto; }
.report-table table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.report-table :is(td,th) { padding: 14px 12px; border-bottom: 1px solid var(--rule); text-align: left; white-space: nowrap; }
.report-table thead { background: #e3ebe4; }
.report-table small { display: block; font-weight: 450; }
.report-table caption { text-align: left; padding-bottom: 12px; }
.report-section details { border-top: 1px solid var(--rule); }
.report-section summary { padding-block: 16px; font-weight: 650; cursor: pointer; }
.report-section details p { margin: 0 0 24px; }
.record-book { border-top: 1px solid var(--rule); }
.record-book summary small { color: #556b5f; font-weight: 450; }
.record-scroll { max-height: 480px; margin-bottom: 18px; }
.record-scroll thead { position: sticky; top: 0; }
.report-end { background: #dee8e1; }
.report-end .report-link { display: inline-block; padding: 12px; }
@media (max-width:700px) {
  .report-nav { flex-wrap: wrap; gap: 4px 12px; }
  .report-nav nav { gap: 12px; }
  .report-nav nav a { font-size: .8rem; }
  .report-hero { min-height: 420px; align-items: end; }
  .report-hero::after { background: linear-gradient(0deg,#07110d 0%,rgba(7,17,13,.86) 48%,transparent); }
  .report-hero > img { height: 66%; }
  .report-hero .folio-wrap { padding-block: 26px; }
  .report-title { font-size: 3.5rem; }
  .report-section, .report-end { padding-block: 40px; }
  .report-section h2, .report-end h2 { font-size: 2rem; }
  .proof-grid { grid-template-columns: 1fr; gap: 18px; }
  .plot-row { gap: 4px 8px; font-size: .85rem; }
  .plot-row b { font-size: .76rem; }
}
@media print {
  .lab-page .metric-plot { display: block; break-inside: avoid; }
  .report-nav, .metric-tabs, .report-end { display: none; }
}
