.writing-study {
  --accent: #275b43;
  --dark-accent: #193a2a;
  --study-soft: #405347;
  --study-line: #b9c6b6;
  --study-paper: #fefdf7;
  --study-forest: #153e2d;
  --study-rust: #8a4e25;
  min-height: 100vh;
  margin: 0;
  color: #202f24;
  background:
    radial-gradient(ellipse at 94% 0%, #e6eede 0, transparent 34rem),
    radial-gradient(ellipse at 4% 75%, #eeeade 0, transparent 35rem),
    #f4f3ea;
}

.writing-study .top,
.writing-study .foot { border-color: var(--study-line); }

.writing-study .study-cover {
  --splash-paper: #142e24;
  --splash-glow: #365742;
  margin-block: .95rem 1.1rem;
}

.study-cover h1 { font-family: var(--serif); font-weight: 400; }

.study-label {
  margin-bottom: .5rem;
  color: #d8e9c1;
  font-size: .79rem;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.study-cover .landing-splash__photo {
  aspect-ratio: 1.9;
  object-position: 30% 53%;
  border-color: #738c66;
}

.study-section { scroll-margin-top: 1rem; }

.study-section h2 {
  margin-bottom: .55rem;
  color: #172d21;
  font: 400 clamp(1.65rem, 1.3rem + 1.55vw, 2.58rem)/1.08 var(--serif);
  letter-spacing: -.035em;
  text-wrap: balance;
}

.study-section p { max-width: 67ch; }

.study-explore, .study-pilot {
  display: grid;
  min-width: 0;
  gap: clamp(.85rem, 3vw, 2.4rem);
  padding: clamp(.85rem, 3vw, 1.9rem);
  border: 1px solid var(--study-line);
  border-radius: .85rem;
}

.study-explore {
  align-items: start;
  background: var(--study-paper);
  box-shadow: 0 6px 20px #2338200d;
}

.study-controls > p, .study-method > p, .study-pilot > div > p { color: var(--study-soft); }

.study-controls fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .68rem;
  min-width: 0;
  margin: .9rem 0 .25rem;
  padding: 0;
  border: 0;
}

.study-controls label {
  display: block;
  margin-bottom: .22rem;
  font-size: .89rem;
  font-weight: 690;
}

.study-controls select {
  width: 100%;
  min-height: 46px;
  padding: .42rem .34rem;
  border: 1px solid #667e6d;
  border-radius: .38rem;
  color: #1c3528;
  background: #fffef8;
  font: inherit;
  font-size: .95rem;
}

.study-controls select:hover { border-color: #254a35; background: #f3f6ec; }
.study-note { margin-top: .65rem; font-size: .91rem; }

.study-text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding-block: .18rem;
  font-weight: 660;
}

.study-result {
  display: grid;
  gap: .63rem;
  min-width: 0;
  margin: 0;
  padding: clamp(.8rem, 2.25vw, 1.35rem);
  border: 1px solid #b5c9b6;
  border-radius: .62rem;
  background:
    linear-gradient(145deg, #f2f7e9, #e4efe0),
    #f2f7e9;
}

.study-result figcaption {
  padding-bottom: .55rem;
  border-bottom: 1px solid #b5c7b7;
  color: #244332;
  font-size: .9rem;
  font-weight: 720;
}

.study-bar-label {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 .45rem;
  align-items: baseline;
  font-weight: 680;
}

.study-bar-label strong {
  color: var(--study-forest);
  font: 550 clamp(1.25rem, 1.05rem + 1.1vw, 1.85rem)/1.17 var(--serif);
  font-variant-numeric: tabular-nums;
}

.study-bar p { margin-top: .1rem; color: #3b5345; font-size: .85rem; }

.study-bar meter {
  display: block;
  width: 100%;
  height: .64rem;
  margin-top: .25rem;
  accent-color: var(--study-forest);
}

.study-bar meter::-webkit-meter-bar { border: 0; border-radius: .16rem; background: #c8dac9; }
.study-bar meter::-webkit-meter-optimum-value { border-radius: .16rem; background: var(--study-forest); }
.study-bar meter::-moz-meter-bar { background: var(--study-forest); }
#comparison-meter::-webkit-meter-optimum-value { background: var(--study-rust); }
#comparison-meter::-moz-meter-bar { background: var(--study-rust); }

.study-difference {
  padding-top: .52rem;
  border-top: 1px solid #b5c7b7;
  color: #1e3928;
  font-size: .92rem;
  font-weight: 670;
}

.study-details {
  min-width: 0;
  margin-block: .85rem 1.2rem;
  padding-inline: clamp(.65rem, 2.5vw, 1.35rem);
  border: 1px solid var(--study-line);
  border-radius: .68rem;
  background: var(--study-paper);
}

.study-details summary {
  min-height: 44px;
  padding-block: .65rem;
  color: var(--accent);
  font-size: .93rem;
  font-weight: 700;
  cursor: pointer;
}
.study-details summary:hover { color: var(--dark-accent); }

.study-details table {
  width: 100%;
  margin-bottom: .65rem;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: .87rem;
  font-variant-numeric: tabular-nums;
}

.study-details caption {
  margin-bottom: .35rem;
  color: var(--study-soft);
  text-align: start;
}

.study-details th, .study-details td {
  padding: .38rem min(1.1vw, .6rem);
  border-bottom: 1px solid #d4ded0;
  text-align: start;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.study-details thead th { color: #1e3c2b; background: #eaf1e5; }
.study-details tbody th { font-weight: 600; }

.study-pilot {
  background:
    radial-gradient(ellipse at 80% 98%, #e6edda 0, transparent 65%),
    #f2f4e7;
}

.study-steps { margin: 0; padding-inline-start: 1.18rem; color: #2a3f32; }
.study-steps li + li { margin-top: .52rem; }
.study-steps li::marker { color: var(--accent); font-weight: 700; }

.study-actions, .study-method-details nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .95rem;
  margin-top: .7rem;
}

.study-actions .button:focus-visible { outline-offset: 4px; }
.study-method { margin-block: clamp(1.1rem, 3.2vw, 2.2rem); }
.study-method p + p, .study-method-details p { margin-top: .58rem; }
.study-method-details nav { margin-bottom: .3rem; }
.writing-study .foot { padding-bottom: max(.5rem, env(safe-area-inset-bottom)); }

.study-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 45rem) {
  .study-cover .landing-splash__photo { aspect-ratio: 1.62; }
  .study-explore, .study-pilot { grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr); }
}

@media (max-width: 23.75rem) {
  .study-controls fieldset { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 45rem) and (max-height: 42rem) {
  .study-cover .landing-splash__photo { aspect-ratio: 2.5; }
}
