/*
Theme Name: Estudio Moreno Documentos
Theme URI: https://documentos.abogadosejma.com/
Author: Estudio Moreno
Description: Biblioteca legal editorial de Estudio Moreno: contratos, cartas, escritos y packs con respaldo legal.
Version: 1.0.1
Text Domain: estudio-moreno-documentos
*/

:root {
  --ink: #10231d;
  --forest: #143a2f;
  --forest-2: #1c4a3b;
  --gold: #b58a4a;
  --gold-soft: #d6b77d;
  --cream: #f7f2e8;
  --paper: #fffdf8;
  --sand: #eee5d6;
  --muted: #6d6a61;
  --line: rgba(16, 35, 29, .14);
  --line-light: rgba(16, 35, 29, .08);
  --shadow: 0 18px 50px rgba(16, 35, 29, .10);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .6em;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2.9rem, 6vw, 5.8rem); }
h2 { font-size: clamp(2rem, 4vw, 3.8rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.9rem); }
p { margin: 0 0 1.1em; }
button, input, select, textarea { font: inherit; }
button, .btn { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.container { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.container--narrow { width: min(860px, calc(100% - 48px)); margin-inline: auto; }
.section { padding: clamp(64px, 8vw, 116px) 0; }
.section--cream { background: var(--cream); }
.section--sand { background: var(--sand); }
.section--dark { background: var(--forest); color: #fff; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: rgba(255,255,255,.76); }
.section--dark a { color: var(--gold-soft); }
.section--tight { padding: clamp(44px, 6vw, 76px) 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 12px 18px;
  background: var(--forest);
  color: #fff;
}
.skip-link:focus { left: 12px; top: 12px; }

.topbar {
  background: var(--forest);
  color: rgba(255,255,255,.78);
  font-size: .67rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.topbar__inner { display: flex; justify-content: space-between; gap: 20px; padding: 8px 0; }
.topbar a { color: var(--gold-soft); text-decoration: none; }
.topbar__group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar__sep { width: 1px; height: 11px; background: rgba(255,255,255,.28); }

.site-header { position: relative; z-index: 20; border-bottom: 1px solid var(--line-light); background: var(--paper); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 88px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--forest); text-decoration: none; }
.brand:hover { color: var(--forest); }
.brand__mark {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--gold); border-radius: 50%;
  color: var(--gold); font-family: var(--serif); font-size: 1.15rem; font-weight: 600;
}
.brand__name { display: flex; flex-direction: column; line-height: 1; }
.brand__name strong { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }
.brand__name small { margin-top: 3px; color: var(--gold); font-size: .55rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 23px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nav-list { display: flex; align-items: center; gap: 23px; margin: 0; padding: 0; list-style: none; }
.nav-list li { margin: 0; }
.site-nav a { color: var(--ink); text-decoration: none; }
.mobile-menu { margin: 0; padding: 0; list-style: none; }
.mobile-menu a { display: block; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.emdocs-error { margin: 10px 0 0; color: #8a1f1f; font-size: .72rem; line-height: 1.45; }
.site-nav a:hover, .site-nav a.is-active { color: var(--gold); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: transparent; }
.nav-toggle span { display: block; width: 17px; height: 1px; margin: 3px auto; background: var(--forest); }
.mobile-nav { display: none; border-top: 1px solid var(--line-light); background: var(--paper); }
.mobile-nav.is-open { display: block; }
.mobile-nav__inner { display: grid; gap: 0; padding: 12px 0 20px; }
.mobile-nav a { padding: 10px 0; border-bottom: 1px solid var(--line-light); color: var(--forest); font-size: .9rem; font-weight: 700; text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 12px 22px; border: 1px solid transparent; border-radius: 999px;
  font-size: .7rem; font-weight: 800; letter-spacing: .07em; line-height: 1.1; text-align: center; text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--gold { background: var(--gold); color: #fff; }
.btn--gold:hover { background: #9e753a; color: #fff; }
.btn--forest { background: var(--forest); color: #fff; }
.btn--forest:hover { background: var(--forest-2); color: #fff; }
.btn--ghost { border-color: var(--line); background: transparent; color: var(--forest); }
.btn--ghost:hover { border-color: var(--gold); color: var(--forest); }
.btn--light { background: var(--paper); color: var(--forest); }
.btn--small { min-height: 38px; padding: 9px 16px; font-size: .62rem; }
.btn--wide { width: 100%; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px;
  color: var(--gold); font-size: .65rem; font-weight: 800; letter-spacing: .2em; line-height: 1; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 25px; height: 1px; background: currentColor; }
.lede { max-width: 640px; color: var(--muted); font-size: 1.05rem; }
.section-head { max-width: 720px; margin-bottom: 38px; }
.section-head.is-center { margin-inline: auto; text-align: center; }
.section-head.is-center .eyebrow { justify-content: center; }

.hero { position: relative; overflow: hidden; padding: clamp(64px, 8vw, 108px) 0 clamp(54px, 7vw, 90px); background: var(--cream); }
.hero::after { content: ""; position: absolute; width: 420px; height: 420px; right: -160px; top: -160px; border: 1px solid rgba(181,138,74,.24); border-radius: 50%; pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 54px; align-items: end; }
.hero h1 { max-width: 770px; margin-bottom: 18px; color: var(--forest); }
.hero h1 em { color: var(--gold); font-weight: 400; }
.hero .lede { max-width: 610px; margin-bottom: 26px; }
.hero-search { display: flex; max-width: 640px; padding: 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); box-shadow: 0 8px 26px rgba(16,35,29,.05); }
.hero-search input { flex: 1; min-width: 0; padding: 10px 16px; border: 0; outline: none; background: transparent; color: var(--ink); font-size: .9rem; }
.hero-search button { flex: 0 0 auto; min-height: 42px; padding: 10px 20px; border: 0; border-radius: 999px; background: var(--forest); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .06em; }
.hero-links { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; margin-top: 18px; color: var(--muted); font-size: .72rem; }
.hero-links strong { color: var(--forest); }
.hero-panel { position: relative; padding: 26px; border: 1px solid var(--sand); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.hero-panel__mark { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 20px; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-family: var(--serif); font-size: 1rem; }
.hero-panel h2 { margin-bottom: 8px; color: var(--forest); font-size: 1.8rem; }
.hero-panel p { margin-bottom: 18px; color: var(--muted); font-size: .83rem; }
.hero-panel__price { display: flex; align-items: baseline; gap: 8px; margin: 16px 0; }
.hero-panel__price strong { color: var(--forest); font-family: var(--serif); font-size: 2.2rem; line-height: 1; }
.hero-panel__price span { color: var(--muted); font-size: .7rem; }
.hero-panel__list { margin: 0 0 20px; padding: 0; list-style: none; }
.hero-panel__list li { position: relative; padding: 5px 0 5px 18px; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.hero-panel__list li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 800; }

.trust-strip { border-bottom: 1px solid var(--line-light); background: var(--paper); }
.trust-strip__inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 17px 0; color: var(--muted); font-size: .7rem; }
.trust-strip__item { display: inline-flex; align-items: center; gap: 8px; }
.trust-strip__item::before { content: "✓"; color: var(--gold); font-weight: 800; }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.category-card { display: flex; flex-direction: column; min-height: 178px; padding: 23px 20px; border: 1px solid var(--sand); border-radius: 13px; background: var(--paper); text-decoration: none; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.category-card:hover { transform: translateY(-3px); border-color: var(--gold-soft); box-shadow: 0 12px 30px rgba(16,35,29,.06); }
.category-card__num { color: var(--gold); font-size: .63rem; font-weight: 800; letter-spacing: .14em; }
.category-card h3 { margin: 25px 0 7px; color: var(--forest); font-size: 1.45rem; }
.category-card p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.category-card__arrow { margin-top: auto; padding-top: 18px; color: var(--gold); font-size: 1.2rem; }

.docs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.doc-card { display: flex; flex-direction: column; min-height: 260px; padding: 24px; border: 1px solid var(--sand); border-radius: 14px; background: var(--paper); text-decoration: none; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.doc-card:hover { transform: translateY(-3px); border-color: var(--gold-soft); box-shadow: 0 14px 34px rgba(16,35,29,.07); }
.doc-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--gold); font-size: .6rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.doc-card__format { padding: 4px 8px; border: 1px solid var(--sand); border-radius: 99px; color: var(--muted); font-size: .55rem; letter-spacing: .08em; }
.doc-card h3 { margin: 22px 0 8px; color: var(--forest); font-size: 1.45rem; line-height: 1.08; }
.doc-card p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.6; }
.doc-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 22px; color: var(--gold); font-size: .65rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

.pack-band { overflow: hidden; border-radius: 18px; background: var(--forest); color: #fff; }
.pack-band__inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; padding: clamp(30px, 5vw, 54px); }
.pack-band .eyebrow { color: var(--gold-soft); }
.pack-band h2 { max-width: 600px; color: #fff; font-size: clamp(2rem, 3.7vw, 3.2rem); }
.pack-band p { max-width: 540px; margin-bottom: 20px; color: rgba(255,255,255,.72); font-size: .9rem; }
.pack-band__price { padding: 24px; border: 1px solid rgba(255,255,255,.18); border-radius: 14px; background: rgba(255,255,255,.05); }
.pack-band__price strong { display: block; color: var(--gold-soft); font-family: var(--serif); font-size: 3.2rem; line-height: 1; }
.pack-band__price span { display: block; margin: 5px 0 16px; color: rgba(255,255,255,.62); font-size: .7rem; }
.pack-band__price .btn { width: 100%; }
.pack-band__price small { display: block; margin-top: 11px; color: rgba(255,255,255,.48); font-size: .62rem; line-height: 1.4; }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step-card { padding: 24px; border-top: 1px solid var(--gold); background: var(--paper); }
.step-card__num { color: var(--gold); font-size: .65rem; font-weight: 800; letter-spacing: .16em; }
.step-card h3 { margin: 18px 0 7px; color: var(--forest); font-size: 1.4rem; }
.step-card p { margin: 0; color: var(--muted); font-size: .82rem; }
.step-card a { display: inline-block; margin-top: 14px; color: var(--forest); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

.page-hero { padding: clamp(48px, 6vw, 76px) 0; background: var(--cream); border-bottom: 1px solid var(--line-light); }
.page-hero h1 { max-width: 900px; margin: 0; color: var(--forest); font-size: clamp(2.5rem, 4.7vw, 4.4rem); }
.page-hero p { max-width: 650px; margin: 15px 0 0; color: var(--muted); font-size: .95rem; }
.page-shell { padding: clamp(46px, 6vw, 78px) 0; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; color: var(--forest); }
.entry-content ul, .entry-content ol { padding-left: 1.25rem; }
.entry-content li { margin-bottom: .5em; }
.entry-content a { font-weight: 600; }

.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 48px; align-items: start; }
.doc-main h1 { max-width: 820px; color: var(--forest); font-size: clamp(2.5rem, 4.6vw, 4.2rem); }
.doc-meta { display: flex; flex-wrap: wrap; gap: 9px 16px; margin: 0 0 24px; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .04em; }
.doc-meta span { display: inline-flex; align-items: center; gap: 6px; }
.doc-meta span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.doc-content { max-width: 760px; }
.doc-content h2 { margin-top: 1.8em; color: var(--forest); }
.doc-content h3 { margin-top: 1.5em; color: var(--forest); }
.doc-content p, .doc-content li { color: #3d3933; }
.doc-sidebar { position: sticky; top: 22px; }
.download-card { padding: 24px; border: 1px solid var(--sand); border-radius: 14px; background: var(--cream); }
.download-card__label { color: var(--gold); font-size: .61rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.download-card h2 { margin: 12px 0 8px; color: var(--forest); font-size: 1.8rem; }
.download-card p { margin: 0 0 18px; color: var(--muted); font-size: .78rem; }
.download-card__meta { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 16px; padding: 11px 0; border-top: 1px solid var(--line-light); border-bottom: 1px solid var(--line-light); color: var(--muted); font-size: .65rem; }
.download-card__meta strong { color: var(--forest); }
.download-card__note { margin: 13px 0 0; color: var(--muted); font-size: .64rem; line-height: 1.45; }
.doc-cta { margin-top: 22px; padding: 20px; border-left: 2px solid var(--gold); background: var(--paper); }
.doc-cta p { margin: 0 0 10px; color: var(--muted); font-size: .76rem; }
.doc-cta a { color: var(--forest); font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.related-docs { margin-top: 54px; padding-top: 32px; border-top: 1px solid var(--sand); }
.related-docs h2 { color: var(--forest); font-size: 2rem; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related-grid .doc-card { min-height: 210px; padding: 20px; }
.related-grid .doc-card h3 { font-size: 1.2rem; }
.legal-note { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line-light); color: var(--muted); font-size: .68rem; line-height: 1.55; }

.search-grid { display: grid; gap: 14px; }
.search-item { padding: 20px 0; border-bottom: 1px solid var(--sand); }
.search-item h2 { margin: 0 0 5px; font-size: 1.6rem; }
.search-item h2 a { color: var(--forest); }

.packs-hero { padding: clamp(52px, 7vw, 92px) 0; background: var(--forest); color: #fff; }
.packs-hero h1 { max-width: 840px; color: #fff; }
.packs-hero p { max-width: 620px; color: rgba(255,255,255,.72); }
.pack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pack-card { display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--sand); border-radius: 15px; background: var(--paper); }
.pack-card.is-featured { border-color: var(--gold); box-shadow: 0 18px 50px rgba(16,35,29,.10); }
.pack-card__tag { color: var(--gold); font-size: .6rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.pack-card h2 { margin: 17px 0 7px; color: var(--forest); font-size: 2rem; }
.pack-card p { color: var(--muted); font-size: .82rem; }
.pack-card ul { margin: 0 0 24px; padding: 0; list-style: none; }
.pack-card li { position: relative; padding: 5px 0 5px 18px; color: var(--muted); font-size: .78rem; }
.pack-card li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 800; }
.pack-card__bottom { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line-light); }
.pack-card__price { display: block; margin-bottom: 13px; color: var(--forest); font-family: var(--serif); font-size: 2.3rem; line-height: 1; }
.pack-card__price small { color: var(--muted); font-family: var(--sans); font-size: .62rem; }
.pack-card__bottom .btn { width: 100%; }
.pack-note { margin-top: 28px; color: var(--muted); font-size: .72rem; }

.faq-list { max-width: 840px; }
.faq-item { border-bottom: 1px solid var(--sand); }
.faq-item summary { padding: 17px 0; color: var(--forest); cursor: pointer; font-weight: 700; }
.faq-item p { margin: 0 0 17px; color: var(--muted); font-size: .85rem; }

.site-footer { padding: 56px 0 24px; background: var(--forest); color: rgba(255,255,255,.72); }
.footer-grid { display: grid; grid-template-columns: 1.4fr .7fr .7fr .9fr; gap: 34px; padding-bottom: 38px; }
.site-footer .brand { color: #fff; }
.site-footer .brand__name strong { color: #fff; }
.site-footer h3 { margin: 0 0 13px; color: var(--gold-soft); font-family: var(--sans); font-size: .63rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.site-footer p { color: rgba(255,255,255,.6); font-size: .78rem; line-height: 1.65; }
.site-footer a { color: rgba(255,255,255,.72); text-decoration: none; font-size: .76rem; }
.site-footer a:hover { color: var(--gold-soft); }
.footer-links { display: grid; gap: 7px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.13); color: rgba(255,255,255,.42); font-size: .62rem; }
.footer-bottom a { color: rgba(255,255,255,.55); font-size: .62rem; }

.doc-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 22px; background: rgba(16,35,29,.62); }
.doc-modal[hidden] { display: none; }
.doc-modal__dialog { position: relative; width: min(540px, 100%); max-height: 92vh; overflow: auto; padding: 30px; border-radius: 17px; background: var(--paper); box-shadow: 0 30px 80px rgba(0,0,0,.24); }
.doc-modal__close { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--forest); font-size: 1.2rem; line-height: 1; }
.doc-modal__icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 16px; border-radius: 50%; background: var(--cream); color: var(--forest); font-size: 1.1rem; }
.doc-modal h2 { margin-bottom: 8px; color: var(--forest); font-size: 2rem; }
.doc-modal p { color: var(--muted); font-size: .84rem; }
.doc-modal__pack { margin-top: 21px; padding: 19px; border: 1px solid var(--sand); border-radius: 11px; background: var(--cream); }
.doc-modal__pack .doc-modal__tag { color: var(--gold); font-size: .59rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.doc-modal__pack h3 { margin: 7px 0 5px; color: var(--forest); font-size: 1.5rem; }
.doc-modal__pack p { margin: 0 0 12px; font-size: .74rem; }
.doc-modal__pack .btn { width: 100%; }
.doc-modal__skip { display: block; margin-top: 12px; border: 0; background: transparent; color: var(--muted); font-size: .68rem; text-decoration: underline; }
.doc-modal__error { margin: 12px 0 0; color: #8a1f1f; font-size: .78rem; }

.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-error { border-top-color: var(--gold); background: var(--cream); color: var(--ink); }
.woocommerce div.product .product_title { color: var(--forest); font-family: var(--serif); font-size: clamp(2.3rem, 4vw, 3.8rem); }
.woocommerce div.product p.price,
.woocommerce div.product span.price { color: var(--forest); font-family: var(--serif); font-size: 2.2rem; }
.woocommerce div.product form.cart .button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt { border-radius: 999px; background: var(--forest); color: #fff; font-weight: 800; }
.woocommerce div.product form.cart .button:hover,
.woocommerce a.button.alt:hover { background: var(--forest-2); }
.woocommerce #content div.product div.images,
.woocommerce div.product div.images { border-radius: 14px; overflow: hidden; }
.woocommerce-tabs ul.tabs li.active a { color: var(--forest); }
.woocommerce table.shop_table { border-color: var(--sand); border-radius: 10px; }
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select { border-color: var(--line); border-radius: 7px; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-panel { max-width: 560px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .docs-grid, .related-grid, .pack-grid { grid-template-columns: repeat(2, 1fr); }
  .doc-layout { grid-template-columns: 1fr; gap: 32px; }
  .doc-sidebar { position: static; }
  .download-card { max-width: 560px; }
  .site-nav { display: none; }
  .nav-toggle { display: block; }
  .header-actions .btn { display: none; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .footer-grid > div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .container, .container--narrow { width: min(100% - 30px, 1180px); }
  .topbar__inner { justify-content: center; }
  .topbar__group:last-child { display: none; }
  .site-header__inner { min-height: 72px; }
  .brand__mark { width: 38px; height: 38px; }
  .brand__name strong { font-size: 1.1rem; }
  .hero { padding-top: 48px; }
  .hero-search { border-radius: 12px; flex-direction: column; }
  .hero-search input { min-height: 44px; }
  .hero-search button { width: 100%; }
  .category-grid, .docs-grid, .related-grid, .pack-grid, .steps-grid { grid-template-columns: 1fr; }
  .pack-band__inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-grid > div:last-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
  .doc-modal__dialog { padding: 24px 20px; }
}
