/*
 * noor «نور» -- a newspaper front page redrawn for the screen.
 * Centred masthead, thin rules between columns, Naskh headlines, paper-white by day and
 * charcoal by night. The accent (default crimson) and the logo are the owner's, from
 * «تنظیمات سایت › هویت و ظاهر»; --accent is set in the page head.
 */
@font-face { font-family: 'Dana'; src: url('../fonts/dana-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Dana'; src: url('../fonts/dana-bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'NoorHead'; src: url('../fonts/DroidNaskh-Bold.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
    --bg: var(--sb-c-page_bg, #faf8f4); --surface: #ffffff; --bg-alt: #f1ede5;
    --ink: var(--sb-c-text, #17150f); --ink-2: #5d5a52; --line: #e2dcce; --rule: #17150f;
    --radius: 2px;
    --font-body: 'Dana', Tahoma, 'Segoe UI', sans-serif;
    --font-head: 'NoorHead', 'Dana', Tahoma, serif;
    --maxw: 1240px;
    --foot-bg: #17150f; --foot-ink: #d9d4c7;
}
:root[data-theme="dark"] {
    --bg: #131312; --surface: #1b1b19; --bg-alt: #212120;
    --ink: #f1eee6; --ink-2: #a6a297; --line: #34332f; --rule: #f1eee6;
    --foot-bg: #0b0b0a; --foot-ink: #bdb8ab;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.85; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
.nr-wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
time { font-variant-numeric: tabular-nums; }

/* -- the head ------------------------------------------------------------------------------------ */
.nr-head { position: sticky; top: var(--nr-stick, 0); z-index: 120; background: var(--bg); }
.nr-topbar { border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--ink-2); }
.nr-topbar-in { display: flex; align-items: center; justify-content: space-between; min-height: 38px; gap: 12px; }
.nr-date { display: inline-flex; align-items: center; gap: 7px; }
.nr-tools { display: flex; align-items: center; gap: 2px; }
.nr-tool { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; transition: .15s; }
.nr-tool:hover { background: var(--bg-alt); color: var(--accent); }
.nr-ic-sun { display: none; } [data-theme="dark"] .nr-ic-sun { display: inline-flex; } [data-theme="dark"] .nr-ic-moon { display: none; }
.nr-mast { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; padding-block: 22px 16px; }
.nr-brand { grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.nr-brand:hover { color: inherit; }
.nr-wordmark { font-family: var(--font-head); font-size: clamp(2.1rem, 5.4vw, 3.6rem); line-height: 1.25; letter-spacing: -.01em; }
.nr-wordmark-sm { font-size: 1.5rem; }
.nr-logo { max-height: 72px; width: auto; max-width: min(100%, 440px); object-fit: contain; }
.nr-logo-dark { display: none; } [data-theme="dark"] .nr-logo-light { display: none; } [data-theme="dark"] .nr-logo-dark { display: inline; }
.nr-tagline { font-size: .86rem; color: var(--ink-2); letter-spacing: .02em; }
.nr-burger { display: none; width: 44px; height: 44px; place-items: center; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.nr-burger:hover { background: var(--bg-alt); }
.nr-nav { border-block: 1px solid var(--rule); background: var(--bg); }
.nr-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; }
.nr-menu > li { position: relative; }
.nr-menu > li > a { display: block; padding: 11px 15px; font-weight: 700; font-size: .98rem; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.nr-menu > li > a:hover, .nr-menu > li.is-on > a { color: var(--accent); border-bottom-color: var(--accent); }
.has-sub > a::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-inline-start: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-3px) rotate(45deg); opacity: .6; }
.nr-sub { position: absolute; top: 100%; inset-inline-start: 0; min-width: 190px; padding: 6px 0; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); box-shadow: 0 14px 30px rgba(0,0,0,.12); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .16s; z-index: 5; }
.has-sub:hover > .nr-sub, .has-sub:focus-within > .nr-sub { opacity: 1; visibility: visible; transform: none; }
.nr-sub a { display: block; padding: 8px 18px; font-size: .92rem; }
.nr-sub a:hover { background: var(--bg-alt); }
.nr-search { max-height: 0; overflow: hidden; background: var(--bg-alt); transition: max-height .22s ease; }
.nr-search.is-open { max-height: 86px; border-bottom: 1px solid var(--line); }
.nr-search .nr-wrap { display: flex; gap: 10px; padding-block: 14px; }
.nr-search input { flex: 1; min-width: 0; padding: .7em 1em; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; }
.nr-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.nr-search-go { display: inline-flex; align-items: center; gap: 8px; padding: 0 1.3em; border: 0; border-radius: var(--radius); background: var(--ink); color: var(--bg); font-weight: 700; cursor: pointer; }
.nr-search-go:hover { background: var(--accent); color: var(--accent-ink); }
.nr-flash { background: var(--accent); color: var(--accent-ink); font-size: .9rem; }
.nr-flash-in { display: flex; align-items: center; gap: 16px; min-height: 40px; }
.nr-flash-label { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 2px 12px; background: var(--accent-ink); color: var(--accent); border-radius: 2px; font-size: .82rem; }
.nr-flash-track { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.nr-flash-track ul { display: flex; width: max-content; gap: 44px; white-space: nowrap; animation: nr-marquee 60s linear infinite; }
.nr-flash-track:hover ul, .nr-flash-track:focus-within ul { animation-play-state: paused; }
.nr-flash a { color: inherit; } .nr-flash a:hover { text-decoration: underline; color: inherit; }
@keyframes nr-marquee { to { transform: translateX(50%); } }

/* the phone's menu */
.nr-drawer { position: fixed; inset: 0; z-index: 400; visibility: hidden; }
.nr-drawer-shade { position: absolute; inset: 0; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .2s; }
.nr-drawer-panel { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: min(86vw, 340px); padding: 18px 20px 28px; overflow-y: auto; background: var(--bg); transform: translateX(100%); transition: transform .25s ease; box-shadow: -10px 0 40px rgba(0,0,0,.25); }
html[data-menu="open"] .nr-drawer { visibility: visible; }
html[data-menu="open"] .nr-drawer-shade { opacity: 1; }
html[data-menu="open"] .nr-drawer-panel { transform: none; }
html[data-menu="open"] { overflow: hidden; }
.nr-drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; margin-bottom: 8px; border-bottom: 2px solid var(--rule); }
.nr-drawer-head button { border: 0; background: none; cursor: pointer; }
.nr-drawer-panel li a { display: block; padding: 11px 2px; font-weight: 700; border-bottom: 1px solid var(--line); }
.nr-drawer-panel li li a { padding-inline-start: 18px; font-weight: 400; font-size: .94rem; color: var(--ink-2); }
.nr-drawer-panel form { display: flex; gap: 8px; margin-top: 18px; }
.nr-drawer-panel input { flex: 1; min-width: 0; padding: .7em 1em; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
.nr-drawer-panel form button { padding: 0 14px; border: 0; background: var(--ink); color: var(--bg); cursor: pointer; }

/* -- the foot --------------------------------------------------------------------------------------------------- */
.nr-foot { margin-top: 64px; background: var(--foot-bg); color: var(--foot-ink); border-top: 5px solid var(--accent); font-size: .92rem; }
.nr-foot a:hover { color: #fff; }
.nr-foot-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.2fr; gap: 40px; padding-block: 44px 28px; }
.nr-brand-foot { align-items: flex-start; }
.nr-foot .nr-wordmark { color: #fff; font-size: 2rem; }
.nr-foot .nr-logo { max-height: 56px; }
.nr-foot-tag { margin: 4px 0 0; color: #fff; font-weight: 700; }
.nr-foot-about p { margin: 12px 0 0; line-height: 2; }
.nr-foot-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.nr-foot-social a { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; }
.nr-foot-social a:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.nr-foot-title { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.16); font-family: var(--font-head); font-size: 1.1rem; color: #fff; }
.nr-foot-list li { padding-block: 5px; }
.nr-foot-contact li { display: flex; align-items: flex-start; gap: 10px; padding-block: 6px; }
.nr-foot-contact .ki { margin-top: 6px; color: var(--accent); }
.nr-foot-tags { padding-block: 18px; border-top: 1px solid rgba(255,255,255,.12); }
.nr-foot-tags ul { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .84rem; }
.nr-foot-bottom { border-top: 1px solid rgba(255,255,255,.12); font-size: .82rem; }
.nr-foot-bottom .nr-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.nr-foot-bottom p { margin: 0; }
.nr-top-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: none; color: #fff; cursor: pointer; opacity: 0; pointer-events: none; transition: .2s; position: fixed; bottom: 22px; inset-inline-start: 22px; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); z-index: 90; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.nr-top-btn.is-visible { opacity: 1; pointer-events: auto; }

/* -- the widgets, drawn as a newspaper ------------------------------------------------------------- */
:root { --kw-gap: 28px; --kw-grid-gap: 22px; --band: 20px; }
.kw-band { padding-block: 22px; }
.kw-banner { padding-block: 12px; }
.sb-col-inner > .sb-widget + .sb-widget { margin-top: 30px; }
.kw-title { margin-bottom: 16px; padding-top: 10px; border-top: 3px solid var(--rule); }
.kw-title-text { font-family: var(--font-head); font-size: 1.3rem; padding: 0 !important; border: 0 !important; }
.kw-title--box .kw-title-text::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-inline-end: 10px; background: var(--accent); }
.kw-title--bar { background: var(--ink); color: var(--bg); border-radius: 0; border-top: 0; padding: 7px 14px; }
.kw-title--bar .kw-title-text::before { background: var(--accent); }
.kw-title--plain { border-top: 0; padding-top: 0; }
.kw-title--plain .kw-title-text { font-size: 2rem; }
.kw-title-more { font-size: .82rem; }
.kw-titles li { padding-block: 10px; }
.kw-rows .kw-row { border-bottom-color: var(--line); }
.kw-row-title, .kw-card-title, .kw-feature-title, .kw-tile-title, .kw-notes-title { font-family: var(--font-head); }
.kw-row-media, .kw-card-media, .kw-feature-media, .kw-tile, .kw-hero-main, .kw-hero-item, .kw-mo, .kw-slider.sb-slider { border-radius: 2px; }
.kw-badge { border-radius: 2px; background: var(--ink); color: var(--bg); }
.kw-kicker { letter-spacing: .01em; }

/* the front: the main story across two thirds, the four under it */
.kw-front .kw-hero { gap: 18px; }
.kw-front .kw-hero-main { aspect-ratio: 16 / 9; }
.kw-front .kw-hero-main .kw-tile-title { font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.55; }
.kw-front .kw-hero-small { --kw-cols: 4; }
.kw-front .kw-hero-item { aspect-ratio: 3 / 2; }
.kw-front .kw-side .kw-rows .kw-row { grid-template-columns: 104px minmax(0, 1fr); }
.kw-front > .sb-container > .sb-row > .sb-col:first-child { border-inline-start: 0; }
.kw-front .kw-side { padding-inline-start: 26px; border-inline-start: 1px solid var(--line); }
.kw-strip-band { border-block: 1px solid var(--line); background: var(--bg-alt); }
.kw-strip-band .kw-card-title { font-size: 1rem; }
.kw-columns .kw-side { padding-inline-start: 26px; border-inline-start: 1px solid var(--line); }
.kw-sections { --kw-gap-x: 34px; }
.kw-sec-head { border-bottom: 1px solid var(--rule); }
.kw-sec-title { font-size: 1.5rem; border-bottom: 3px solid var(--accent); }
.kw-sec-title::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-inline-end: 9px; background: var(--accent); }
.kw-media-band .kw-grid--tiles .kw-tile { aspect-ratio: 4 / 3; }
.kw-op { background: var(--bg-alt); border: 0; border-top: 3px solid var(--accent); border-radius: 0; }
.kw-op-title { font-family: var(--font-head); font-size: 1.12rem; }
.kw-ranked, .kw-rank li::before { font-family: var(--font-head); }
.kw-timeline li::after { border-radius: 0; }
.kw-article .kw-headline { font-size: clamp(1.9rem, 3.8vw, 3rem); }
.kw-article .kw-standfirst { font-size: 1.2rem; }
.kw-article .kw-meta--post { font-size: .84rem; }
.kw-article-page .kw-side { padding-inline-start: 26px; border-inline-start: 1px solid var(--line); }
.kw-fallback .kw-pagetitle { font-family: var(--font-head); }

/* -- narrower screens -------------------------------------------------------------------------------------- */
@media (max-width: 1080px) {
    .kw-front .kw-side, .kw-columns .kw-side, .kw-article-page .kw-side { padding-inline-start: var(--gutter, 14px); border: 0; }
    .nr-foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
    .nr-nav { display: none; }
    .nr-topbar .nr-date span { display: none; }
    .nr-burger { display: inline-grid; }
    .nr-mast { padding-block: 12px; }
    .kw-front .kw-hero-small { --kw-cols: 2; }
}
@media (max-width: 560px) {
    .nr-wrap { padding-inline: 14px; }
    .nr-foot-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .nr-flash-label span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .nr-flash-track { overflow-x: auto; } .nr-flash-track ul { animation: none !important; } }
@media print { .nr-head, .nr-foot, .kw-side, .kit-comments, .kw-related, .kit-progress, .nr-top-btn, .kit-share { display: none !important; } }
