/* Kivancnotes rights notice: one stylesheet for all nine editions, readable first on phones. */
@font-face{font-family:'Cormorant';font-style:normal;font-weight:300 600;font-display:swap;src:url('../fonts/cormorant-normal.woff2') format('woff2')}
@font-face{font-family:'Cormorant';font-style:italic;font-weight:300 500;font-display:swap;src:url('../fonts/cormorant-italic.woff2') format('woff2')}
@font-face{font-family:'Manrope';font-style:normal;font-weight:300 700;font-display:swap;src:url('../fonts/manrope-normal.woff2') format('woff2')}
@font-face{font-family:'Naskh';font-style:normal;font-weight:400 700;font-display:swap;src:url('../fonts/naskh.woff2') format('woff2')}
@font-face{font-family:'Vazirmatn';font-style:normal;font-weight:300 700;font-display:swap;src:url('../fonts/vazirmatn.woff2') format('woff2')}

:root {
  color-scheme: dark;
  --ink: #0a0a0c;
  --ivory: #f0eadd;
  --text: #d3cdc2;
  --muted: #a39e95;
  --gold: #c8b183;
  --ok: #b9c9a0;
  --stop: #d9a594;
  --line: #c8b18333;
  --hair: #ffffff14;
  --serif: 'Cormorant', Georgia, serif;
  --sans: 'Manrope', system-ui, sans-serif;
  --gutter: max(clamp(20px, 5.6vw, 86px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --header: 80px;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 24px); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-color: #45423d var(--ink); }
body { margin: 0; background: var(--ink); color: var(--ivory); font: 400 16px/1.75 var(--sans); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; -webkit-tap-highlight-color: transparent; }
::selection { background: #c8b18344; color: #fff8e8; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: butt; stroke-linejoin: round; flex-shrink: 0; }
h1, h2, h3, p, ol, ul { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
article:focus { outline: none; }
.shell { width: min(100%, 1400px); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: fixed; top: 12px; inset-inline-start: 16px; z-index: 100; padding: 12px 18px; background: var(--ivory); color: var(--ink); transform: translateY(-160%); }
.skip:focus { transform: none; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top); background: var(--ink); border-bottom: 1px solid var(--hair); }
.topbar-inner { min-height: var(--header); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { padding-block: 12px; font: 400 clamp(17px, 1.5vw, 22px)/1.2 var(--serif); letter-spacing: .2em; white-space: nowrap; }
.brand em { color: var(--gold); font-style: normal; }
.topbar-actions { display: flex; align-items: center; gap: clamp(6px, 2.4vw, 36px); }
.return { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); font-size: 13px; }
.return svg { width: 16px; height: 16px; }
.language { position: relative; }
.language summary { list-style: none; display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 8px; cursor: pointer; font-size: 13px; letter-spacing: .08em; }
.language summary::-webkit-details-marker { display: none; }
.language summary::marker { content: ''; }
.language summary > svg { width: 17px; height: 17px; color: var(--gold); }
.language .chevron { width: 12px; height: 12px; color: var(--ivory); transition: transform .2s; }
.language[open] .chevron { transform: rotate(180deg); }
.language-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 12px); z-index: 40; width: min(340px, calc(100vw - 2 * var(--gutter))); max-height: calc(100vh - var(--header) - 24px); max-height: calc(100dvh - var(--header) - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 18px; background: #151518; border: 1px solid var(--line); box-shadow: 0 28px 64px #0009; }
.language-title { margin-bottom: 10px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .16em; }
.language-options { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
.language-options a { display: flex; align-items: center; min-height: 44px; padding: 6px 12px; border: 1px solid transparent; font-size: 14px; }
.language-options [aria-current=page] { border-color: var(--line); color: var(--gold); }
.reading-progress { position: absolute; bottom: -1px; inset-inline-start: 0; width: 100%; height: 1px; border: 0; background: transparent; color: var(--gold); appearance: none; pointer-events: none; }
.reading-progress::-webkit-progress-bar { background: transparent; }
.reading-progress::-webkit-progress-value { background: var(--gold); }
.reading-progress::-moz-progress-bar { background: var(--gold); }

/* opening: title and the one-sentence answer */
.hero { position: relative; padding-block: clamp(48px, 7vw, 96px) 40px; border-bottom: 1px solid var(--line); }
.eyebrow { display: flex; align-items: center; gap: 14px; color: var(--gold); font-size: 11px; line-height: 1.6; text-transform: uppercase; letter-spacing: .22em; }
.eyebrow::before { content: ''; width: 30px; height: 1px; flex-shrink: 0; background: var(--gold); }
.hero-grid { margin-top: 30px; }
h1 { max-width: 1000px; font-size: clamp(46px, 6.6vw, 92px); line-height: 1.02; letter-spacing: -.025em; text-wrap: balance; }
h1 span, h1 em { display: block; }
h1 em { margin-top: 4px; color: var(--gold); font-weight: 400; }
.hero-description { max-width: 680px; margin-top: 28px; color: var(--ivory); font-size: clamp(17px, 1.4vw, 19px); line-height: 1.7; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; margin-top: 32px; color: var(--muted); font-size: 12px; line-height: 1.6; letter-spacing: .04em; }
.date { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.date time { color: var(--text); }

/* at a glance: three answers with a clear status */
.overview { padding-top: 32px; }
.overline { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .18em; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.summary-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 24px 24px 26px; border: 1px solid var(--hair); background: linear-gradient(180deg, #ffffff06, #ffffff00 60%); transition: border-color .25s; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 9px; border: 1px solid; border-radius: 99px; font-size: 12px; font-weight: 600; line-height: 1.4; letter-spacing: .03em; }
.status svg { width: 15px; height: 15px; stroke-width: 1.7; }
.status-ok { color: var(--ok); border-color: #b9c9a04d; }
.status-cond { color: var(--gold); border-color: #c8b18366; }
.status-perm { color: var(--stop); border-color: #d9a5944d; }
.summary-card h2 { margin-top: 4px; font-size: clamp(26px, 2.2vw, 30px); line-height: 1.12; letter-spacing: -.01em; }
.summary-card p { color: var(--text); font-size: 15px; line-height: 1.65; }
.summary-note { max-width: 880px; margin-top: 14px; color: var(--muted); font-size: 13px; line-height: 1.7; }

/* contents and the notice itself */
.body-grid { display: grid; grid-template-columns: 240px minmax(0, 740px); justify-content: space-between; gap: clamp(40px, 7vw, 112px); padding-top: 64px; }
.contents { position: sticky; top: calc(var(--header) + 28px); align-self: start; }
.contents ol { list-style: none; margin-top: 16px; padding: 0; border-inline-start: 1px solid var(--hair); }
.contents li a { display: flex; align-items: baseline; gap: 12px; min-height: 40px; margin-inline-start: -1px; padding-block: 8px; padding-inline: 16px 10px; border-inline-start: 1px solid transparent; color: var(--muted); font-size: 14px; line-height: 1.5; transition: color .2s, border-color .2s; }
.contents li a > span:first-child { color: var(--gold); font-size: 11px; font-variant-numeric: lining-nums tabular-nums; direction: ltr; }
.contents li a[aria-current=location] { color: var(--ivory); border-inline-start-color: var(--gold); }
.contents-meta { margin-top: 24px; color: var(--gold); font: italic 21px/1.4 var(--serif); }
.article { min-width: 0; }
.article section { margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--hair); }
.article section:last-of-type { margin-bottom: 0; padding-bottom: 0; border: 0; }
.section-heading { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: baseline; gap: 16px; margin-bottom: 18px; }
.section-number { color: var(--gold); font: italic 24px/1 var(--serif); direction: ltr; }
.section-heading h2 { font-size: clamp(30px, 2.6vw, 38px); line-height: 1.15; letter-spacing: -.012em; text-wrap: balance; }
.section-copy { padding-inline-start: 50px; }
.section-copy > * + * { margin-top: 14px; }
.section-copy p, .section-copy li { color: var(--text); font-size: 16px; line-height: 1.75; }
.section-copy .list-title { margin-top: 22px; color: var(--ivory); font-weight: 600; }
.section-copy .note { color: var(--muted); font-size: 14px; line-height: 1.7; }
.section-copy ul { list-style: none; display: grid; gap: 8px; padding: 0; }
.section-copy li { position: relative; padding-inline-start: 28px; }
.section-copy li::before { content: ''; position: absolute; top: .86em; inset-inline-start: 4px; width: 10px; height: 1px; background: var(--gold); }
.list-yes li::before { top: .4em; inset-inline-start: 8px; width: 6px; height: 11px; border: solid var(--ok); border-width: 0 1.6px 1.6px 0; background: none; transform: rotate(45deg); }
.list-ask li::before { top: .55em; width: 9px; height: 9px; border: 1.4px solid var(--gold); border-radius: 50%; background: none; }
.list-no li::before { content: '×'; top: 0; inset-inline-start: 3px; width: auto; height: auto; background: none; color: var(--stop); font-size: 20px; line-height: 1.38; }
.inline-link { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; margin-top: 18px; border-bottom: 1px solid var(--line); color: var(--gold); font-size: 15px; font-weight: 500; }
.inline-link svg { width: 15px; height: 15px; }
.reference { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; margin-top: 28px; padding-inline-start: 50px; color: var(--muted); font-size: 13px; }
.reference a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }

/* permission request */
.contact { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .75fr); align-items: center; gap: 56px; margin-top: 80px; padding: clamp(30px, 4vw, 56px); border: 1px solid var(--line); background: linear-gradient(100deg, #111114f5, #111114d9), url('../python-fume-mobile.webp') center / cover; }
.contact::after { content: ''; position: absolute; inset: 8px; border: 1px solid var(--hair); pointer-events: none; }
.contact h2 { margin-top: 18px; font-size: clamp(34px, 3.6vw, 52px); line-height: 1.08; letter-spacing: -.015em; }
.contact-body { color: var(--text); font-size: 16px; line-height: 1.75; }
.contact-link { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 56px; margin-top: 16px; border-bottom: 1px solid var(--gold); color: var(--gold); font-size: 15px; font-weight: 500; }
.contact-link svg { width: 18px; height: 18px; transition: transform .25s; }
.contact-note { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 30px; padding-block: 32px calc(32px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 13px; line-height: 1.8; }
.foot-copy { display: grid; gap: 2px; }
.foot a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.foot a svg { width: 14px; height: 14px; }

@media (hover: hover) {
  .return:hover, .contents li a:hover, .foot a:hover, .reference a:hover { color: var(--gold); }
  .contents li a:hover { color: var(--ivory); border-inline-start-color: var(--gold); }
  .language-options a:hover { background: #c8b1830d; }
  .summary-card:hover { border-color: var(--line); }
  .summary-card:hover h2 { color: var(--gold); }
  .contact-link:hover svg { transform: translate(2px, -2px); }
}

/* scripts with taller letterforms */
:lang(ru) h1 { font-size: clamp(38px, 5.4vw, 78px); }
[dir=rtl] { --serif: 'Naskh', 'Noto Naskh Arabic', serif; --sans: 'Vazirmatn', Tahoma, sans-serif; }
[dir=rtl] .brand { font-family: 'Cormorant', Georgia, serif; }
[dir=rtl] :is(h1, h2, h3, .section-number, .contents-meta) { font-style: normal; line-height: 1.45; letter-spacing: 0; }
[dir=rtl] h1 { font-size: clamp(44px, 6vw, 84px); }
[dir=rtl] h1 em { font-style: normal; }
[dir=rtl] :is(.eyebrow, .overline, .language-title, .status) { letter-spacing: 0; }
[dir=rtl] :is(.eyebrow, .overline) { font-size: 13px; }
[dir=rtl] .return svg { transform: scaleX(-1); }
[dir=rtl] :is(.hero-description, .section-copy p, .section-copy li, .summary-card p, .contact-body) { line-height: 2; }
[dir=rtl] .section-heading { align-items: start; }
[dir=rtl] .section-number { font-family: 'Cormorant', Georgia, serif; line-height: 2; }
[dir=rtl] .list-no li::before { line-height: 1.6; }

@media (max-width: 1100px) {
  .body-grid { grid-template-columns: 210px minmax(0, 1fr); gap: 44px; }
  .contact { gap: 36px; }
}
@media (max-width: 850px) {
  :root { --header: 72px; }
  .summary-grid { grid-template-columns: minmax(0, 1fr); }
  .body-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 44px; }
  .contents { position: static; }
  .contents ol { margin-top: 12px; }
  .contents li a { min-height: 44px; font-size: 15px; }
  .contents-meta { display: none; }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 600px) {
  :root { --header: 64px; }
  .topbar-inner { gap: 8px; }
  .topbar-actions { gap: 2px; }
  .brand { font-size: 17px; letter-spacing: .14em; }
  .return { width: 44px; justify-content: center; }
  .return span { display: none; }
  .language summary { gap: 6px; padding-inline: 6px; }
  .hero { padding-block: 36px 28px; }
  .hero-grid { margin-top: 22px; }
  h1 { font-size: clamp(40px, 11vw, 60px); line-height: 1.05; letter-spacing: -.02em; }
  .hero-description { margin-top: 20px; font-size: 17px; line-height: 1.65; }
  .hero-meta { margin-top: 22px; }
  .summary-card { padding: 20px 18px 22px; }
  .summary-card h2 { font-size: 26px; }
  .body-grid { gap: 32px; padding-top: 36px; }
  .section-heading { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; margin-bottom: 14px; }
  .section-number { font-size: 21px; }
  .section-heading h2 { font-size: 29px; }
  .section-copy, .reference { padding-inline-start: 0; }
  .article section { margin-bottom: 32px; padding-bottom: 32px; }
  .contact { margin-top: 48px; padding: 26px 20px; }
  .contact h2 { margin-top: 14px; font-size: 34px; }
  .foot { font-size: 12px; }
  :lang(ru) h1 { font-size: clamp(30px, 8.4vw, 46px); }
  [dir=rtl] h1 { font-size: clamp(38px, 10vw, 56px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  :root { color-scheme: light; --ink: #fff; --ivory: #151515; --text: #303030; --muted: #555; --gold: #665334; --ok: #3d5a1f; --stop: #7a3a2a; --line: #bbb; --hair: #ccc; }
  body { background: #fff; }
  .shell { width: 100%; padding: 0; }
  .topbar { position: static; background: #fff; }
  .topbar-inner { min-height: 50px; }
  .skip, .topbar-actions, .reading-progress, .contents, .contact, .foot a { display: none; }
  .hero { padding: 30px 0; }
  h1, :lang(ru) h1, [dir=rtl] h1 { font-size: 40pt; }
  .hero-description { font-size: 12pt; }
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
  .summary-card { break-inside: avoid; }
  .body-grid { display: block; padding-top: 30px; }
  .article section { break-inside: avoid; margin-bottom: 22px; padding-bottom: 22px; }
  .section-heading h2 { font-size: 22pt; }
  .section-copy p, .section-copy li { font-size: 10.5pt; line-height: 1.6; }
  .section-copy, .reference { padding-inline-start: 0; }
  .foot { margin-top: 25px; border-top: 1px solid var(--line); }
}
