/* Layout: each article is one magazine spread from „Бизнеспектър“ (1999–2000), reset as a paper sheet on a grey desk.
   Single deliberate light look: coated magazine paper. */
:root {
  --desk: #cfd1d4;
  --paper: #fbfaf6;
  --paper-warm: #fbf3cf;
  --ink: #1b1b1f;
  --ink-soft: #55565c;
  --teal: #1a9fb8;
  --navy: #23367e;
  --blue: #3c64a8;
  --red: #d8231f;
  --orange: #f0a21c;
  --yellow: #f5c518;
  --rule: #8a8c92;
  --pencil: #3d4f8f;
  --f-head: "Roboto Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --f-body: "Philosopher", "Trebuchet MS", "Segoe UI", sans-serif;
  --f-sans: "PT Sans", "Helvetica Neue", Arial, sans-serif;
  --f-serif: "PT Serif", Georgia, "Times New Roman", serif;
  --f-hand: "Caveat", "Segoe Print", cursive;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 24px 56px;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
p { margin: 0; }

.topnav { max-width: 1040px; margin: 0 auto 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-family: var(--f-sans); font-size: 13px; color: var(--ink-soft); }
.topnav a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.topnav a:hover, .topnav a:focus-visible { color: var(--ink); border-bottom-color: var(--ink); outline: none; }

.sheet {
  max-width: 1040px; margin: 0 auto; background: var(--paper);
  box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 10px 30px rgba(0,0,0,.12);
  padding: clamp(18px, 4vw, 48px);
  position: relative;
}
.sheet.warm { background: var(--paper-warm); }
.sheet + .sheet { margin-top: 28px; }

/* running head */
.runhead { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 18px; }
.runhead .section { font-family: var(--f-serif); font-weight: 700; font-style: italic; color: var(--teal); font-size: 21px; line-height: 1; white-space: nowrap; }
.runhead .line { flex: 1; border-bottom: 1.5px solid var(--rule); margin-bottom: 3px; min-width: 20px; }
.runhead .mag { font-family: var(--f-sans); font-weight: 700; font-size: 15px; letter-spacing: .02em; white-space: nowrap; border-bottom: 2px solid var(--ink); }
.runhead .mag span { color: #b9bbc1; font-weight: 400; }
.note { font-family: var(--f-hand); color: var(--pencil); font-size: 22px; line-height: 1; position: absolute; top: clamp(8px, 1.6vw, 22px); left: 42%; transform: rotate(-2deg); white-space: nowrap; }

/* headlines */
.hl { font-family: var(--f-head); font-weight: 900; line-height: .9; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
.byline { font-family: var(--f-sans); font-weight: 700; font-style: italic; text-transform: uppercase; font-size: 14px; letter-spacing: .02em; }
.deck { font-family: var(--f-serif); font-weight: 700; font-style: italic; color: var(--red); font-size: clamp(18px, 2.4vw, 24px); line-height: 1.2; }

/* body copy */
.body { font-size: 15.5px; line-height: 1.5; hyphens: auto; -webkit-hyphens: auto; }
.body p { text-indent: 1.1em; text-align: justify; }
.body p.ni, .body h3 + p, .body .sub + p { text-indent: 0; }
.body p + p { margin-top: 2px; }
.cols2 { columns: 2 300px; column-gap: 28px; }
.cols3 { columns: 3 230px; column-gap: 24px; }
.drop::first-letter { float: left; font-family: var(--f-head); font-weight: 700; font-size: 4.1em; line-height: .8; padding: 4px 8px 0 0; color: var(--ink); }
.drop.red::first-letter { color: var(--red); }
.q { font-weight: 700; font-style: italic; }
.qr { font-weight: 700; font-style: italic; color: var(--red); }
.body b { font-weight: 700; }
.body ol { margin: 4px 0 4px 1.2em; padding: 0; }
.body ol li { margin-bottom: 2px; }
.sub { font-family: var(--f-sans); font-weight: 700; text-transform: uppercase; color: var(--blue); text-align: center; font-size: 15px; line-height: 1.2; margin: 14px 0 8px; break-after: avoid; text-wrap: balance; }
.pull { font-family: var(--f-serif); font-weight: 700; font-style: italic; color: var(--red); font-size: 26px; line-height: 1.15; text-align: right; margin: 6px 0 12px; break-inside: avoid; }
.fn { font-size: 12.5px; font-style: italic; color: var(--ink-soft); line-height: 1.45; border-top: 1px solid var(--rule); padding-top: 8px; margin-top: 18px; max-width: 70ch; display: flex; flex-direction: column; gap: 4px; }
.follow { text-align: right; font-style: italic; margin-top: 6px; }
.pageno { font-family: var(--f-serif); font-weight: 700; font-size: 20px; margin-top: 18px; }
.pageno.r { text-align: right; }
figure { margin: 0; break-inside: avoid; }
figure img { margin: 0 auto; }
.cols2 figure, .cols3 figure { margin-block: 10px; }
.wide { column-span: all; }

.src { max-width: 1040px; margin: 16px auto 0; font-family: var(--f-sans); font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }

@media (max-width: 640px) {
  .note { position: static; transform: none; display: block; margin-bottom: 8px; font-size: 19px; }
  .pull { font-size: 22px; text-align: left; }
  .runhead .section { font-size: 18px; }
}

/* Print / PDF: A4, nothing split mid-photo, headings stay with their text */
@page { size: A4; margin: 13mm 12mm; }
@media print {
  html, body { background: #fff !important; }
  body { padding: 0 !important; font-size: 10pt; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .topnav, .src { display: none; }
  .sheet { box-shadow: none; max-width: none; padding: 0; }
  .sheet + .sheet { margin-top: 0; break-before: page; }
  .body { font-size: 9.6pt; line-height: 1.42; }
  .cols3 { columns: 3; column-gap: 6mm; }
  .cols2 { columns: 2; column-gap: 7mm; }
  figure { break-inside: avoid; }
  figure img { max-height: 95mm; width: auto; }
  p { orphans: 3; widows: 3; }
  .sub, h1, h2, h3, .hl, .byline, .deck { break-after: avoid; break-inside: avoid; }
  .pull, .fn { break-inside: avoid; }
  .note { position: static; transform: none; display: block; margin-bottom: 2mm; font-size: 15pt; }
}

/* site nav: back link + the two download options */
.topnav .opts { display: flex; gap: 8px; flex-wrap: wrap; }
.topnav .opts a { border: 1.5px solid var(--ink); padding: 5px 12px; text-decoration: none; color: var(--ink); background: var(--paper); font-weight: 700; border-radius: 2px; }
.topnav .opts a:hover, .topnav .opts a:focus-visible { background: var(--ink); color: var(--paper); outline: none; }
.topnav { align-items: center; }

/* typed documents: requirement tables, reviews */
.docpage { font-family: "Arimo", "Liberation Sans", Arial, sans-serif; color: #111; }
.docpage h1 { font-family: inherit; font-weight: 400; text-align: center; font-size: clamp(20px, 2.6vw, 26px); line-height: 1.35; margin: 6px 0 26px; text-wrap: balance; }
.docpage h1 small { display: block; font-size: .85em; }
.tbl-wrap { overflow-x: auto; }
table.req { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; min-width: 560px; }
table.req th, table.req td { border: 1.5px solid #222; padding: 6px 9px; vertical-align: top; text-align: left; }
table.req thead th { font-weight: 400; text-align: center; font-size: 16px; padding: 10px; }
table.req .lvl td { text-align: center; font-family: "Tinos", "Liberation Serif", "Times New Roman", serif; font-weight: 700; font-size: 20px; padding: 10px 8px 2px; border-bottom: 0; position: relative; }
table.req .lvl td small { display: block; text-align: left; font-family: "Arimo", Arial, sans-serif; font-weight: 400; font-size: 14px; padding-top: 4px; }
table.req .lvl.belt td { font-family: "Arimo", Arial, sans-serif; font-size: 17px; }
table.req td.req-l { width: 33%; }
table.req td p + p { margin-top: 10px; }
table.req .t { font-family: "Tinos", "Liberation Serif", "Times New Roman", serif; font-weight: 700; }
table.req .rom { font-family: "Tinos", "Liberation Serif", "Times New Roman", serif; }
table.req tr { break-inside: avoid; }
table.req ul { margin: 0; padding-left: 1.1em; }
@media print {
  table.req { font-size: 9.6pt; min-width: 0; }
  table.req .lvl td { font-size: 13pt; }
  .docpage h1 { font-size: 15pt; margin-bottom: 6mm; }
  .tbl-wrap { overflow: visible; }
}
