/* Layout: broadsheet front page — masthead, rubric index strip, ads set in newspaper columns, cut-out coupon to submit. Deliberately single-theme: black ink on newsprint. */
:root {
  --paper: #e8e5dc;
  --paper-2: #dedad0;
  --ink: #141312;
  --ink-soft: #3d3a36;
  --rule: #141312;
  --muted: #6b675f;
  --f-mast: "Ruslan Display", "Oswald", Georgia, serif;
  --f-head: "Oswald", "Arial Narrow", Arial, sans-serif;
  --f-body: "PT Serif", Georgia, "Times New Roman", serif;
  --f-mono: "PT Mono", "Courier New", monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.35;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 20px 48px;
  background-image:
    radial-gradient(rgba(20,19,18,.045) 1px, transparent 1.2px),
    radial-gradient(rgba(20,19,18,.03) 1px, transparent 1.2px);
  background-size: 5px 5px, 7px 7px;
  background-position: 0 0, 2px 3px;
}
.sheet { max-width: 1180px; margin: 0 auto; }
button, input, select, textarea { font: inherit; color: var(--ink); }
:focus-visible { outline: 2px dashed var(--ink); outline-offset: 2px; }

/* ---------- masthead ---------- */
.topline, .subline {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px;
  font-family: var(--f-head); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}
.topline { border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
.mast {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding-block: 14px 10px;
}
.mast h1 {
  font-family: var(--f-mast); font-weight: 400; margin: 0; text-align: center;
  font-size: clamp(44px, 9vw, 116px); line-height: .95; letter-spacing: .01em;
}
.ear {
  border: 2px solid var(--ink); padding: 8px 10px; font-family: var(--f-head);
  font-size: 12px; text-transform: uppercase; letter-spacing: .05em; line-height: 1.3; max-width: 190px;
}
.ear b { display: block; font-size: 22px; letter-spacing: 0; line-height: 1.05; }
.ear.right { justify-self: end; text-align: right; }
.motto { text-align: center; font-style: italic; margin: 0 0 8px; font-size: 15px; }
.subline { border-top: 4px double var(--rule); border-bottom: 1px solid var(--rule); padding-block: 6px; }

/* ---------- index strip ---------- */
.index {
  display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: center;
  padding-block: 12px; border-bottom: 1px solid var(--rule);
}
.index .lbl { font-family: var(--f-head); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; margin-right: 6px; }
.chip {
  font-family: var(--f-head); font-size: 13px; text-transform: uppercase; letter-spacing: .04em;
  background: transparent; border: 1px solid var(--ink); padding: 3px 8px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.search {
  margin-left: auto; display: flex; align-items: center; gap: 6px; min-width: 0;
}
.search input {
  border: 0; border-bottom: 1px solid var(--ink); background: transparent; padding: 3px 2px;
  width: 200px; max-width: 46vw; font-family: var(--f-mono); font-size: 14px;
}

/* ---------- layout ---------- */
.front { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0 28px; padding-top: 18px; }
.front > * { min-width: 0; }
@media (max-width: 900px) {
  .front { grid-template-columns: minmax(0, 1fr); }
  .mast { grid-template-columns: 1fr; }
  .ear { display: none; }
}
.lead-head {
  font-family: var(--f-head); font-weight: 700; text-transform: uppercase;
  font-size: clamp(22px, 3.4vw, 34px); line-height: 1.05; margin: 0 0 4px; text-wrap: balance;
}
.lead-sub { margin: 0 0 14px; color: var(--ink-soft); font-style: italic; }
.status {
  font-family: var(--f-mono); font-size: 12px; color: var(--muted); margin: 0 0 12px;
}

/* ---------- ad columns ---------- */
.cols { column-width: 230px; column-gap: 22px; column-rule: 1px solid var(--rule); }
.rubric {
  break-inside: avoid; column-span: none;
  background: var(--ink); color: var(--paper); font-family: var(--f-head); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; font-size: 15px; padding: 3px 8px; margin: 0 0 6px;
  display: flex; justify-content: space-between; gap: 8px;
}
.rubric small { font-weight: 500; opacity: .8; font-size: 11px; align-self: center; }
.rubric-block { break-inside: avoid-column; margin-bottom: 14px; }
.rubric-block .ad:first-of-type { break-before: avoid; }
.ad {
  display: block; width: 100%; text-align: left; background: transparent; border: 0;
  border-bottom: 1px dotted var(--ink-soft); padding: 5px 2px 6px; cursor: pointer;
  font-size: 14px; line-height: 1.32; hyphens: auto; break-inside: avoid;
}
.ad:hover { background: var(--paper-2); }
.ad .kind { font-family: var(--f-head); font-weight: 700; letter-spacing: .03em; }
.ad .tel { font-family: var(--f-mono); font-weight: 700; white-space: nowrap; }
.ad .price { font-weight: 700; }
.ad .photo-mark { font-family: var(--f-head); font-size: 11px; border: 1px solid var(--ink); padding: 0 3px; margin-left: 3px; vertical-align: 1px; }
.ad.boxed { border: 2px solid var(--ink); padding: 6px 7px; margin: 4px 0 6px; }
.empty {
  border: 1px dashed var(--ink); padding: 18px; text-align: center; font-style: italic;
  column-span: all; break-inside: avoid;
}

/* ---------- sidebar ---------- */
aside { display: flex; flex-direction: column; gap: 22px; }
@media (max-width: 900px) { aside { margin-top: 28px; } }
.coupon {
  border: 2px dashed var(--ink); padding: 14px 14px 16px; position: relative; background: var(--paper);
}
.coupon::before {
  content: "✂"; position: absolute; top: -14px; left: 14px; background: var(--paper);
  padding: 0 4px; font-size: 18px; line-height: 1;
}
.coupon h2 {
  font-family: var(--f-head); font-weight: 700; text-transform: uppercase; margin: 0 0 2px; font-size: 22px; letter-spacing: .02em;
}
.coupon .hint { margin: 0 0 12px; font-size: 13px; font-style: italic; color: var(--ink-soft); }
.field { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.field label, .field .lbl {
  font-family: var(--f-head); text-transform: uppercase; letter-spacing: .06em; font-size: 11px;
}
.field input[type=text], .field input[type=tel], .field select, .field textarea {
  border: 1px solid var(--ink); background: #f3f1ea; padding: 6px 7px; border-radius: 0; width: 100%;
  font-family: var(--f-mono); font-size: 14px;
}
.field textarea { resize: vertical; min-height: 92px; line-height: 1.35; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kinds { display: flex; flex-wrap: wrap; gap: 4px; }
.kinds label {
  font-family: var(--f-head); font-size: 13px; text-transform: uppercase; letter-spacing: .03em;
  border: 1px solid var(--ink); padding: 2px 7px; cursor: pointer; display: inline-flex; gap: 4px; align-items: center;
}
.kinds input { accent-color: #141312; margin: 0; }
.counter { font-family: var(--f-mono); font-size: 11px; color: var(--muted); text-align: right; }
.file-btn {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--ink); padding: 6px; cursor: pointer; background: #f3f1ea;
}
.file-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-btn .thumb {
  width: 54px; height: 54px; flex: none; border: 1px solid var(--ink); background: var(--paper-2);
  display: grid; place-items: center; font-family: var(--f-head); font-size: 10px; text-transform: uppercase; overflow: hidden;
}
.file-btn .thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.2); }
.file-btn span.t { font-size: 13px; }
.file-btn:focus-within { outline: 2px dashed var(--ink); outline-offset: 2px; }
.submit {
  width: 100%; background: var(--ink); color: var(--paper); border: 0; padding: 10px; cursor: pointer;
  font-family: var(--f-head); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 16px;
}
.submit:disabled { opacity: .5; cursor: wait; }
.form-msg { font-family: var(--f-mono); font-size: 12px; margin: 8px 0 0; min-height: 1em; }

.box { border-top: 4px double var(--rule); padding-top: 8px; }
.box h3 { font-family: var(--f-head); text-transform: uppercase; letter-spacing: .06em; font-size: 14px; margin: 0 0 6px; }
.box p { margin: 0 0 6px; font-size: 13px; }
.rates { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.rates td { border-bottom: 1px dotted var(--ink-soft); padding: 3px 0; }
.rates td:last-child { text-align: right; font-family: var(--f-mono); }

footer {
  margin-top: 28px; border-top: 4px double var(--rule); padding-top: 8px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px;
  font-family: var(--f-mono); font-size: 11px; color: var(--ink-soft);
}

/* ---------- ad detail ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(20,19,18,.55); z-index: 50;
  display: grid; place-items: center; padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
.card {
  background: var(--paper); border: 2px solid var(--ink); width: min(560px, 100%); max-height: 100%; overflow: auto;
  padding: 18px; box-shadow: 8px 8px 0 var(--ink); position: relative;
}
.card .close {
  position: absolute; top: 8px; right: 8px; border: 1px solid var(--ink); background: var(--paper);
  font-family: var(--f-head); text-transform: uppercase; font-size: 12px; padding: 2px 8px; cursor: pointer;
}
.card .meta { font-family: var(--f-head); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; border-bottom: 1px solid var(--ink); padding-bottom: 6px; margin-bottom: 12px; padding-right: 70px; }
.card-body { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; }
@media (max-width: 520px) { .card-body { grid-template-columns: minmax(0, 1fr); } }
.halftone {
  position: relative; width: 100%; max-width: 100%; aspect-ratio: 1; border: 1px solid var(--ink); overflow: hidden; background: var(--paper-2);
}
.halftone img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.35) brightness(1.05); display: block; }
.halftone::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply;
  background: radial-gradient(circle, rgba(20,19,18,.55) 0.9px, transparent 1.3px) 0 0 / 3px 3px;
}
.halftone .none {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  font-family: var(--f-head); text-transform: uppercase; font-size: 12px; letter-spacing: .06em; color: var(--muted); padding: 8px;
}
.card h2 { font-family: var(--f-head); font-weight: 700; text-transform: uppercase; font-size: 26px; margin: 0 0 6px; line-height: 1.05; }
.card .desc { margin: 0 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.card .price-big { font-family: var(--f-head); font-weight: 700; font-size: 20px; margin: 0 0 10px; }
.tel-box { border: 2px solid var(--ink); padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tel-box .num { font-family: var(--f-mono); font-weight: 700; font-size: 20px; user-select: all; }
.tel-box button, .card .remove {
  border: 1px solid var(--ink); background: transparent; cursor: pointer; font-family: var(--f-head);
  text-transform: uppercase; font-size: 12px; letter-spacing: .05em; padding: 3px 8px;
}
.card .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; font-family: var(--f-mono); font-size: 11px; color: var(--muted); flex-wrap: wrap; }
@media (prefers-reduced-motion: no-preference) {
  .card { animation: drop .18s ease-out; }
  @keyframes drop { from { transform: translateY(-8px); opacity: .6; } to { transform: none; opacity: 1; } }
}

.contents { display: contents; }
.search .lbl { margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- согласие в купоне ---------- */
.consent { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 12px; font-size: 12.5px; line-height: 1.35; }
.consent input { accent-color: #141312; margin: 2px 0 0; flex: none; width: 16px; height: 16px; }
.consent a, footer a { color: var(--ink); }

/* ---------- страницы документов ---------- */
.doc { max-width: 72ch; }
.doc h1 { font-family: var(--f-head); font-weight: 700; text-transform: uppercase; font-size: clamp(24px, 4vw, 34px); line-height: 1.1; margin: 8px 0 4px; text-wrap: balance; border-bottom: 4px double var(--rule); padding-bottom: 10px; }
.doc h2 { font-family: var(--f-head); font-weight: 700; text-transform: uppercase; font-size: 17px; letter-spacing: .03em; margin: 22px 0 6px; }
.doc p, .doc li { font-size: 16px; line-height: 1.55; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 4px; }
.doc a { color: var(--ink); }
.doc-meta { font-family: var(--f-mono); font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.doc-back { font-family: var(--f-head); text-transform: uppercase; letter-spacing: .05em; font-size: 13px; }
.doc-back a { text-decoration: none; border-bottom: 1px solid var(--ink); }
.unset { background: var(--ink); color: var(--paper); padding: 0 4px; font-family: var(--f-mono); font-size: .9em; }

/* ---------- «90-х» в шапке ---------- */
.mast h1 { font-size: clamp(36px, 7.4vw, 100px); }
.mast h1 .era {
  display: inline-block; font-size: .62em; vertical-align: .32em; margin-left: .08em;
  border: .07em solid var(--ink); padding: .02em .14em .06em; line-height: 1; transform: rotate(-4deg);
}
@media (max-width: 520px) { .mast h1 .era { display: block; width: max-content; margin: .12em auto 0; vertical-align: 0; } }
