:root {
  color-scheme: light;
  --ink: #152b36;
  --deep: #0d2734;
  --muted: #536770;
  --sea: #0a625a;
  --foam: #e9f3ef;
  --sand: #f5f3ee;
  --line: #dce4e1;
  --white: #fff;
  --serif: Georgia, 'Times New Roman', serif;
  --shadow: 0 8px 28px #16353c0b;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font: 16px/1.6 system-ui, sans-serif;
}
body:has(dialog[open]) { overflow: hidden; }
a { color: var(--sea); text-underline-offset: .2em; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #16877c; outline-offset: 4px; }
.frame { width: min(100% - 3rem, 1240px); margin-inline: auto; }
.skip-link { position: fixed; top: .75rem; left: 1rem; z-index: 10; padding: .75rem; background: white; }
.skip-link:not(:focus) { transform: translateY(-200%); }
.site-header { background: var(--sand); border-bottom: 1px solid #d9dfdb; }
.masthead { min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand, .masthead nav { display: flex; align-items: center; gap: clamp(.7rem, 2vw, 1.5rem); }
.brand, .masthead nav a { color: var(--ink); text-decoration: none; }
.brand { font-weight: 750; gap: .65rem; }
.brand-mark { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; color: white; background: var(--deep); border-radius: 50%; }
.masthead nav a { font-size: .875rem; font-weight: 600; }
.masthead nav a:hover, .review-footer a:hover { text-decoration: underline; }
.hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  margin-top: 1.75rem;
  border-radius: 1.4rem;
  overflow: hidden;
  color: white;
  background: radial-gradient(ellipse at 0 100%, #173f48, transparent 70%), var(--deep);
}
.hero-copy { padding: clamp(2rem, 5vw, 4.3rem); }
.eyebrow { color: var(--sea); font-size: .73rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.hero .eyebrow { display: flex; gap: .65rem; align-items: center; margin: 0 0 1.1rem; color: #b2ddd3; }
.signal { width: .5rem; height: .5rem; background: #8bd9c6; border-radius: 50%; }
h1, h2, .review-title { font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -.035em; }
h1 { font-size: clamp(2.65rem, 5.5vw, 5.25rem); margin: 0; }
.hero-copy > p:not(.eyebrow) { max-width: 36ch; color: #d7e6e7; margin: 1.25rem 0 1.75rem; }
.primary-button {
  display: inline-flex; align-items: center; gap: 1rem;
  padding: .7rem 1.05rem; border-radius: .55rem; color: var(--deep); background: #b9eddf;
  font-size: .88rem; font-weight: 750; text-decoration: none;
}
.primary-button:hover { background: #dbf8ef; }
.hero-image { position: relative; margin: 0; min-height: 19rem; }
.hero-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-image::after { position: absolute; inset: 45% 0 0; content: ''; background: linear-gradient(transparent, #061923a8); pointer-events: none; }
.hero-image figcaption { position: absolute; z-index: 1; bottom: 1.2rem; right: 1.35rem; color: white; font-size: .78rem; letter-spacing: .04em; }
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  padding: 0; margin: 1rem 0 3.2rem; border: 1px solid var(--line);
  border-radius: 1rem; background: var(--line); overflow: hidden;
}
.stats div { display: flex; flex-direction: column-reverse; justify-content: start; padding: 1.15rem clamp(.8rem, 3vw, 2rem); background: var(--white); }
.stats dd { font: 2rem/1.1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.stats dt { margin-top: .25rem; }
dd { margin: 0; }
dt { color: var(--muted); font-size: .78rem; font-weight: 650; }
#reviews, #example { scroll-margin-top: 1rem; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: .8rem; margin-bottom: 1.05rem; }
.section-heading .eyebrow { margin: 0 0 .25rem; }
.section-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.25rem); }
.section-heading > p { margin: 0; color: var(--muted); font-size: .88rem; }
.tools, .review, .example, .empty { border: 1px solid var(--line); border-radius: 1rem; background: var(--white); box-shadow: var(--shadow); }
.tools {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: .8rem 1rem; padding: 1rem 1.2rem; margin: 0 0 1.15rem;
}
.tools label { display: grid; min-width: 0; gap: .3rem; font-size: .82rem; font-weight: 700; }
.tools input, .tools select { width: 100%; min-height: 2.7rem; padding: .5rem .75rem; background: #f7faf9; border: 1px solid #b9ccc7; border-radius: .5rem; color: var(--ink); font-size: .9rem; }
.tools input::placeholder { color: var(--muted); }
.toolbar-footer { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: .5rem; color: var(--muted); font-size: .83rem; min-height: 1.5rem; }
.text-button { color: var(--sea); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: .2em; }
.empty { padding: 1.5rem; color: var(--muted); }
.review { padding: clamp(1rem, 3vw, 2rem); margin-bottom: 1.1rem; }
.review-heading { margin-bottom: 1rem; }
.review-number { display: inline-block; padding: .16rem .4rem; margin-right: .35rem; color: var(--sea); background: var(--foam); border-radius: .25rem; font-variant-numeric: tabular-nums; }
.review-title, .example h2 { margin: .48rem 0 0; font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.review dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; padding: 0; margin: 0 0 1.15rem; }
.review dl div { border-top: 1px solid var(--line); padding: .55rem 0 0; overflow-wrap: anywhere; }
.review dd { font-size: .88rem; }
.comparison, .gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.comparison section { background: #f6f7f4; padding: 1rem; border-radius: .7rem; font-size: .91rem; overflow-wrap: anywhere; }
.comparison section:nth-child(2) { background: var(--foam); }
.comparison section:nth-child(3) { background: #eef2f6; }
.comparison p, .comparison blockquote { margin: 0; white-space: pre-line; }
.comparison .pane-label { margin-bottom: .65rem; color: var(--ink); font-size: .76rem; font-weight: 750; }
.comparison blockquote { border-inline-start: 2px solid #93b0a8; padding-inline-start: .75rem; }
.muted, .missing { color: var(--muted); font-size: .82rem; }
.photo-status { margin: 1rem 0 .65rem; font-size: .82rem; font-weight: 650; color: var(--muted); }
.source-note { margin: .85rem 0; padding: .75rem 1rem; border-inline-start: 3px solid #ae763a; border-radius: .35rem; background: #faf2e7; color: #68481f; font-size: .88rem; }
.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .75rem; }
.gallery figure { margin: 0; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: .75rem; background: #f7f9f8; }
.gallery a[data-preview] { display: block; cursor: zoom-in; background: #e9eeeb; }
.gallery a[data-preview]:focus-visible { outline-offset: -4px; }
.gallery img { display: block; width: 100%; height: clamp(9rem, 24vw, 18rem); object-fit: contain; }
.pair img { height: clamp(10rem, 35vw, 28rem); }
.gallery figcaption { padding: .55rem .8rem; color: var(--muted); font-size: .81rem; }
.image-source { display: inline-block; margin-inline-start: .25rem; text-underline-offset: .18em; }
.pair figure:nth-child(2) figcaption { background: var(--foam); color: var(--sea); font-weight: 650; }
.review details { margin-top: .85rem; }
summary { cursor: pointer; color: var(--sea); font-size: .9rem; font-weight: 700; padding-block: .55rem; }
.review details[open] summary { margin-bottom: .45rem; }
.review-footer { border-top: 1px solid var(--line); margin-top: 1.1rem; padding-top: .8rem; }
.review-footer a { font-weight: 650; font-size: .86rem; text-decoration: none; }
.review-footer span { margin-inline-start: .2rem; }
.example { margin-top: 2rem; padding: .35rem 1rem; }
.example summary .eyebrow { margin-inline: .45rem .6rem; }
.example .review { margin: .5rem 0; box-shadow: none; }
.example dl { margin-top: 1rem; }
.example .gallery { margin-top: 1rem; }
.site-footer { display: flex; justify-content: space-between; align-items: start; gap: 1rem; border-top: 1px solid var(--line); padding: 1.3rem 0 2.5rem; margin-top: 1.6rem; font-size: .86rem; color: var(--muted); }
.site-footer p { margin: 0 0 .4rem; }
.site-footer a { flex: none; }
#photo-preview { padding: 0; width: min(94vw, 75rem); max-width: none; border: 1px solid #566f77; border-radius: .85rem; background: var(--deep); color: white; }
#photo-preview::backdrop { background: #04151ee0; }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem 1rem; }
.preview-toolbar p { margin: 0; font-size: .9rem; }
.preview-toolbar button { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 1px solid #728f95; border-radius: .5rem; color: white; background: #26434d; font-size: 1.5rem; }
#preview-image { display: block; width: 100%; max-height: 80vh; object-fit: contain; }

@media (min-width: 850px) and (min-height: 620px) {
  .tools { position: sticky; top: .7rem; z-index: 2; box-shadow: 0 5px 20px #16353c1b; }
}
@media (max-width: 760px) {
  .frame { width: calc(100% - 1.5rem); }
  .hero { grid-template-columns: 1fr; margin-top: 1rem; }
  .hero-copy { padding: 1.65rem; }
  h1 { font-size: clamp(2.15rem, 8.6vw, 3.4rem); }
  .hero-image { min-height: 12rem; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-bottom: 2rem; }
  .section-heading { align-items: start; flex-direction: column; gap: .4rem; }
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search { grid-column: 1 / -1; }
  .review dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comparison { grid-template-columns: 1fr; }
  .gallery:not(.pair) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .brand { font-size: .85rem; }
  .masthead nav a { font-size: .77rem; }
  .tools { grid-template-columns: 1fr; }
  .gallery figcaption { padding: .5rem; font-size: .75rem; }
}
