/*
Theme Name: Ann's Insights
Theme URI: https://ann-shibaolan.com
Author: Ann Shi Baolan
Description: Custom lightweight hand-drawn notebook theme for Ann's Electric Power Insights. Personal blog first: no sales tone, no page builders, minimal footprint.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: ann-insights
*/

/* ============================================================
   Design system — hand-drawn coil-notebook
   Fonts: Inter (body) · IBM Plex Mono (technical) · Patrick Hand (notes)
   Chinese: Noto Sans SC (body) · ZCOOL KuaiLe (hand notes) — loaded
   conditionally with unicode-range slicing, only where needed.
   ============================================================ */

:root {
  --paper: #fbf6ec;
  --paper-deep: #f4ecdb;
  --ink: #2b2b26;
  --ink-soft: #55524a;
  --pencil: #8a8574;
  --blue: #1d5a8a;
  --blue-deep: #14456c;
  --red: #c0392b;
  --red-deep: #9c2e22;
  --line: #b8b09a;
  --font-body: 'Inter', 'Noto Sans SC', -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --font-hand: 'Patrick Hand', 'ZCOOL KuaiLe', 'Segoe Print', cursive;
  --radius-sketch: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --radius-sketch-2: 15px 225px 15px 255px / 255px 15px 225px 15px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--paper);
  background-image:
    /* teal lattice transmission towers + multi-tier wires, sketch style */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='220'%3E%3Cg fill='none' stroke='%232a8a99' stroke-opacity='0.15' stroke-linecap='round'%3E%3Cpath d='M74 195 L80 110 M88 195 L80 110 M60 122 H100 M64 140 H96 M68 158 H92 M77 130 L83 148 M83 130 L77 148 M78 148 L82 166 M82 148 L78 166 M80 110 V100' stroke-width='1.6'/%3E%3Cpath d='M292 210 L302 60 M312 210 L302 60 M276 80 H330 M282 105 H324 M288 130 H316 M296 90 L308 115 M308 90 L296 115 M294 130 L310 165 M310 130 L294 165 M302 60 V48' stroke-width='1.9'/%3E%3Cpath d='M498 215 L512 10 M526 215 L512 10 M470 40 H556 M480 75 H546 M490 110 H536 M500 55 L524 95 M524 55 L500 95 M498 110 L526 160 M526 110 L498 160 M505 160 L519 190 M519 160 L505 190 M512 10 V0' stroke-width='2.1'/%3E%3Cpath d='M0 110 C20 112 40 118 60 122 M100 122 C150 145 220 125 276 80 M330 80 C370 100 430 92 470 40 M556 40 C575 65 588 90 600 110' stroke-width='1.3'/%3E%3Cpath d='M0 132 C22 134 44 137 64 140 M96 140 C150 158 225 148 282 105 M324 105 C370 122 435 112 480 75 M546 75 C565 95 583 115 600 132' stroke-width='1.2'/%3E%3Cpath d='M0 152 C22 153 44 156 68 158 M92 158 C150 172 230 160 288 130 M316 130 C370 145 440 135 490 110 M536 110 C560 125 580 140 600 152' stroke-width='1.1'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(90deg, transparent 0 74px, rgba(192, 57, 43, 0.25) 74px 76px, transparent 76px),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(29, 90, 138, 0.07) 31px 32px);
  background-size: 600px 220px, auto, auto;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
/* Chinese articles need a looser line height */
body.lang-zh { line-height: 1.8; }
@media (max-width: 720px) {
  body {
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='220'%3E%3Cg fill='none' stroke='%232a8a99' stroke-opacity='0.15' stroke-linecap='round'%3E%3Cpath d='M74 195 L80 110 M88 195 L80 110 M60 122 H100 M64 140 H96 M68 158 H92 M77 130 L83 148 M83 130 L77 148 M78 148 L82 166 M82 148 L78 166 M80 110 V100' stroke-width='1.6'/%3E%3Cpath d='M292 210 L302 60 M312 210 L302 60 M276 80 H330 M282 105 H324 M288 130 H316 M296 90 L308 115 M308 90 L296 115 M294 130 L310 165 M310 130 L294 165 M302 60 V48' stroke-width='1.9'/%3E%3Cpath d='M498 215 L512 10 M526 215 L512 10 M470 40 H556 M480 75 H546 M490 110 H536 M500 55 L524 95 M524 55 L500 95 M498 110 L526 160 M526 110 L498 160 M505 160 L519 190 M519 160 L505 190 M512 10 V0' stroke-width='2.1'/%3E%3Cpath d='M0 110 C20 112 40 118 60 122 M100 122 C150 145 220 125 276 80 M330 80 C370 100 430 92 470 40 M556 40 C575 65 588 90 600 110' stroke-width='1.3'/%3E%3Cpath d='M0 132 C22 134 44 137 64 140 M96 140 C150 158 225 148 282 105 M324 105 C370 122 435 112 480 75 M546 75 C565 95 583 115 600 132' stroke-width='1.2'/%3E%3Cpath d='M0 152 C22 153 44 156 68 158 M92 158 C150 172 230 160 288 130 M316 130 C370 145 440 135 490 110 M536 110 C560 125 580 140 600 152' stroke-width='1.1'/%3E%3C/g%3E%3C/svg%3E"),
      repeating-linear-gradient(0deg, transparent 0 31px, rgba(29, 90, 138, 0.07) 31px 32px);
    background-size: 600px 220px, auto;
  }
}

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }
img { max-width: 100%; height: auto; display: block; }

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; overflow: hidden; position: absolute !important;
}

/* ---------- spiral binding: open coil notebook on the left ---------- */
.coil {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: 72px; pointer-events: none; z-index: 5;
  /* soft gutter shading like the curl of an open notebook page */
  background: linear-gradient(90deg,
    rgba(43, 43, 38, 0.10) 0 10px,
    rgba(43, 43, 38, 0.05) 10px 26px,
    rgba(255, 253, 247, 0.6) 26px 38px,
    transparent 38px);
  border-right: 1px solid rgba(43, 43, 38, 0.12);
}
.coil::before {
  content: ''; position: absolute; inset: 0;
  /* punched holes — bigger, like a real spiral notebook */
  background:
    radial-gradient(circle at 36px 26px,
      rgba(43, 43, 38, 0.10) 0 8px,
      rgba(43, 43, 38, 0.45) 8px 10.5px,
      transparent 10.5px)
    0 0 / 72px 56px repeat-y;
}
.coil::after {
  content: ''; position: absolute; inset: 0;
  /* faint shadow the binding casts onto the page */
  background: linear-gradient(90deg, transparent 0 52px, rgba(43, 43, 38, 0.07) 68px, transparent 86px);
}
@media (max-width: 900px) {
  .coil { width: 40px; }
  .coil::before { background: radial-gradient(circle at 20px 26px, rgba(43, 43, 38, 0.10) 0 6px, rgba(43, 43, 38, 0.45) 6px 8.5px, transparent 8.5px) 0 0 / 40px 56px repeat-y; }
  .coil::after { background: linear-gradient(90deg, transparent 0 26px, rgba(43, 43, 38, 0.07) 38px, transparent 50px); }
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px 0 72px; }
@media (max-width: 900px) { .wrap { padding-left: 40px; } }

/* ---------- hand-drawn boxes ---------- */
.sketch {
  background: #fffdf7;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sketch);
  padding: 20px 24px;
  position: relative;
}
.sketch.alt { border-radius: var(--radius-sketch-2); }
.sketch::before {
  content: ''; position: absolute; inset: 4px;
  border: 1px dashed rgba(138, 133, 116, 0.45);
  border-radius: inherit; pointer-events: none;
}
.sketch-blue { border-color: var(--blue); }
.sketch-red { border-color: var(--red); }

/* ---------- top contact strip ---------- */
.topbar { background: var(--ink); color: #f4ecdb; font-size: 12.5px; font-family: var(--font-mono); letter-spacing: 0.2px; }
.topbar .wrap { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 58px; padding-top: 7px; padding-bottom: 7px; }
.topbar a { color: #f4ecdb; text-decoration: none; border-bottom: 1px dotted rgba(244, 236, 219, 0.5); }
.topbar a:hover { color: #fff; border-bottom-color: #fff; }
@media (max-width: 640px) { .topbar .phone-label { display: none; } }

/* ---------- header ---------- */
.site-header { border-bottom: 2px solid var(--ink); background: var(--paper-deep); box-shadow: 0 2px 0 rgba(43, 43, 38, 0.15); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-glyph { width: 56px; height: 56px; flex: none; }
.brand-name { font-family: var(--font-hand); font-size: 31px; line-height: 1.15; }
.brand-sub { font-size: 15px; color: var(--ink-soft); letter-spacing: 0.3px; font-family: var(--font-mono); }

.main-nav ul, .main-nav li { list-style: none; margin: 0; padding: 0; }
.main-nav li { display: inline-block; }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  font-family: var(--font-hand); font-size: 16.5px; color: var(--ink);
  text-decoration: none; padding: 6px 13px;
  border: 2px solid transparent; border-radius: var(--radius-sketch); white-space: nowrap;
}
.main-nav a:hover { border-color: var(--ink); background: #fffdf7; }
.main-nav .current-menu-item > a, .main-nav .current_page_item > a { border-color: var(--blue); color: var(--blue-deep); background: #fffdf7; }

/* ---------- typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-hand); font-weight: 400; line-height: 1.3; }
h1 { font-size: 34px; margin-bottom: 14px; }
h2 { font-size: 26px; margin-bottom: 12px; }
h3 { font-size: 20px; margin-bottom: 10px; }
p + p { margin-top: 12px; }

.page-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.kicker { font-family: var(--font-hand); color: var(--red); font-size: 15.5px; letter-spacing: 0.6px; margin-bottom: 6px; }
.technical { font-family: var(--font-mono); font-size: 13.5px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font-family: var(--font-hand); font-size: 16.5px;
  color: var(--ink); background: #fffdf7; border: 2px solid var(--ink);
  border-radius: var(--radius-sketch); padding: 8px 22px; cursor: pointer;
  text-decoration: none; transition: transform 0.12s ease;
}
.btn:hover { transform: rotate(-1deg) translateY(-1px); background: var(--paper-deep); }
.btn.primary { background: var(--blue); border-color: var(--blue-deep); color: #fffdf7; }
.btn.primary:hover { background: var(--blue-deep); }
.btn.small { font-size: 14px; padding: 4px 14px; }

/* ---------- hero ---------- */
.hero { padding: 40px 0 10px; }
.hero-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 34px; align-items: start; }
.hero-more { margin-top: 26px; max-width: none; }
.hero-more .family-block { max-width: 560px; margin: 24px auto 0; }
@media (max-width: 780px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-img { border: 2px solid var(--ink); border-radius: var(--radius-sketch-2); transform: rotate(1.2deg); background: #fffdf7; }
.hero-slogan { font-family: var(--font-hand); color: var(--blue-deep); font-size: 20px; margin: 4px 0 16px; }
.intro-list { margin: 10px 0 14px; padding-left: 4px; list-style: none; }
.intro-list li { position: relative; padding-left: 24px; margin-bottom: 4px; color: var(--ink-soft); }
.intro-list li::before {
  content: '●'; position: absolute; left: 2px; top: 2px;
  font-size: 11px; color: var(--blue); line-height: 1.7;
}
.subhead { font-family: var(--font-hand); font-size: 21px; color: var(--blue-deep); margin: 22px 0 8px; }
.philosophy {
  font-family: var(--font-hand); font-size: 19px; color: var(--red-deep);
  border-left: 3px solid var(--red); padding-left: 14px; margin: 16px 0 6px;
}

/* ---------- family illustration ---------- */
.family-block { margin: 38px 0 10px; text-align: center; }
.family-block img { border: 2px solid var(--ink); border-radius: var(--radius-sketch); margin: 0 auto; max-height: 340px; object-fit: cover; width: auto; max-width: 100%; }
.family-caption { font-family: var(--font-hand); color: var(--ink-soft); font-size: 15px; margin-top: 10px; }

/* ---------- cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.section-card { display: block; text-decoration: none; color: var(--ink); overflow: hidden; transition: transform 0.15s ease; }
.section-card img { width: 100%; height: 150px; object-fit: cover; border-bottom: 2px solid var(--ink); }
.section-card .card-body { padding: 16px 20px 18px; }
.section-card h3 { color: var(--blue-deep); margin-bottom: 6px; }
.section-card p { font-size: 14.5px; color: var(--ink-soft); }
.section-card:hover { transform: rotate(-0.5deg); }

.post-card { margin-bottom: 20px; }
.post-card.has-thumb { display: grid; grid-template-columns: 210px 1fr; gap: 18px; align-items: center; }
.post-card.has-thumb.compact { grid-template-columns: 170px 1fr; }
.post-card .thumb { display: block; }
.post-card .thumb img {
  width: 100%; height: 130px; object-fit: cover;
  border: 1.5px solid var(--line); border-radius: 8px; background: #fffdf7;
  transition: transform 0.15s ease;
}
.post-card.compact .thumb img { height: 108px; }
.post-card .thumb:hover img { transform: rotate(-0.6deg) scale(1.02); }
.post-card.has-thumb { align-items: center; }
@media (max-width: 640px) {
  .post-card.has-thumb, .post-card.has-thumb.compact { grid-template-columns: 1fr; }
  .post-card .thumb img { height: 170px; }
}
.post-card h3 { color: var(--blue-deep); }
.post-card.compact h3 { font-size: 18px; }
.post-card h3 a { text-decoration: none; color: inherit; }
.post-card h3 a:hover { text-decoration: underline; }
.post-meta { font-size: 12.5px; color: var(--pencil); margin: 4px 0 8px; font-family: var(--font-mono); }
.post-summary { color: var(--ink-soft); font-size: 15.5px; }

.badge {
  display: inline-block; font-family: var(--font-hand); font-size: 12.5px;
  padding: 2px 10px; border: 1.5px solid var(--red); color: var(--red);
  border-radius: var(--radius-sketch); margin-right: 8px;
}
.badge.blue { border-color: var(--blue); color: var(--blue); }
.badge-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; }

/* ---------- filter tabs / dropdown ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 22px; }
.tab {
  font-family: var(--font-hand); font-size: 15.5px; padding: 5px 16px;
  border: 2px solid var(--line); border-radius: var(--radius-sketch);
  color: var(--ink-soft); text-decoration: none; background: #fffdf7; cursor: pointer;
}
.tab:hover { border-color: var(--ink); color: var(--ink); }
.tab.active { border-color: var(--blue); color: var(--blue-deep); background: #f0f6fb; }

.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 22px 0; }
.filter-row label { font-family: var(--font-hand); font-size: 16px; color: var(--ink-soft); }
select.sketch-select {
  font-family: var(--font-body); font-size: 15px; padding: 7px 14px;
  background: #fffdf7; border: 2px solid var(--ink); border-radius: var(--radius-sketch);
  color: var(--ink); max-width: 100%;
}

/* ---------- timeline ---------- */
.timeline { position: relative; margin: 26px 0 10px; padding-left: 34px; }
.timeline::before { content: ''; position: absolute; left: 10px; top: 6px; bottom: 6px; border-left: 2px dashed var(--line); }
.tl-item { position: relative; margin-bottom: 26px; }
.tl-item::before {
  content: ''; position: absolute; left: -30px; top: 8px;
  width: 14px; height: 14px; border: 2px solid var(--blue); border-radius: 50%; background: var(--paper);
}
.tl-item.current::before { background: var(--red); border-color: var(--red); }
.tl-period { font-family: var(--font-mono); font-size: 13px; color: var(--red); letter-spacing: 0.4px; }
.tl-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tl-head h3 { color: var(--blue-deep); margin-bottom: 2px; }
.tl-desc { color: var(--ink-soft); font-size: 15px; margin: 4px 0 10px; }
.tl-products { margin-top: 10px; }
.stage-card { margin-bottom: 34px; }

/* ---------- article ---------- */
.article { max-width: 780px; }
.article h2, .article h3, .article h4 { color: var(--blue-deep); margin-top: 24px; }
.article img, .article .wp-block-image img { border: 1.5px solid var(--line); border-radius: 6px; margin: 16px auto; cursor: zoom-in; }
.article figure { margin: 16px 0; }
.article figcaption, .article .wp-element-caption { font-size: 13px; color: var(--pencil); text-align: center; margin-top: 6px; font-family: var(--font-mono); }
.article blockquote {
  border-left: 3px solid var(--red); background: var(--paper-deep);
  padding: 10px 18px; margin: 16px 0; font-style: italic; color: var(--ink-soft);
}
.article code { background: var(--paper-deep); padding: 1px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 14px; }
.article pre { background: #2b2b26; color: #f4ecdb; padding: 14px 18px; border-radius: 8px; overflow-x: auto; }
.article pre code { background: none; color: inherit; }
.article .wp-block-table { margin: 16px 0; overflow-x: auto; }
.article table { border-collapse: collapse; width: 100%; font-size: 15px; }
.article th, .article td { border: 1.5px solid var(--line); padding: 8px 12px; text-align: left; }
.article th { background: var(--paper-deep); font-family: var(--font-hand); font-weight: 400; }
.article td { font-family: var(--font-mono); font-size: 14px; }
.article ul, .article ol { padding-left: 26px; margin: 12px 0; }
.article li { margin-bottom: 4px; }
.article a { word-break: break-word; }

/* image lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 60; background: rgba(43, 43, 38, 0.85);
  display: none; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,.4); }

/* ---------- video: lazy youtube ---------- */
.video-embed { margin: 20px 0; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; position: relative; background: var(--paper-deep); }
.video-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-embed .ve-cover { position: absolute; inset: 0; cursor: pointer; border: 0; padding: 0; width: 100%; background: none; }
.video-embed .ve-cover img { width: 100%; height: 100%; object-fit: cover; }
.video-embed .ve-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 44px; background: rgba(43,43,38,.8); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.video-embed .ve-play::after {
  content: ''; border-style: solid; border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent #fffdf7; margin-left: 3px;
}
.video-embed:hover .ve-play { background: var(--red); }

/* ---------- comments ---------- */
.comments-area { max-width: 780px; margin-top: 36px; }
.comment-privacy-note { font-size: 13.5px; color: var(--pencil); margin: 8px 0 14px; }
.comment { margin-bottom: 14px; }
.comment .who { font-family: var(--font-hand); color: var(--blue-deep); font-size: 16px; }
.comment .when { font-size: 12px; color: var(--pencil); margin-left: 8px; font-family: var(--font-mono); }
.comment .body { color: var(--ink-soft); margin-top: 2px; }
.comment-respond h3 { margin-top: 18px; }
.comment-form label { display: block; font-family: var(--font-hand); font-size: 14.5px; margin: 10px 0 4px; }
.comment-form input, .comment-form textarea,
.enquiry-form input, .enquiry-form textarea {
  width: 100%; font-family: var(--font-body); font-size: 15.5px; color: var(--ink);
  background: #fffdf7; border: 1.5px solid var(--line); border-radius: 6px; padding: 8px 12px;
}
.comment-form input:focus, .comment-form textarea:focus,
.enquiry-form input:focus, .enquiry-form textarea:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.comment-form textarea { min-height: 90px; resize: vertical; }
.comment-form .submit, .enquiry-form .btn { font-family: var(--font-hand); font-size: 16.5px; color: #fffdf7; background: var(--blue); border: 2px solid var(--blue-deep); border-radius: var(--radius-sketch); padding: 8px 22px; cursor: pointer; margin-top: 12px; }
.comment-form .submit:hover, .enquiry-form .btn:hover { background: var(--blue-deep); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.msg { font-size: 14px; margin-top: 10px; font-family: var(--font-hand); }
.msg.ok { color: #2e7d32; }
.msg.err { color: var(--red); }
.hp-field { position: absolute; left: -9999px; opacity: 0; }

/* ---------- admin-front widgets ---------- */
.enquiry-form label { display: block; font-family: var(--font-hand); font-size: 14.5px; margin: 10px 0 4px; }
.enquiry-form textarea { min-height: 110px; resize: vertical; }

/* ---------- tags & related ---------- */
.post-tags { margin-top: 26px; display: flex; gap: 8px; flex-wrap: wrap; }
.post-tags a {
  font-family: var(--font-mono); font-size: 12.5px; text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; color: var(--ink); background: #fffdf7;
}
.post-tags a:hover { border-color: var(--blue); color: var(--blue-deep); }
.related-posts { margin-top: 36px; }

/* ---------- pagination ---------- */
.pagination { margin: 26px 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pagination .page-numbers {
  font-family: var(--font-mono); font-size: 14px; text-decoration: none; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 13px; background: #fffdf7;
}
.pagination .page-numbers.current { border-color: var(--blue); color: var(--blue-deep); background: #f0f6fb; }
.pagination .page-numbers:hover { border-color: var(--ink); }

/* ---------- search ---------- */
.search-row { display: flex; gap: 10px; max-width: 480px; margin: 18px 0 22px; }
.search-row input[type="search"] {
  flex: 1; font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: #fffdf7; border: 2px solid var(--ink); border-radius: var(--radius-sketch); padding: 7px 16px;
}
.search-row input[type="search"]:focus { outline: 2px solid var(--blue); }

/* ---------- divider / footer ---------- */
.divider { margin: 32px 0; }
.divider svg { display: block; width: 100%; height: 40px; }

.site-footer { margin-top: 54px; border-top: 2px solid var(--ink); background: var(--paper-deep); padding: 24px 0 34px; color: var(--ink-soft); font-size: 13.5px; }
.site-footer .wrap { padding-left: 72px; }
@media (max-width: 900px) { .site-footer .wrap { padding-left: 40px; } }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; text-align: left; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-title { font-family: var(--font-hand); font-size: 18px; color: var(--ink); margin-bottom: 6px; }
.footer-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.footer-phone { white-space: nowrap; font-size: 12.5px; }
.footer-links a {
  font-family: var(--font-mono); font-size: 12.5px; text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; color: var(--ink); background: #fffdf7;
}
.footer-links a:hover { border-color: var(--blue); color: var(--blue-deep); }
.copyright { margin-top: 18px; font-size: 12.5px; color: var(--pencil); }

.loading-note { color: var(--pencil); font-family: var(--font-hand); font-size: 15px; }

/* ---------- back to top ---------- */
.to-top {
  position: fixed; right: 18px; bottom: 22px; z-index: 30;
  font-family: var(--font-hand); font-size: 16px; color: var(--ink);
  background: #fffdf7; border: 2px solid var(--ink); border-radius: var(--radius-sketch);
  padding: 6px 14px; cursor: pointer; box-shadow: 2px 3px 0 rgba(43, 43, 38, 0.15);
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--paper-deep); }
