/*
 * The ArzFlow skin. It loads after site.css, which carries the parts both sites share — the text, forms, comments,
 * picture viewer and the rest — so a fix written once reaches both. Everything below is what this site looks like:
 * its colours, its header, its cards and its footer.
 */

:root {
  --blue: #086bff;
  --blue-dark: #0054d1;
  --navy: #101b47;
  --text: #536176;
  --muted: #62718b;
  --line: #e2ebf7;
  --line-strong: #cdddf2;
  --surface: #f2f7ff;
  --page: #fff;
  --card: #fff;
  --tint: #f4f9ff;
  --tint-strong: #eaf2ff;
  --on-blue: #fff;
  --warm: #fff6e2;
  --warm-ink: #6b4e00;
  --radius: 16px;
  --container: 1280px;
  --shadow: 0 4px 18px rgb(23 64 127 / 5%);
}
:root[data-theme=dark] {
  --blue: #4f9dff;
  --blue-dark: #9cc6ff;
  --navy: #e8eeff;
  --text: #c2cfe6;
  --muted: #8fa0c4;
  --line: #20304f;
  --line-strong: #2c4066;
  --surface: #101c33;
  --page: #070e1d;
  --card: #0d1729;
  --tint: #14213a;
  --tint-strong: #1a2a48;
  --on-blue: #06101f;
  --shadow: 0 12px 34px #00000073;
}
:focus-visible { outline: 3px solid #ffbd38; outline-offset: 4px; }

/* Header: the mark, the links, the search box and the way to the shop. It stays in view as the design keeps it. */
html { scroll-padding-top: 106px; }
.site-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: var(--page); box-shadow: none; }
.header-inner { min-height: 90px; gap: 34px; }
.brand { width: 188px; }
.desktop-nav { gap: 28px; margin-inline-start: auto; }
.desktop-nav a { position: relative; min-height: 48px; font-size: .9375rem; font-weight: 650; color: var(--navy); }
.desktop-nav a:hover, .desktop-nav a[aria-current] { color: var(--blue); }
.desktop-nav a[aria-current]::after { content: ''; position: absolute; inset-block-end: 0; inset-inline: 0; height: 2px; background: var(--blue); border-radius: 4px; }
.header-actions { gap: 10px; }
.header-search { display: flex; align-items: center; gap: 6px; height: 46px; width: clamp(200px, 20vw, 290px); background: var(--surface); border: 1px solid transparent; border-radius: 30px; padding-inline: 16px 6px; }
.header-search:focus-within { border-color: #accdff; background: var(--page); box-shadow: 0 0 0 3px #086bff14; }
.header-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--navy); font-size: .875rem; }
.header-search input::placeholder { color: var(--muted); }
.header-search button { display: grid; place-items: center; width: 34px; height: 38px; padding: 0; border: 0; background: transparent; color: var(--muted); }
.header-search button:hover { color: var(--blue); }
.icon-button { border-radius: 10px; border-color: var(--line); background: var(--surface); color: var(--muted); }
.icon-button:hover { color: var(--blue); border-color: #a9caff; }
.button { border-radius: 10px; font-weight: 650; }
.button--primary { background: var(--blue); color: #fff; }
.button--primary:hover { background: var(--blue-dark); }
.button--soft, .button--white { background: var(--tint); color: var(--blue-dark); border-color: var(--line); }

/* The three pictures at the top: each card is its own cover, with the words over it. */
.hero { grid-template-columns: 1.8fr 1fr; grid-template-rows: repeat(2, 212px); gap: 18px; direction: rtl; margin-top: 26px; }
.hero--single { grid-template-columns: 1fr; grid-template-rows: 300px; }
.hero-card { position: relative; overflow: hidden; border-radius: var(--radius); background: #032143; color: #fff; box-shadow: var(--shadow); display: block; isolation: isolate; }
.hero-main { grid-row: 1 / 3; display: block; min-height: 0; background: #032143; }
.hero-card::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(0deg, rgb(2 17 38 / 97%) 0%, rgb(2 17 38 / 65%) 28%, transparent 77%); }
.hero-main::after { background: linear-gradient(0deg, rgb(2 17 38 / 94%) 0%, rgb(2 17 38 / 25%) 58%, transparent 90%), linear-gradient(270deg, rgb(2 17 38 / 38%), transparent 60%); }
.hero-main-art, .hero-visual { position: absolute; inset: 0; margin: 0; z-index: 0; mask-image: none; -webkit-mask-image: none; transition: transform .4s ease; }
.hero-main-art img, .hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-card:hover .hero-main-art, .hero-card:hover .hero-visual { transform: scale(1.035); }
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; padding: 24px; }
.hero-main .hero-copy { padding: 32px; }
.hero-card h2 { color: #fff; font-size: 1.375rem; line-height: 1.75; font-weight: 750; text-shadow: 0 2px 14px #02142b; margin: 0 0 10px; }
.hero-main h2 { max-width: 440px; font-size: clamp(1.875rem, 2.7vw, 2.625rem); line-height: 1.65; font-weight: 800; margin-bottom: 14px; }
.hero-card h2 a { color: inherit; }
.hero-card p { color: #dfe9fb; font-size: .9375rem; line-height: 1.9; margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-main p { -webkit-line-clamp: 3; max-width: 46ch; }
.hero-tag { position: absolute; inset-block-start: 18px; inset-inline-end: 18px; z-index: 2; display: inline-flex; align-items: center; min-height: 28px;
  padding: 2px 12px; background: #f4f9ff; color: var(--blue-dark); border: 1px solid #e6f0ff; border-radius: 9px; font-size: .8125rem; font-weight: 650; }
.hero-main .button, .hero-side .circle-link { margin-top: 4px; }
.hero-main .button { align-self: flex-start; background: #fff; color: var(--blue-dark); border-color: transparent; }
.hero-main .button:hover { background: #eaf2ff; }
.circle-link { width: 42px; height: 42px; background: #ffffff1f; border: 1px solid #ffffff40; color: #fff; }
.circle-link:hover { background: #fff; color: var(--blue-dark); }
:root[data-theme=dark] .hero-card { background: #04162c; }

/* Sections and article cards. */
.section { padding-block: 26px; }
.section-heading h2, .section-title h2 { font-size: clamp(1.375rem, 2.2vw, 1.8rem); line-height: 1.6; font-weight: 800; letter-spacing: -.03em; }
.section-heading p { margin-top: 3px; color: var(--muted); font-size: .9375rem; }
.article-grid, .featured-grid { gap: 24px; }
.article-card { border: 1px solid var(--line); border-radius: 13px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.article-card:hover { transform: translateY(-4px); border-color: #b7d4ff; box-shadow: 0 10px 25px rgb(23 64 127 / 9%); }
.card-media { aspect-ratio: 1.93; position: relative; overflow: hidden; background: var(--tint-strong); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.article-card:hover .card-media img { transform: scale(1.04); }
.card-tag { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; z-index: 2; min-height: 28px; padding: 2px 12px;
  background: #f4f9ff; color: var(--blue-dark); border: 1px solid #e6f0ff; border-radius: 9px; font-size: .8125rem; font-weight: 650; }
.card-body { padding: 17px 18px 16px; }
.card-body h3 { font-size: 1.0625rem; line-height: 1.85; font-weight: 750; margin-bottom: 13px; }
.card-body p { color: var(--text); font-size: .9375rem; line-height: 1.9; }
.card-meta { color: var(--muted); font-size: .8125rem; border-top: 0; padding-top: 0; margin-top: auto; }
.card-meta .icon { width: 17px; height: 17px; }

/* The nine drawings that come with the design, for articles that have no cover picture of their own. */
.card-placeholder, .hero-card .art { position: absolute; inset: 0; display: block; background: #062e56; overflow: hidden; }
.card-placeholder img { display: none; }
.card-placeholder::before, .card-placeholder::after { content: ''; position: absolute; background-image: url('arzflow/editorial-grid.webp');
  background-size: 300% 300%; background-position: var(--sprite-x, 0%) var(--sprite-y, 0%); background-repeat: no-repeat; }
.card-placeholder::after { inset: -16px; filter: blur(18px); opacity: .8; }
.card-placeholder::before { top: 50%; left: 50%; height: 125%; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 1;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.art--stars { --sprite-x: 0%; --sprite-y: 0%; }
.art--gift { --sprite-x: 50%; --sprite-y: 0%; }
.art--security { --sprite-x: 100%; --sprite-y: 0%; }
.art--robot { --sprite-x: 0%; --sprite-y: 50%; }
.art--gaming { --sprite-x: 50%; --sprite-y: 50%; }
.art--premium-gift { --sprite-x: 100%; --sprite-y: 50%; }
.art--collectibles { --sprite-x: 0%; --sprite-y: 100%; }
.art--channel { --sprite-x: 50%; --sprite-y: 100%; }
.art--chip { --sprite-x: 100%; --sprite-y: 100%; }

/* Categories, sorting and pages. */
.category-nav { gap: 9px; }
.category-button { min-height: 42px; background: var(--page); color: var(--navy); border: 1px solid var(--line-strong); border-radius: 24px; padding: 6px 20px; font-size: .875rem; box-shadow: none; }
.category-button:hover { background: var(--surface); border-color: #95bcf5; }
.category-button[aria-current], .category-button.is-active { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 650; }
.category-symbol { display: none; }
.pagination { gap: 8px; margin-top: 28px; }
.pagination-step, .pagination a, .pagination span { min-width: 44px; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--page); font-weight: 600; }
.pagination a:hover { background: var(--surface); border-color: #95bcf5; }
.pagination [aria-current=page] { background: var(--blue); border-color: var(--blue); color: #fff; }

/* The product tiles at the foot of the home page. */
.products { margin-block: 20px 42px; padding: 30px; background: linear-gradient(115deg, var(--tint), var(--tint-strong)); border: 1px solid #edf4ff; border-radius: 20px; }
:root[data-theme=dark] .products { background: linear-gradient(115deg, var(--surface), var(--tint)); border-color: var(--line); }
.product-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.product-card { flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 22px 10px 18px; background: var(--card); border: 1px solid #e6eef9; border-radius: 15px; text-align: center; transition: transform .2s, border-color .2s; }
.product-card:hover { transform: translateY(-4px); border-color: #a9caff; }
/* The symbol is smaller than the square it sits in, so the square has to place it; the other site's symbols fill
   their box and never needed this. */
.product-icon { display: grid; place-items: center; width: 62px; height: 62px; background: var(--tint-strong); color: var(--blue); border-radius: 18px; }
.product-icon .icon { width: 32px; height: 32px; }
/* The other site gives its "everything else" tile a circle and a border of its own; here all six match. */
.product-more { border: 0; padding: 0; }
.product-card h3 { font-size: .9375rem; font-weight: 750; }
.product-text, .product-action { display: none; }
:root[data-theme=dark] .product-card { border-color: var(--line); }

/* Footer. */
.site-footer { background: linear-gradient(var(--page), var(--tint)); border-top: 1px solid var(--line); padding-block: 30px 18px; }
.footer-inner { gap: 36px; }
.footer-brand .brand { width: 174px; }
.footer-brand p { color: var(--muted); font-size: .9375rem; }
.site-footer h2 { font-weight: 750; font-size: 1rem; }
.footer-links a:hover { color: var(--blue); }
.footer-contact a { color: var(--blue-dark); }
.footer-bottom { border-top: 1px solid var(--line); color: var(--muted); font-size: .8125rem; }

/* The article page, in the design's shape: the title beside its picture, then the text with the contents list beside it. */
.breadcrumb { font-size: .875rem; color: var(--muted); margin: 22px 0; }
.breadcrumb a:hover { color: var(--blue); }
.article-layout { max-width: 1000px; }
.article-header { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-areas: 'copy visual' 'meta visual';
  gap: 22px 34px; padding: 30px; background: var(--tint); border: 1px solid var(--line); border-radius: 22px; }
/* Without a picture of its own there is nothing to sit beside, so the panel goes back to one column. */
.article-header:not(:has(.article-cover)) { display: block; }
.article-headline { display: block; grid-area: copy; align-self: center; }
.article-header h1 { font-size: clamp(1.65rem, 2.6vw, 2.5rem); line-height: 1.75; font-weight: 800; margin-block: 14px 0; }
.article-headline > p { margin-block: 14px 0; color: var(--text); font-size: 1.0625rem; line-height: 1.9; }
.article-categories .hero-tag { position: static; background: #f4f9ff; color: var(--blue-dark); border: 1px solid #e6f0ff; border-radius: 9px; }
.article-meta { grid-area: meta; align-self: end; margin: 0; color: var(--muted); font-size: .8125rem; }
.article-header .article-cover { grid-area: visual; align-self: center; margin: 0; aspect-ratio: 437 / 275; border-radius: 12px; }
.article-cover { border-radius: 18px; margin-block: 22px 28px; aspect-ratio: 2.1; }

/* The body: the design's checked lists, numbered steps and note boxes, applied to whatever the writer wrote. */
.article-content { font-size: 1.0625rem; line-height: 2.1; color: var(--text); }
.prose h2 { font-size: 1.4rem; color: var(--navy); margin: 32px 0 10px; }
.prose h3 { font-size: 1.15rem; color: var(--navy); }
.prose ul { list-style: none; padding-inline-start: 0; }
.prose ul > li { position: relative; padding-inline-start: 36px; }
.prose ul > li::before { content: '✓'; position: absolute; inset-inline-start: 0; top: .5em; display: grid; place-items: center;
  width: 25px; height: 25px; border-radius: 50%; background: var(--blue); color: var(--on-blue); font-size: .8125rem; line-height: 1; }
.prose ol { list-style: none; padding-inline-start: 0; counter-reset: step; }
.prose ol > li { position: relative; counter-increment: step; min-height: 36px; padding-inline-start: 50px; margin-block: 18px; }
.prose ol > li::before { content: counter(step, persian); position: absolute; inset-inline-start: 0; top: .1em; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: var(--on-blue); font-size: 1.0625rem; font-weight: 700; line-height: 1; }
.prose ol > li:not(:last-child)::after { content: ''; position: absolute; inset-inline-start: 17.5px; top: calc(.1em + 40px); bottom: -22px; width: 1px; background: var(--line-strong); }
.prose ul ul, .prose ol ol, .prose ul ol, .prose ol ul { margin-block: 10px; }
.prose blockquote, .prose .callout { border: 0; border-radius: 10px; padding: 16px 20px; background: linear-gradient(90deg, var(--tint), var(--tint-strong));
  display: flex; gap: 17px; align-items: center; }
.prose blockquote::before, .prose .callout::before { content: 'i'; flex: 0 0 auto; display: grid; place-items: center; width: 39px; height: 39px;
  border-radius: 50%; background: var(--blue); color: var(--on-blue); font-size: 1.25rem; font-weight: 700; font-style: italic; line-height: 1; }
.article-tag-list a { border-radius: 12px; padding: 4px 14px; background: var(--tint); border-color: transparent; color: var(--muted); font-size: .875rem; }

/* The contents list: the design's dotted rail, which follows the reader on a wide screen. */
.toc { margin: 24px 0 8px; padding: 19px 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.toc h2 { padding-inline: 5px; gap: 10px; font-size: 1rem; font-weight: 800; margin-bottom: 6px; }
.toc ol { list-style: none; margin: 0; padding: 0; font-size: .875rem; }
.toc li { margin: 0; }
.toc a { position: relative; display: flex; align-items: center; min-height: 50px; padding-block: 10px; padding-inline: 32px 12px; line-height: 1.9; color: var(--text); border-radius: 7px; }
.toc a::before { content: ''; position: absolute; inset-inline-start: 12px; top: 22px; width: 1px; height: 100%; background: var(--line-strong); }
.toc li:last-child a::before { display: none; }
.toc a::after { content: ''; position: absolute; inset-inline-start: 7px; top: 20px; width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.toc a:hover { background: var(--tint); color: var(--blue-dark); }
.toc a[aria-current=true] { background: var(--tint-strong); color: var(--blue-dark); font-weight: 700; }
.toc a[aria-current=true]::before { background: #8abbff; }
.toc a[aria-current=true]::after { background: var(--blue); }
.toc .toc-level-3 { margin-inline-start: 12px; }
.toc .toc-level-4 { margin-inline-start: 24px; }

@media (min-width: 1024px) {
  .article-layout { max-width: 1184px; display: grid; grid-template-columns: minmax(0, 1fr) 316px; justify-content: stretch; align-items: start; gap: 0 36px; }
  .article-layout > * { grid-column: 1; min-width: 0; }
  .article-layout > .article-header { grid-column: 1 / -1; }
  .article-layout > .toc { grid-column: 2; grid-row: 2 / span 99; position: sticky; top: 104px; margin: 0; max-height: calc(100vh - 140px); overflow: auto; }
}

@media (max-width: 1180px) {
  .brand { width: 158px; }
  /* This header carries a search box as well as the links, so the links move into the menu earlier than on the other site. */
  .desktop-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-actions { margin-inline-start: auto; }
  .header-search { max-width: 245px; }
  .hero { grid-template-columns: 1.65fr 1fr; grid-template-rows: repeat(2, 204px); }
  .hero-copy { padding: 20px; }
  .hero-card h2 { font-size: 1.25rem; }
  .hero-main h2 { font-size: 2rem; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  /* Below the sidebar's width the meta row moves under both the title and the picture, as the design does. */
  .article-header { grid-template-areas: 'copy visual' 'meta meta'; gap: 18px 22px; padding: 24px; }
  .article-header h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
  .article-content { max-width: 820px; margin-inline: auto; }
}
@media (max-width: 950px) {
  .hero { grid-template-columns: 1fr; grid-template-rows: auto; }
  .hero-main { grid-row: auto; min-height: 320px; }
  .hero-side { min-height: 210px; }
  .header-search { flex: 0 1 220px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 86px; }
  .header-inner { min-height: 72px; }
  /* The design keeps a card's picture above its words on a phone, rather than beside them. */
  .featured-grid .article-card { display: flex; flex-direction: column; min-height: 0; }
  .featured-grid .card-media { aspect-ratio: 1.93; height: auto; min-height: 0; }
  .featured-grid .card-tag, .article-grid .card-tag { inset-block-start: 10px; inset-block-end: auto; inset-inline-end: 10px; }
  .featured-grid .card-body, .article-grid .card-body { padding: 14px 15px 13px; }
  /* Everything in the header has to fit one phone line: the mark, the menu, the theme and the way to the shop. */
  .header-inner { gap: 10px; }
  .header-actions { gap: 6px; min-width: 0; }
  .header-actions .button--primary { white-space: nowrap; padding-inline: 10px; font-size: .8125rem; }
  .brand { width: 132px; }
  .header-search { display: none; }
  .products { padding: 20px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* On a phone the picture stays beside the title, cropped square, exactly as the design shows it. */
  .article-header { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px 14px; padding: 16px; border-radius: 16px; }
  .article-header h1 { font-size: clamp(1.15rem, 4.2vw, 1.75rem); line-height: 1.7; margin-top: 9px; }
  .article-headline > p { margin-top: 8px; font-size: .875rem; line-height: 1.85; }
  .article-header .article-cover { aspect-ratio: 1; border-radius: 10px; }
  .article-categories .hero-tag { font-size: .75rem; padding: 2px 9px; }
  .toc { padding: 13px 14px; background: var(--tint); box-shadow: none; }
  .toc a { min-height: 44px; }
  /* The design lays a related article out sideways here: a small picture, then its title. */
  .related-section .article-grid { grid-template-columns: 1fr; gap: 14px; }
  .related-section .article-card { display: grid; grid-template-columns: 124px minmax(0, 1fr); align-items: stretch; }
  .related-section .card-media { aspect-ratio: auto; height: 100%; }
  .related-section .card-tag { display: none; }
  .related-section .card-body { align-self: center; padding: 12px 13px; }
}
@media (max-width: 374px) {
  /* On the narrowest phones the way to the shop keeps its cart and loses its words, rather than pushing the page wide. */
  .brand { width: 118px; }
  .header-actions .button--primary { padding-inline: 11px; }
  .header-actions .button--primary span { display: none; }
  .article-header { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); column-gap: 11px; padding: 14px; }
  .related-section .article-card { grid-template-columns: 95px minmax(0, 1fr); }
}
