/* ActiveDone — editorial "magazine" theme (cream paper, ink, coral accent) */
:root {
  --bg: #f6f1e7;
  --paper: #fffdf8;
  --ink: #17202a;
  --ink-2: #4a5560;
  --muted: #8a8f94;
  --line: #e4dccb;
  --accent: #ff5a36;
  --accent-ink: #ffffff;
  --accent-soft: #ffe3d9;
  --lime: #c6f05a;
  --teal: #0f6e6a;
  --teal-soft: #d8efe9;
  --shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(23, 32, 42, .35);
  --radius: 14px;
  --font-head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --wrap: 1180px;
}
:root[data-theme="dark"] {
  --bg: #11161b;
  --paper: #182027;
  --ink: #f3efe6;
  --ink-2: #b9c0c6;
  --muted: #7d868e;
  --line: #2a343d;
  --accent-soft: #3a211b;
  --teal-soft: #15332f;
  --shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(0, 0, 0, .7);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Ticker ---------- */
.ticker { background: #17202a; color: #f6f1e7; font-size: 13px; overflow: hidden; white-space: nowrap; }
.ticker__inner { display: flex; gap: 14px; align-items: center; padding: 8px 0; }
.ticker__inner { overflow: hidden; }
.ticker__tag { position: relative; z-index: 2; box-shadow: 0 0 0 10px #17202a; background: var(--lime); color: #17202a; font-weight: 700; padding: 2px 10px; border-radius: 99px; flex: none; }
.ticker__track { display: inline-flex; gap: 40px; animation: tick 40s linear infinite; }
.ticker__track a:hover { color: var(--lime); }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 2px solid var(--ink); }
.header__row { display: flex; align-items: center; gap: 24px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font: 800 24px var(--font-head); letter-spacing: -.04em; }
.logo__mark { width: 38px; height: 38px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; color: #fff; transform: rotate(-6deg); box-shadow: 3px 3px 0 var(--ink); }
.logo b { color: var(--accent); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; font-weight: 600; font-size: 15px; border-radius: 8px; }
.nav a:hover, .nav a.is-active { background: var(--ink); color: var(--bg); }
.header__tools { display: flex; gap: 8px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 10px; cursor: pointer; }
.icon-btn:hover { background: var(--lime); color: #17202a; }
.menu-btn { display: none; }

/* ---------- Search overlay ---------- */
.search { position: fixed; inset: 0; z-index: 100; background: rgba(17, 22, 27, .6); display: none; padding: 10vh 20px; }
.search.is-open { display: block; }
.search__box { max-width: 640px; margin: 0 auto; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--accent); overflow: hidden; }
.search__box input { width: 100%; border: 0; border-bottom: 2px solid var(--line); padding: 20px 22px; font: 600 20px var(--font-body); background: transparent; color: var(--ink); outline: none; }
.search__results { max-height: 50vh; overflow: auto; }
.search__results a { display: block; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.search__results a:hover { background: var(--accent-soft); }
.search__results small { color: var(--muted); display: block; }
.search__empty { padding: 20px 22px; color: var(--muted); }

/* ---------- Buttons / chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-weight: 700; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.btn--accent { background: var(--accent); color: #fff; border-color: var(--ink); }
.chip { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--teal-soft); color: var(--teal); }
:root[data-theme="dark"] .chip { color: #7fd6cc; }
.chip--accent { background: var(--accent-soft); color: var(--accent); }

/* ---------- Hero (magazine) ---------- */
.hero { padding: 40px 0 24px; }
.hero__head { display: flex; justify-content: space-between; align-items: end; gap: 20px; border-bottom: 2px solid var(--ink); padding-bottom: 16px; margin-bottom: 28px; }
.hero__title { font-size: clamp(36px, 6vw, 72px); font-weight: 800; margin: 0; }
.hero__title em { font-style: normal; background: var(--lime); color: #17202a; padding: 0 .15em; border-radius: 8px; }
.hero__date { color: var(--ink-2); font-size: 14px; text-align: right; flex: none; }
.hero__grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; }
.feature { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.feature .thumb { aspect-ratio: 16 / 8.5; }
.feature__body { padding: 22px 26px 26px; }
.feature__body h2 { font-size: clamp(24px, 3vw, 34px); }
.feature__body p { color: var(--ink-2); }
.trending { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 22px; }
.trending h3 { display: flex; align-items: center; gap: 8px; font-size: 20px; }
.trending ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.trending li { counter-increment: t; display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 14px 0; border-top: 1px dashed var(--line); }
.trending li::before { content: "0" counter(t); font: 800 28px var(--font-head); color: var(--accent); line-height: 1; }
.trending a { font-weight: 700; line-height: 1.35; }
.trending a:hover { color: var(--accent); }
.trending small { display: block; color: var(--muted); margin-top: 4px; }

/* ---------- Section heads ---------- */
.section { padding: 48px 0; }
.sec-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.sec-head h2 { font-size: 30px; margin: 0; white-space: nowrap; }
.sec-head::after { content: ""; flex: 1; height: 2px; background: var(--ink); order: 2; }
.sec-head a { order: 3; font-weight: 700; color: var(--accent); white-space: nowrap; }

/* ---------- Devices strip ---------- */
.devices { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.device { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: transform .15s, box-shadow .15s; }
.device:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--accent); }
.device__ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; }
.device strong { font-family: var(--font-head); font-size: 18px; }
.device span { color: var(--muted); font-size: 13px; }

/* ---------- Layout with sidebar ---------- */
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 36px; align-items: start; }

/* ---------- Post rows (list style, not grid cards) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filters button { border: 2px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 99px; padding: 6px 14px; font-weight: 600; cursor: pointer; font-family: inherit; }
.filters button.is-active { background: var(--ink); color: var(--bg); }
.posts { display: flex; flex-direction: column; gap: 18px; }
.row { display: grid; grid-template-columns: 240px 1fr; gap: 22px; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.row:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.row .thumb { height: 100%; min-height: 170px; }
.row__body { padding: 18px 20px 18px 0; display: flex; flex-direction: column; }
.row__body h3 { font-size: 21px; margin: 8px 0; }
.row__body p { color: var(--ink-2); font-size: 15px; margin-bottom: 10px; }
.meta { margin-top: auto; display: flex; gap: 14px; color: var(--muted); font-size: 13px; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 28px; }
.pager button { min-width: 42px; height: 42px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 10px; font-weight: 700; cursor: pointer; }
.pager button.is-active { background: var(--accent); color: #fff; }

/* ---------- Thumbnails (pure CSS art, no images needed) ---------- */
.thumb { position: relative; overflow: hidden; display: grid; place-items: center; color: #fff; }
.thumb__label { position: relative; z-index: 2; font: 800 22px/1.1 var(--font-head); text-align: center; padding: 0 18px; text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.thumb__icon { position: absolute; right: -10px; bottom: -22px; font-size: 120px; opacity: .22; z-index: 1; }
.t-coral  { background: linear-gradient(135deg, #ff5a36, #ff9a3c); }
.t-teal   { background: linear-gradient(135deg, #0f6e6a, #1fb5a4); }
.t-ink    { background: linear-gradient(135deg, #17202a, #3c4f63); }
.t-lime   { background: linear-gradient(135deg, #7fb800, #c6f05a); color: #17202a; }
.t-violet { background: linear-gradient(135deg, #3b2f8f, #7b6cf6); }
.t-sky    { background: linear-gradient(135deg, #1565c0, #4fc3f7); }
.thumb::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px); background-size: 14px 14px; }

/* ---------- Sidebar ---------- */
.side { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 92px; }
.box { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 20px; }
.box h4 { font-size: 18px; }
.box--fix { background: var(--ink); color: var(--bg); }
:root[data-theme="dark"] .box--fix { background: #000; color: var(--ink); }
.fix-list { list-style: none; padding: 0; margin: 0; }
.fix-list a { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); font-weight: 600; }
.fix-list a:hover { color: var(--lime); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { border: 1.5px solid var(--line); padding: 4px 10px; border-radius: 8px; font-size: 14px; }
.tags a:hover { border-color: var(--accent); color: var(--accent); }
.newsletter input { width: 100%; padding: 12px; border: 2px solid var(--ink); border-radius: 10px; margin: 6px 0 10px; font: inherit; background: var(--bg); color: var(--ink); }
.newsletter .btn { width: 100%; justify-content: center; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.step { padding: 24px; border-right: 2px solid var(--ink); }
.step:last-child { border-right: 0; }
.step b { font: 800 44px var(--font-head); color: var(--accent); display: block; line-height: 1; margin-bottom: 10px; }
.step h4 { font-size: 18px; }
.step p { color: var(--ink-2); font-size: 14px; margin: 0; }

/* ---------- CTA ---------- */
.cta { background: var(--lime); color: #17202a; border: 2px solid var(--ink); border-radius: 22px; padding: 44px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center; box-shadow: 10px 10px 0 var(--ink); }
.cta h2 { font-size: clamp(28px, 4vw, 44px); }
.cta form { display: flex; gap: 10px; }
.cta input { flex: 1; min-width: 0; padding: 14px; border: 2px solid #17202a; border-radius: 10px; font: inherit; }
.cta .btn { border-color: #17202a; }

/* ---------- Footer ---------- */
.footer { margin-top: 60px; background: var(--ink); color: #d9d4c8; padding: 56px 0 24px; }
:root[data-theme="dark"] .footer { background: #0a0d10; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; }
.footer .logo { color: #fff; }
.footer h5 { color: #fff; font: 700 15px var(--font-head); margin: 0 0 12px; text-transform: uppercase; letter-spacing: .06em; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer a:hover { color: var(--lime); }
.footer__bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; justify-content: space-between; font-size: 14px; gap: 12px; flex-wrap: wrap; }

/* ---------- Article page ---------- */
.crumbs { font-size: 14px; color: var(--muted); padding: 24px 0 0; }
.crumbs a:hover { color: var(--accent); }
.article-head { padding: 20px 0 28px; max-width: 820px; }
.article-head h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 800; }
.article-head .lead { font-size: 20px; color: var(--ink-2); }
.byline { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-2); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; border: 2px solid var(--ink); }
.article-cover { border: 2px solid var(--ink); border-radius: var(--radius); aspect-ratio: 21 / 8; margin-bottom: 36px; }
.prose { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 36px 40px; font-size: 17.5px; }
.prose h2 { font-size: 28px; margin-top: 1.6em; scroll-margin-top: 100px; }
.prose h2:first-child { margin-top: 0; }
.prose ol, .prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose code { background: var(--accent-soft); color: var(--accent); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.note { border-left: 5px solid var(--teal); background: var(--teal-soft); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 1.4em 0; }
.note--warn { border-color: var(--accent); background: var(--accent-soft); }
.toc ol { padding-left: 1.2em; margin: 0; }
.toc li { margin-bottom: 6px; }
.toc a:hover { color: var(--accent); }
.progress { position: fixed; top: 0; left: 0; height: 4px; background: var(--accent); width: 0; z-index: 200; }
.faq details { border: 2px solid var(--ink); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; background: var(--bg); }
.faq summary { font-weight: 700; cursor: pointer; }

/* ---------- Simple pages ---------- */
.page-hero { padding: 56px 0 30px; border-bottom: 2px solid var(--ink); margin-bottom: 36px; }
.page-hero h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 800; }
.page-hero p { font-size: 19px; color: var(--ink-2); max-width: 640px; }
.form { display: grid; gap: 14px; }
.form label { font-weight: 700; font-size: 14px; }
.form input, .form textarea, .form select { width: 100%; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 10px; font: inherit; background: var(--bg); color: var(--ink); }
.form textarea { min-height: 140px; resize: vertical; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0; }
.stat { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 20px; }
.stat b { display: block; font: 800 40px var(--font-head); color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero__grid, .layout, .cta { grid-template-columns: 1fr; }
  .side { position: static; }
  .devices { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(-n+2) { border-bottom: 2px solid var(--ink); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; background: var(--paper); border-bottom: 2px solid var(--ink); padding: 10px 16px; }
  .nav.is-open { display: flex; }
  .header__tools { margin-left: auto; }
  .menu-btn { display: grid; }
  .hero__head { flex-direction: column; align-items: start; }
  .hero__date { text-align: left; }
  .devices { grid-template-columns: 1fr 1fr; }
  .row { grid-template-columns: 1fr; }
  .row .thumb { min-height: 150px; }
  .row__body { padding: 0 18px 18px; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0 !important; border-bottom: 2px solid var(--ink); }
  .step:last-child { border-bottom: 0; }
  .cta { padding: 28px 22px; box-shadow: 6px 6px 0 var(--ink); }
  .cta form { flex-direction: column; }
  .prose { padding: 24px 20px; font-size: 16.5px; }
  .stats { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .sec-head h2 { font-size: 24px; }
}
