@font-face {
  font-family: Manrope;
  src: url("../assets/manrope.woff") format("woff");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --paper: #10202c;
  --surface: #162b39;
  --panel: #1c3544;
  --ink: #f1f7fa;
  --muted: #bdcfd8;
  --accent: #bacbdd;
  --line: #4a697b;
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; scroll-padding-top: 16px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 Manrope, system-ui, sans-serif; }
a { color: inherit; text-underline-offset: .24em; }
a:hover { color: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #f2c978 !important; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: Manrope, system-ui, sans-serif; line-height: 1.14; overflow-wrap: anywhere; font-weight: 700; }
p { color: var(--muted); }
.page-width { max-width: 1400px; margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 4rem); }
.skip-nav { position: absolute; top: -180px; left: 1rem; padding: .55rem .9rem; background: var(--accent); color: #102931; z-index: 4; }
.skip-nav:focus { top: .65rem; color: #102931; }

.head, .tail { background: #101f2b; border-color: var(--line); }
.head { border-bottom: 1px solid var(--line); }
.head-line { display: flex; justify-content: space-between; gap: .75rem 2rem; align-items: center; min-height: 80px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { display: block; width: auto; object-fit: contain; }
.desktop-nav, .tail nav { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem 1.25rem; }
.desktop-nav a, .tail nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: .9rem; text-decoration: none; }
.desktop-nav a:last-child { border: 1px solid var(--line); padding: .3rem .95rem; border-radius: 30px; }
a[aria-current="page"], .desktop-nav a:hover, .tail a:hover { text-decoration: underline; color: var(--accent); }
.mobile-nav { display: none; }

.page-hero { border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 82% 30%, #214452, transparent 62%), #142936; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .72rem; padding-top: 1.25rem; font-size: .85rem; color: var(--muted); }
.crumbs a { display: inline-flex; min-height: 36px; align-items: center; }
.hero-body { display: flex; justify-content: space-between; align-items: center; padding-block: clamp(1.65rem,5.7vw,5rem); gap: 2rem; }
.hero-body > div { min-width: 0; }
.kicker { font-size: .79rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 800; margin-bottom: .8rem; }
h1 { font-size: clamp(2.55rem,6.25vw,6.15rem); letter-spacing: -.063em; line-height: 1.01; }
.lead { font-size: clamp(1rem, 1.7vw, 1.2rem); max-width: 58ch; margin-top: 1rem; }
.section-art { display: block; border-radius: 8px; border: 1px solid var(--line); width: min(33%, 370px); max-height: 265px; aspect-ratio: 5/3; object-fit: cover; }

.content-grid { display: grid; gap: clamp(1.25rem, 3.4vw, 3.4rem); padding-block: clamp(1.55rem, 4.7vw, 4rem); }
.with-sidebar { grid-template-columns: minmax(185px, 240px) minmax(0, 1fr); }
.primary { display: grid; align-content: start; gap: 1.45rem; min-width: 0; }
.local { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; background: var(--surface); }
.local h2 { font-size: 1.06rem; margin-bottom: .45rem; }
.local ul, .route-cards, .listing ul { list-style: none; margin: 0; padding: 0; }
.local li { border-top: 1px solid #2f4c60; }
.local a { display: flex; align-items: center; min-height: 44px; padding: .35rem .4rem; text-decoration: none; }
.local a:hover, .local a[aria-current="page"] { text-decoration: underline; }
.local li a[aria-current="page"] { background: var(--panel); }
.primary h2 { font-size: clamp(1.22rem, 2.45vw, 2rem); letter-spacing: -.025em; }
.quick h2, .workflow h2, .listing h2 { margin-bottom: .77rem; }
.route-cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 225px),1fr)); gap: .7rem; }
.route-cards li { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 67px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; position: relative; padding: .8rem .9rem; }
.route-cards a { font-weight: 750; text-decoration: none; }
.route-cards a::after { content: ""; position: absolute; inset: 0; }
.route-cards li:focus-within, .route-cards li:hover { background: var(--panel); }
.route-cards a:hover { text-decoration: underline; }
.route-cards li span { color: var(--accent); }
.block { border-radius: 8px; border: 1px solid var(--line); background: var(--surface); padding: clamp(1rem,2.9vw,1.65rem); }
.block p { margin-top: .4rem; }
.content-slot { border-left: 3px solid #6799a8; min-height: 105px; }
.content-slot p { font-size: .91rem; }
.outline, .onward { display: flex; flex-wrap: wrap; gap: .45rem 1.4rem; border-top: 1px solid var(--line); }
.onward a { display: inline-flex; min-height: 44px; align-items: center; color: var(--accent); }
.action { display: inline-flex; text-decoration: none; align-items: center; color: #11272f; background: var(--accent); border-radius: 5px; min-height: 46px; padding: .6rem 1rem; font-weight: 800; }
.action:hover { text-decoration: underline; color: #11272f; }
.action-row { display: flex; }
.workflow { border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.workflow ol { display: flex; flex-wrap: wrap; list-style: none; margin: .8rem 0 0; padding: 0; gap: .55rem; }
.workflow a { display: inline-flex; min-height: 44px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: .52rem .7rem; font-weight: 730; }
.draft-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .9rem; }
.block fieldset { padding: .8rem 0; border: 0; margin: 0; min-width: 0; }
.block fieldset legend { color: var(--muted); padding: 0; }
.block fieldset label, .catalog-controls label { display: grid; gap: .25rem; }
.empty-state, .draft-preview { border: 1px dashed #7195a5; border-radius: 6px; margin-top: .75rem; padding: 1rem; }
input, textarea, select { padding: .58rem .7rem; font: inherit; min-height: 44px; max-width: 100%; border-radius: 5px; border: 1px solid #a3bec9; color: #102631; background: #e6f0f4; }
fieldset:disabled input, fieldset:disabled select, fieldset:disabled textarea { opacity: .72; }
.catalog-controls { display: flex; flex-wrap: wrap; gap: .8rem; align-items: end; }
.search-box { display: grid; max-width: 690px; gap: .45rem; }
.listings { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr)); gap: 1rem; }
.listing { background: var(--surface); padding: 1.05rem; border: 1px solid var(--line); border-radius: 8px; }
.listing a { display: inline-flex; align-items: center; min-height: 44px; }
.listing h2 a { text-decoration: none; }
.listing h2 a:hover { text-decoration: underline; }
.tail { border-top: 1px solid var(--line); }
.tail-line { display: flex; gap: .4rem 1.6rem; align-items: center; flex-wrap: wrap; min-height: 106px; padding-block: .8rem; }
.tail p { max-width: 33ch; font-size: .86rem; margin-right: auto; }
.existing-practice.exercise { display: grid; grid-template-columns: minmax(0,1fr); gap: 1.25rem; padding: clamp(1rem, 3vw, 2rem); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin: 0; }
.existing-practice .intro h2 { margin: .5rem 0; font-size: clamp(1.7rem, 4vw, 3rem); }
.existing-practice .sheet { background: #e2e6ea; color: #132e3a; border: 0; padding: clamp(1rem, 2.4vw, 1.75rem); border-radius: 7px; }
.existing-practice .sheet p, .existing-practice .next a, .existing-practice .link { color: #244550; }
.existing-practice .stamp { background: #c1d9dd; }
.existing-practice .actions button:not(.link) { background: #153c4a; color: white; border-color: #153c4a; }
.existing-practice .ed-huella { display: block; width: 100%; height: 16px; image-rendering: pixelated; margin-block: .55rem; }

@media (max-width: 975px) {
  .desktop-nav { display: none; }
  .mobile-nav { display: block; position: relative; }
  .mobile-nav summary { display: flex; min-height: 44px; align-items: center; cursor: pointer; border: 1px solid var(--line); border-radius: 26px; padding: .38rem .95rem; font-weight: 800; }
  .mobile-nav nav { position: absolute; top: calc(100% + .4rem); right: 0; z-index: 3; display: grid; background: var(--surface); border: 1px solid var(--line); min-width: 218px; border-radius: 8px; padding: .55rem .85rem; }
  .mobile-nav nav a { min-height: 44px; display: flex; align-items: center; }
}
@media (max-width: 660px) {
  .hero-body { display: block; }
  .section-art { width: min(100%, 400px); margin-top: 1.1rem; max-height: 165px; }
  .with-sidebar { grid-template-columns: 1fr; }
  .content-grid > aside { order: 1; }
  .draft-grid { grid-template-columns: 1fr; }
}
