:root {
  color-scheme: light;
  --ink: #173935;
  --deep: #113e3c;
  --paper: #f5f4ec;
  --white: #fffef9;
  --soft: #dde7db;
  --line: #d6dccf;
  --muted: #48605a;
  --gold: #e7c386;
  font: 16px/1.55 system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select { font: inherit; }
button, input, select, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid #ad7129; outline-offset: 3px; }
.skip { position: fixed; left: 12px; top: -100px; z-index: 5; padding: 10px 14px; background: white; }
.skip:focus { top: 12px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font: 500 2rem/1.08 Georgia, serif; letter-spacing: -.04em; }
h1 { font-size: clamp(2.5rem, 6.5vw, 4.8rem); }
h3 { font-size: 1rem; line-height: 1.3; }
img { display: block; max-width: 100%; }
.welcome { min-height: 100svh; display: grid; }
.entry { padding: max(30px, 7vw) clamp(21px, 7vw, 110px) 36px; align-self: center; }
.logo { width: 277px; height: 49px; object-fit: contain; object-position: left; margin-left: -29px; margin-bottom: clamp(32px, 7vh, 76px); }
.kicker { font-size: .875rem; letter-spacing: .11em; text-transform: uppercase; font-weight: 750; margin-bottom: .8rem; }
.lead { max-width: 48ch; font-size: 1.1rem; margin-top: 1.05rem; color: var(--muted); }
.entry-form { display: grid; max-width: 385px; gap: 11px; margin-top: 27px; }
label { font-weight: 700; font-size: .93rem; }
input, select { min-width: 0; min-height: 48px; width: 100%; background: var(--white); padding: .65rem .8rem; border: 1px solid #a5b8af; color: var(--ink); border-radius: 9px; }
.primary, .outline, .leave, .close { border: 1px solid transparent; border-radius: 9px; min-height: 44px; padding: .6rem .9rem; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); font-weight: 750; text-decoration: none; text-align: center; }
.primary { color: white; background: var(--deep); }
.primary:hover { background: #24564f; }
.outline { border-color: #9fb1a8; background: var(--white); }
.outline:hover { background: var(--soft); }
.quiet { font-size: .89rem; color: var(--muted); }
.cover { display: none; position: relative; background: var(--deep); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover span { position: absolute; bottom: 30px; left: 30px; right: 30px; color: white; background: #113e3ced; padding: .75rem 1rem; border-radius: 7px; width: fit-content; }
.rail { display: grid; grid-template-columns: 1fr auto; padding: 13px 16px 7px; background: var(--deep); color: white; align-items: center; gap: 8px 13px; }
.brand { display: flex; align-items: center; text-decoration: none; font: 500 1.23rem/1.05 Georgia,serif; gap: 9px; }
.brand img { background: var(--paper); border-radius: 9px; padding: 5px; }
.brand small { display: block; font: .85rem/1.5 system-ui,sans-serif; color: #d9e5dd; }
.rail nav { order: 3; grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px; }
.rail nav a, .leave { font-size: .88rem; border-radius: 7px; padding: .64rem .65rem; }
.rail nav a { text-decoration: none; min-height: 44px; }
.rail nav a:hover, .rail nav a[aria-current] { background: #315650; }
.leave { background: transparent; color: #f3ecdf; padding-inline: 0; }
.leave:hover { text-decoration: underline; }
main { width: min(100%, 1200px); margin: 0 auto; padding: 18px 15px 45px; }
.headline { position: relative; padding: clamp(23px, 4vw, 53px); background: var(--deep); color: var(--white); border-radius: 16px; overflow: hidden; isolation: isolate; }
.headline .kicker { color: var(--gold); }
.headline h1 { font-size: clamp(2.1rem, 6vw, 4.15rem); max-width: 14ch; }
.headline p:not(.kicker) { margin-top: .9rem; max-width: 54ch; color: #e1ece4; }
.headline::after { content: ''; position: absolute; z-index: -1; inset: 0 0 0 48%; background: linear-gradient(90deg,var(--deep),transparent 65%),url(assets/etude.webp) 67% 45%/cover; opacity: .55; display: none; }
.section { margin-top: 29px; }
.section-heading { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 7px 14px; margin-bottom: 13px; }
.section-heading h2 { font-size: clamp(1.78rem, 4vw, 2.5rem); }
.category-grid, .card-grid, .bonus-grid { display: grid; gap: 10px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.category { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--white); text-decoration: none; min-height: 126px; }
.category:hover { border-color: var(--deep); }
.category img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  padding: 5px;
  background: #f5f1e8;
}
.category strong { padding: 8px 8px 2px; font-size: .93rem; line-height: 1.25; }
.category span { padding: 0 8px 8px; color: var(--muted); font-size: .86rem; margin-top: auto; }
.controls { display: grid; gap: 9px; margin-bottom: 10px; grid-template-columns: repeat(auto-fit, minmax(min(230px,100%), 1fr)); }
.controls label { display: grid; gap: 3px; }
.results { margin-bottom: 10px; }
.card { display: flex; min-width: 0; flex-direction: column; border: 1px solid var(--line); border-radius: 11px; padding: 9px; background: var(--white); }
.card-image { border: 0; border-radius: 7px; padding: 0; display: block; background: #e7e9df; width: 100%; overflow: hidden; }
.card-image img { width: 100%; height: clamp(127px, 25vw, 210px); object-fit: contain; }
.card h3 { margin-top: 9px; }
.card .tag { color: var(--muted); font-size: .84rem; line-height: 1.3; margin-top: 3px; }
.card .desc { display: none; }
.card-buttons { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding-top: 9px; margin-top: auto; }
.card-buttons a, .card-buttons button { font-size: .875rem; padding: .45rem .25rem; }
.note, .bonus, .instructions { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: clamp(13px, 3vw, 25px); }
.bonus { padding-inline: clamp(11px, 2vw, 25px); }
.instructions h2 { margin: .3rem 0 .8rem; }
.instructions ol { padding-left: 1.35rem; }
.instructions li + li { margin-top: .55rem; }
.top-link { display: inline-block; margin-bottom: .9rem; font-weight: 700; }
.intro { margin-top: .8rem; max-width: 62ch; }
.reader { width: min(95vw,970px); max-height: 94dvh; padding: 0; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: var(--white); }
.reader[open] { display: flex; flex-direction: column; }
.reader::backdrop { background: #0e2c29bd; }
.reader-head, .reader-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; }
.reader-head h2 { font-size: clamp(1.25rem, 4vw, 2rem); }
.reader-actions { border-block: 1px solid var(--line); }
.close { background: var(--soft); font-size: 1.35rem; width: 44px; padding: 0; }
.image-scroll { overflow: auto; min-height: 0; padding: 8px; background: #e2e9df; }
.image-scroll img { width: min(100%,736px); height: auto; margin: 0 auto; }
.image-scroll.zoomed img { width: 1050px; max-width: none; margin: 0; }
body.reading { overflow: hidden; }
@media (min-width: 610px) {
  .headline::after { display: block; }
  main { padding: 25px; }
  .category-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .card-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .card .desc { display: block; margin-top: .45rem; font-size: .91rem; color: var(--muted); }
  .card-buttons { flex-direction: row; }
  .card-buttons a, .card-buttons button { flex: 1; }
}
@media (min-width: 900px) {
  .welcome { grid-template-columns: 1fr 1fr; }
  .cover { display: block; }
  .app { display: grid; grid-template-columns: 212px 1fr; min-height: 100svh; }
  .rail { display: flex; flex-direction: column; align-items: stretch; gap: 40px; position: sticky; top: 0; height: 100svh; padding: 26px 15px; }
  .rail nav { order: 0; display: grid; }
  .leave { margin-top: auto; }
  main { padding: 30px; }
}
.more { margin-top: 14px; }
.bonus { display: flex; flex-direction: column; align-items: flex-start; }
.bonus .intro { flex: 1; }
.bonus-link { margin-top: 16px; }
.install-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; color: var(--white); font-weight: 650; text-underline-offset: 3px; }
