:root {
  --paper: #f7f7f5;
  --ink: #171925;
  --copy: #404453;
  --muted: #565d71;
  --rule: #d8dbe4;
  --white: #ffffff;
  --green: #3847c5;
  --pale-green: #edf0ff;
  --accent: #ddfa85;
  --studio: #161821;
  --studio-panel: #20232d;
  --studio-rule: #414654;
  --studio-text: #d7d9e4;
}

.site-head { background: var(--white); }
.site-head nav a { font-weight: 640; }
.brandmark { background: #252e96; }
.brand small { color: #555d72; }
.primary { border-radius: 8px; }
.primary:hover { background: #29349c; }
.quiet { border-radius: 8px; }
.guide-card, .symptom-card { border-radius: 16px; }
.guide-card:hover, .symptom-card:has(a:focus-visible) { border-color: #8590c7; }
.section-head h2 { letter-spacing: -.061em; }

.home-hero { padding-block: 1.35rem 0; }
.home-hero-inner {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: clamp(490px, 50svh, 620px);
  display: grid;
  align-items: center;
  grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr);
  border-radius: 27px;
  background: #111420;
  color: #fff;
}
.home-intro { position: relative; z-index: 1; padding: clamp(2rem, 5.25vw, 4.8rem) 1.3rem clamp(2rem, 5.25vw, 4.8rem) clamp(2rem, 5.25vw, 4.8rem); }
.home-intro .eyebrow { color: var(--accent); margin-bottom: 1.1rem; letter-spacing: .075em; }
.home-intro h1 { font-size: clamp(2.75rem, 4.75vw, 4.85rem); line-height: 1.09; letter-spacing: -.085em; }
.home-intro .lead { max-width: 32rem; color: #e0e3ef; margin-top: 1.25rem; line-height: 1.75; }
.home-intro .actions { margin-top: 1.55rem; }
.home-intro .primary { background: var(--accent); color: #182019; }
.home-intro .primary:hover { background: #edffb1; }
.home-intro .quiet { color: #f1f2f8; border-color: #657084; }
.home-intro .quiet:hover { border-color: #c4c9d8; }
.hero-author { display: inline-block; color: #c3cade; margin-top: 1.15rem; font-size: .83rem; }
.home-photo { position: absolute; z-index: -1; inset: 0 0 0 34%; }
.home-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 47% 56%; }
.home-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #111420 0%, #111420e8 10%, #11142038 42%, transparent 69%); }
.home-photo figcaption { position: absolute; bottom: 1.1rem; right: 1.25rem; z-index: 1; padding: .3rem .62rem; color: #f7f7fc; background: #111420d9; border: 1px solid #9aa5c566; border-radius: 4px; font-size: .73rem; }
.home-hero + .featured { border-top: 0; padding-top: 2.5rem; }
.home-symptoms { gap: .9rem; }
.home-symptoms a { height: 100%; min-height: 96px; padding: 1rem 1.2rem; border-radius: 14px; font-size: 1.02rem; }
.home-symptoms a > span:first-child { flex-shrink: 1; min-width: 0; }
.home-symptoms small { display: block; color: var(--green); font-size: .72rem; margin-bottom: .25rem; }
.home-symptoms a > span:last-child { font-size: 1.18rem; color: var(--green); }
.home-experiments { margin-top: 2.7rem; }
.home-experiments .guide-card { min-height: 156px; }

.photo-lab { max-width: 1370px; }
.photo-intro { display: flex; justify-content: space-between; align-items: end; gap: .5rem 1.75rem; padding-block: 1.55rem 1.1rem; }
.photo-intro .eyebrow { margin-bottom: .42rem; }
.photo-intro h1 { font-size: clamp(2.05rem, 4vw, 3.45rem); }
.photo-intro .lead { max-width: 38rem; margin-top: 0; font-size: .96rem; }
.photo-panel { padding: 0; overflow: clip; background: var(--studio); border: 1px solid #333747; border-radius: 18px; box-shadow: 0 22px 52px #161b3022; color: #fcfcff; }
.photo-command { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .48rem .85rem; padding: .9rem 1.2rem .7rem; border-bottom: 1px solid var(--studio-rule); }
.photo-command-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; }
.photo-command button, .photo-panel button { border-color: #555c6d; border-radius: 7px; font-weight: 670; color: #f6f7fc; }
.photo-panel button[aria-pressed="true"], .photo-panel button:hover { background: var(--accent); color: #171925; border-color: var(--accent); }
.photo-panel button:disabled:hover { background: transparent; color: #e3e6ee; border-color: #555c6d; }
.photo-file-button { position: relative; display: inline-flex; align-items: center; min-height: 40px; overflow: hidden; padding: .4rem .8rem; border-radius: 7px; background: var(--accent); color: #171925; font-size: .87rem; font-weight: 750; cursor: pointer; }
.photo-file-button:hover { background: #edffb1; }
.photo-file-button:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.photo-file-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.photo-command-info { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .1rem .8rem; padding: .38rem 1.2rem; color: var(--studio-text); font-size: .76rem; }
.photo-command-info .photo-status { min-height: 0; margin: 0; color: var(--studio-text); font-size: .76rem; }
.photo-extra { padding: 0 1.2rem .7rem; color: var(--studio-text); }
.photo-extra summary, .photo-diagnostics summary { cursor: pointer; width: fit-content; font-weight: 710; padding: .22rem .15rem; font-size: .84rem; }
.photo-extra .photo-import { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .5rem; }
.photo-extra .photo-import > div { background: var(--studio-panel); border-color: var(--studio-rule); border-radius: 10px; }
.photo-extra input::file-selector-button { background: #31374b; border-color: #616a83; }
.photo-extra #remove-short { margin: .55rem 0 0; }
.photo-tool-grid { padding: 0 .75rem .75rem; gap: .75rem; grid-template-columns: minmax(0, 1fr) minmax(245px, 305px); grid-template-areas: "display tools" "stats tools"; grid-template-rows: auto 1fr; align-items: start; }
.photo-preview { grid-area: display; min-width: 0; background: var(--studio-panel); border: 1px solid var(--studio-rule); border-radius: 12px; padding: .65rem; }
.photo-stage-bar { display: flex; justify-content: space-between; gap: .35rem; align-items: center; margin-bottom: .48rem; }
.photo-stage-bar .photo-modes { margin: 0; }
.photo-stage-bar > span { color: var(--studio-text); font-size: .75rem; font-weight: 680; }
.photo-stage-bar button { min-height: 32px; padding: .26rem .55rem; font-size: .76rem; }
.photo-pair { gap: .55rem; }
.photo-pair figure { position: relative; min-width: 0; }
.photo-pair figure figcaption { position: absolute; top: .45rem; left: .45rem; z-index: 1; padding: .13rem .36rem; border-radius: 4px; background: #161821e8; color: #fff; font-size: .71rem; font-weight: 710; margin: 0; }
.photo-pair figure:nth-child(2) figcaption { background: var(--accent); color: var(--ink); }
.photo-frame { overflow: hidden; position: relative; aspect-ratio: 3 / 2; border: 1px solid #5b6272; border-radius: 7px; background: #0c0d12; }
.photo-frame p { font-size: .73rem; }
.photo-frame canvas, .photo-frame img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.stage-placeholder.after { filter: brightness(1.24) contrast(.9); }
.photo-pair[data-zoom="2"] :is(canvas, img) { transform: scale(2); }
.photo-meter { color: #e7eaf6; margin-top: .45rem; font-size: .75rem; }
.photo-settings { grid-area: tools; background: var(--studio-panel); border-color: var(--studio-rule); border-radius: 12px; margin: 0; padding: .6rem .8rem; }
.photo-settings legend { padding-inline: .35rem; }
.photo-presets { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .42rem; }
.photo-presets button { min-height: 32px; padding: .2rem .44rem; font-size: .76rem; }
.photo-control { padding: .25rem 0 .34rem; }
.photo-control input { height: 26px; }
.photo-control p { display: none; }
.check-label { margin-top: .32rem; }
.photo-control:has(input:disabled) { opacity: .7; }
.photo-control:has(#photo-bracket:disabled) { display: none; }
.photo-controls-footer { padding-bottom: .15rem; }
.photo-controls-footer a { color: var(--studio-text); font-size: .77rem; }
.photo-diagnostics { grid-area: stats; color: var(--studio-text); background: var(--studio-panel); border: 1px solid var(--studio-rule); border-radius: 12px; padding: .45rem .65rem; min-width: 0; }
.photo-chart canvas { border-color: var(--studio-rule) !important; background: #171a23 !important; }
.photo-metrics { margin-bottom: 0; }
.photo-metrics div { border-color: var(--studio-rule); border-radius: 5px; }
.photo-metrics dt { color: var(--studio-text); }

@media (max-width: 850px) {
  .home-hero-inner { min-height: 0; grid-template-columns: minmax(0, 1fr); }
  .home-intro { padding: 2rem clamp(1rem, 5vw, 2.7rem) 1.4rem; }
  .home-intro h1 { font-size: clamp(2.65rem, 6.5vw, 4rem); }
  .home-photo { position: relative; inset: auto; z-index: 0; overflow: hidden; aspect-ratio: 2 / 1; }
  .home-photo::after { background: linear-gradient(180deg, #111420 0, transparent 18%); pointer-events: none; }
  .photo-intro { display: block; }
  .photo-intro .lead { margin-top: .4rem; }
}

@media (max-width: 650px) {
  .home-hero { padding-top: .8rem; }
  .home-hero-inner { border-radius: 16px; }
  .home-intro { padding: 1.45rem .95rem .8rem; }
  .home-intro h1 { font-size: clamp(2.03rem, 9.2vw, 3.55rem); }
  .home-intro .eyebrow { margin-bottom: .6rem; }
  .home-intro .lead { margin-top: .7rem; font-size: .92rem; }
  .home-intro .actions { margin-top: .85rem; gap: .38rem; }
  .home-intro .button { min-height: 42px; padding: .38rem .58rem; gap: .46rem; font-size: .83rem; }
  .hero-author { margin-top: .7rem; font-size: .75rem; }
  .home-photo { aspect-ratio: 1.65; }
  .home-photo figcaption { bottom: .55rem; right: .6rem; }
  .home-hero + .featured { padding-top: 1.6rem; }
  .home-symptoms { gap: .48rem; }
  .home-symptoms a { min-height: 68px; padding: .72rem .8rem; }
  .head-inner nav { gap: .1rem .75rem; }
  .head-inner nav a { font-size: .82rem; }
  .photo-lab { width: calc(100% - 1.05rem); }
  .photo-intro { padding: .85rem .35rem .65rem; }
  .photo-intro .eyebrow { font-size: .67rem; }
  .photo-intro .lead { font-size: .84rem; }
  .photo-panel { border-radius: 13px; }
  .photo-command { padding: .52rem .48rem; gap: .32rem; }
  .photo-command-actions { gap: .28rem; }
  .photo-file-button, .photo-command button { min-height: 37px; padding: .27rem .46rem; font-size: .75rem; }
  .photo-command-info { padding: .25rem .52rem; }
  .photo-command-info p { font-size: .69rem; }
  .photo-extra { padding: 0 .52rem .4rem; }
  .photo-extra .photo-import { grid-template-columns: minmax(0, 1fr); gap: .4rem; }
  .photo-tool-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "display" "tools" "stats"; grid-template-rows: auto; gap: .45rem; padding: 0 .38rem .4rem; }
  .photo-preview { position: sticky; top: .2rem; z-index: 2; padding: .36rem; box-shadow: 0 8px 18px #090b14a1; }
  .photo-stage-bar { margin-bottom: .27rem; }
  .photo-stage-bar button { min-height: 29px; font-size: .67rem; }
  .photo-pair { gap: .34rem; }
  .photo-pair figure figcaption { top: .24rem; left: .24rem; padding: .1rem .28rem; font-size: .63rem; }
  .photo-meter { margin-top: .22rem; font-size: .69rem; }
  .photo-settings { padding: .4rem .55rem; }
  .photo-control input { height: 29px; }
}
