:root {
  --green: #93b874;
  --green-d: #5b8a39;
  --green-l: #eef4e7;
  --ink: #2f2f2f;
  --text: #4c4c4c;
  --muted: #7b7b76;
  --line: #e3e2da;
  --bg: #f2f1ea;
  --card: #fff;
  --radius: 6px;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); overflow-x: hidden; }
a { color: var(--green-d); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button { font: inherit; }
:focus-visible { outline: 3px solid #3d6a1f; outline-offset: 2px; }

.wrap { max-width: 1220px; margin: 0 auto; padding: 0 20px; }
#main { min-height: calc(100vh - 140px); }

/* ---------- top bar */
.top { background: var(--green); color: #fff; z-index: 20; box-shadow: 0 1px 0 rgba(0, 0, 0, .08); }
@media (min-width: 900px) { .top { position: sticky; top: 0; } }
.top-in { max-width: 1220px; margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; gap: 18px; }
.home { display: grid; place-items: center; width: 44px; height: 44px; margin-left: -6px; border-radius: 22px; color: #fff; }
.home svg { width: 28px; height: 28px; fill: #fff; }
.home:hover { background: rgba(255, 255, 255, .16); }
.search { flex: 1; max-width: 560px; display: flex; height: 40px; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12); }
.search input { flex: 1; min-width: 0; border: 0; padding: 0 6px 0 18px; font: 16px var(--font); color: var(--ink); background: transparent; outline: none; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search button { width: 46px; border: 0; background: transparent; color: var(--green-d); cursor: pointer; display: grid; place-items: center; }
.search button svg { width: 21px; height: 21px; }
.search:focus-within { box-shadow: 0 0 0 3px rgba(255, 255, 255, .55); }
.search { position: relative; overflow: visible; }
.search input { border-radius: 20px 0 0 20px; }
.sug { position: absolute; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: #fff; border-radius: 10px; box-shadow: 0 8px 28px rgba(0, 0, 0, .18); z-index: 30; }
.sug[hidden] { display: none; }
.sug a { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 6px; color: var(--ink); font-weight: 700; font-size: 15px; line-height: 1.3; }
.sug a:hover, .sug a.on { background: var(--green-l); text-decoration: none; }
.sug img { flex: none; width: 64px; height: 48px; object-fit: cover; border-radius: 4px; }
.rand { margin-left: auto; display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; padding: 8px 12px; border-radius: 20px; }
.rand svg { width: 22px; height: 22px; fill: #fff; }
.rand:hover { background: rgba(255, 255, 255, .16); text-decoration: none; }

/* ---------- columns */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; padding-top: 24px; padding-bottom: 40px; align-items: start; }
.col-main, .page { min-width: 0; }
.rail { position: sticky; top: 84px; display: grid; gap: 16px; }

.sec-h { margin: 0 0 18px; font-size: 26px; line-height: 1.25; color: var(--ink); font-weight: 700; padding-bottom: 10px; border-bottom: 3px solid var(--green); }
.home-h { font-size: 24px; }

/* ---------- cards */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .1), 0 2px 8px rgba(0, 0, 0, .04); color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0, 0, 0, .1), 0 8px 20px rgba(0, 0, 0, .08); }
.card-img { display: block; aspect-ratio: 4 / 3; background: #dfe3d6; }
.card-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-t { display: block; padding: 12px 14px 16px; }
.howto { display: block; font-size: 13px; color: var(--muted); line-height: 1.2; margin-bottom: 3px; }
.rest { display: block; font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.skel i { display: block; aspect-ratio: 4 / 3.9; border-radius: var(--radius); background: #e4e4dc; }

/* ---------- rail */
.author-card, .rail-box { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.ac-top { display: flex; align-items: center; gap: 12px; }
.av { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; font-size: 19px; letter-spacing: .02em; }
.av-sm { width: 34px; height: 34px; font-size: 13px; }
.av-lg { width: 96px; height: 96px; font-size: 34px; }
.ac-who { display: grid; line-height: 1.3; }
.ac-label { font-size: 13px; color: var(--muted); }
.ac-name { font-weight: 700; font-size: 18px; color: var(--ink); }
.ac-title { margin: 12px 0 4px; font-weight: 700; color: var(--ink); font-size: 15px; }
.ac-bio { margin: 0 0 14px; font-size: 14px; line-height: 1.5; }
.author-card .btn { margin-top: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px; border-radius: 20px; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none !important; }
.btn-green { background: var(--green); color: #fff; border: 0; }
.btn-green:hover { background: #82aa62; }
.btn-line { background: #fff; color: var(--green-d); border: 2px solid var(--green); }
.btn-line:hover { background: var(--green-l); }
.btn-wide { width: 100%; }

/* ---------- article */
.page { background: var(--card); border-radius: var(--radius); padding: 26px 34px 34px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.crumbs { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.crumbs .sep { color: #b3b2aa; }
.a-title { margin: 0 0 14px; font-size: 38px; line-height: 1.18; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
.byline { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.byline a { font-weight: 700; }
.lead { margin: 0 0 20px; }
.lead img { display: block; width: 100%; height: auto; border-radius: var(--radius); background: #dfe3d6; }
.intro { margin: 0 0 18px; font-size: 17px; line-height: 1.65; color: var(--text); }
.explore { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 12px 16px; margin: 0 0 30px; background: var(--green-l); border-radius: var(--radius); font-size: 14px; }
.ex-h { font-weight: 700; color: var(--ink); }
.ex-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ex-links a { font-weight: 700; }

.steps { list-style: none; margin: 0 0 34px; padding: 0; display: grid; gap: 34px; }
.step { min-width: 0; }
.step-media { margin-bottom: 14px; }
.step-body { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: start; }
.num { font-size: 44px; line-height: 1; font-weight: 700; color: var(--ink); }
.step-text { font-size: 17px; line-height: 1.6; padding-top: 4px; }
.step-text b { color: var(--ink); }

/* the kit, dressed for the article */
.page .ab-media { --ab-gap: 14px; --ab-muted: var(--muted); --ab-accent: var(--green-d); --ab-chrome: 110px; gap: 14px; }
.page .ab-frame { border-radius: var(--radius); overflow: hidden; }
.page .ab-image img { border-radius: var(--radius); }
.page .ab-media figcaption { font-size: 13px; text-align: center; }
.page .ab-audio { background: var(--green-l); border-radius: var(--radius); padding: 10px 12px; }
.page .ab-audio figcaption { text-align: left; margin: 0 0 6px; font-weight: 700; color: var(--ink); font-size: 14px; }

.box { margin: 0 0 26px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.box-h { margin: 0; padding: 12px 18px; background: var(--green-l); color: var(--ink); font-size: 20px; line-height: 1.3; }
.box ul { margin: 0; padding: 14px 18px 16px 40px; display: grid; gap: 8px; font-size: 16px; }
.needs li::marker { color: var(--green-d); }
.exp li { line-height: 1.45; }
.exp-d { display: block; font-size: 14px; color: var(--muted); }

.helpful { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px; padding: 22px 16px; margin: 0 0 30px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.hp-q { font-weight: 700; color: var(--ink); font-size: 18px; }
.hp-b { display: flex; gap: 10px; }
.hp-b .btn { min-width: 76px; }
.hp-thanks { font-weight: 700; color: var(--green-d); font-size: 17px; }
.related .sec-h { font-size: 22px; }
.one-film .ab-media figcaption { display: none; }
.home-by { display: none; }
.grid-rel .rest { font-size: 15px; }

/* ---------- search */
.results { display: grid; gap: 14px; }
.result { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; background: var(--card); border-radius: var(--radius); padding: 12px; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); align-items: center; }
.result:hover { text-decoration: none; box-shadow: 0 2px 10px rgba(0, 0, 0, .1); }
.result img { width: 100%; height: auto; border-radius: 4px; display: block; }
.r-t { display: block; min-width: 0; }
.r-d { display: block; margin-top: 6px; font-size: 14px; color: var(--text); line-height: 1.5; }
.none { font-size: 17px; margin: 0 0 28px; }

/* ---------- author page */
.profile { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; }
.pf-name { margin: 0; font-size: 34px; line-height: 1.15; color: var(--ink); }
.pf-title { margin: 4px 0 0; font-weight: 700; color: var(--ink); }
.pf-loc { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.pf-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
body[data-view="about"] .col-main > .box { background: var(--card); margin-bottom: 30px; }

/* ---------- footer */
.foot { background: #3e4a35; color: #dfe6d6; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; padding-top: 26px; padding-bottom: calc(26px + env(safe-area-inset-bottom)); font-size: 14px; }
.foot a { color: #e9f0df; font-weight: 700; }

/* ---------- tablet */
@media (max-width: 1080px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 760px) {
  .wrap, .top-in { padding-left: 16px; padding-right: 16px; }
  .top-in { height: 56px; gap: 10px; }
  .home { margin-left: -8px; }
  .rand { padding: 8px; margin-right: -8px; }
  .rand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .rand svg { width: 26px; height: 26px; }
  .cols { padding-top: 14px; gap: 20px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-t { padding: 9px 10px 12px; }
  .howto { font-size: 12px; }
  .rest { font-size: 15px; }
  .sec-h { font-size: 22px; }
  .page { margin: 0 -16px; border-radius: 0; padding: 18px 16px 26px; }
  .a-title { font-size: 28px; }
  .intro, .step-text { font-size: 16px; }
  .step-body { grid-template-columns: 44px minmax(0, 1fr); }
  .num { font-size: 36px; }
  .steps { gap: 28px; }
  .explore { margin-bottom: 24px; }
  .result { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 10px; }
  .r-d { display: none; }
  .profile { gap: 14px; }
  .av-lg { width: 72px; height: 72px; font-size: 26px; }
  .pf-name { font-size: 28px; }
  body[data-view="article"] .rail { display: none; }
  .home-by { display: flex; align-items: center; gap: 8px; margin: -6px 0 14px; font-size: 14px; color: var(--muted); }
  .home-by a { font-weight: 700; }
  .home-h { margin-bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }
