/* Nadyuk Systems — sub-page layer ("One line" system).
   Loaded after styles.css by the help pages, /stack, /privacy, /reviews and the 404.
   The article hangs off a thin line; every heading is a stop on it. */

body.page { min-height: 100vh; display: flex; flex-direction: column; }
body.page main { flex: 1; }

/* The stack page is the engineer's reading of the site: same system, night ground. */
body.night-page {
  --sand: #0f1226; --sand-2: #191d3a; --card: #191d3a; --ink: #fffdf8; --ink-2: #b4b9d6; --ink-3: #a3a9cb;
  --rule: rgba(255, 255, 255, 0.18); --cobalt: #8fa2ff; --cobalt-deep: #ffffff; --green-deep: #5fd3a6; --vermilion-deep: #ff8f78;
}
body.night-page .btn-primary { color: #0f1226; }
body.night-page .btn-primary:hover { color: #0f1226; }
body.night-page .btn-amber, body.night-page .btn-amber:hover { color: #0f1226; } /* --ink is light on this page; amber needs dark text (8.8:1) */
body.night-page ::selection { background: #fffdf8; color: #0f1226; }

/* Header on sub-pages: brand, one quiet link, one action. No script needed. */
.hdr-page .hdr-in { gap: 16px; }
.hdr-link { display: inline-flex; align-items: center; min-height: 42px; padding: 0 12px; font-size: 0.95rem; font-weight: 550; color: var(--ink-2); text-decoration: none; border-radius: calc(8px * var(--sq, 1)); corner-shape: squircle; }
.hdr-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.25em; }
@media (max-width: 560px) { .hdr-page .hdr-cta { display: inline-flex; } .hdr-link { display: none; } }
.xs-only { display: none; }
.hdr-page .hdr-cta, .hdr-page .brand-name { white-space: nowrap; }
@media (max-width: 440px) { .xs-hide { display: none; } .xs-only { display: inline; } }

/* The spine on sub-pages: one line from ring to dot, filled by scroll where the browser can. */
.rail-plain .rail-line::before, .rail-plain .rail-line::after { content: ""; position: absolute; left: 50%; border-radius: 50%; transform: translateX(-50%); }
.rail-plain .rail-line::before { top: -10px; width: 20px; height: 20px; background: var(--sand); border: 5px solid var(--ink); z-index: 1; }
.rail-plain .rail-line::after { bottom: -10px; width: 20px; height: 20px; background: var(--vermilion); z-index: 1; }
.rail-plain .rail-fill { transform: scaleY(1); }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .rail-plain .rail-fill { animation: rail-fill linear both; animation-timeline: scroll(root); }
  }
}
@keyframes rail-fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---------- Article ---------- */
.doc { padding: clamp(28px, 5vw, 72px) 0 clamp(64px, 8vw, 112px); }
.doc-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.doc-head { position: sticky; top: calc(var(--hdr-h) + 32px); }
.doc-head h1 { font-size: clamp(2.2rem, 4.4vw, 3.8rem); font-weight: 650; letter-spacing: -0.04em; line-height: 1; margin-top: 22px; }
.doc-head .kicker + h1 { margin-top: 22px; }
.doc-head h1:first-child { margin-top: 0; }
.doc-head .lead { font-size: 1.1875rem; line-height: 1.5; margin-top: 22px; }
.updated { margin-top: 14px; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }

.doc-body { --pad: clamp(22px, 3vw, 40px); border-left: var(--line) solid var(--ink); padding-left: var(--pad); }
.doc-body > * + * { margin-top: 16px; }
.doc-body p, .doc-body li { color: var(--ink-2); }
.doc-body strong { color: var(--ink); }
.doc-body h2 { position: relative; font-size: clamp(1.45rem, 2.4vw, 1.85rem); letter-spacing: -0.03em; line-height: 1.12; margin-top: 56px; color: var(--ink); }
.doc-body > h2:first-child { margin-top: 0; }
.doc-body h2::before { content: ""; position: absolute; left: calc(-1 * var(--pad) - 8.75px); top: 0.28em; width: 16px; height: 16px; border-radius: 50%; background: var(--sand); border: 4px solid var(--ink); }
.doc-body h2 + * { margin-top: 14px; }
.doc-body > ul:not([class]), .doc-body > ol.numbered { display: grid; gap: 10px; }
.doc-body > ul:not([class]) li { position: relative; padding-left: 24px; }
.doc-body > ul:not([class]) li::before { content: ""; position: absolute; left: 2px; top: calc(0.74em + 0.25px); width: 12px; height: 2px; border-radius: 2px; background: var(--ink); }
.numbered { counter-reset: n; }
.numbered li { position: relative; padding-left: 40px; counter-increment: n; }
.numbered li::before { content: counter(n); position: absolute; left: 0; top: 0.05em; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--ink); font-family: var(--mono); font-size: 0.75rem; font-weight: 600; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; text-box: trim-both cap alphabetic; }
.doc-body code { font-family: var(--mono); font-size: 0.88em; background: var(--sand-2); padding: 2px 6px; border-radius: 6px; color: var(--ink); }
.doc-body em { font-style: normal; font-weight: 600; color: var(--ink); }

.parts { display: grid; gap: 12px; }
.parts > div { background: var(--card); border: 1px solid var(--rule); border-radius: calc(14px * var(--sq, 1)); corner-shape: squircle; padding: 18px 20px; }
.part-title { font-weight: 650; font-size: 1.0625rem; color: var(--ink) !important; letter-spacing: -0.012em; }
.parts p + p { margin-top: 6px; }
.term { display: block; margin-top: 8px; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.02em; color: var(--ink-3); }

.price-list { border-top: var(--line) solid var(--ink); }
.price-list > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 20px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.price-list span { font-weight: 620; color: var(--ink); }
.price-list strong { font-size: 1.1875rem; font-weight: 660; letter-spacing: -0.02em; white-space: nowrap; text-align: right; }
.price-list small { grid-column: 1 / -1; font-size: 0.925rem; color: var(--ink-2); }

.card { background: var(--card); border: 1px solid var(--rule); border-radius: calc(14px * var(--sq, 1)); corner-shape: squircle; padding: 16px 20px; }

.cta { position: relative; margin-top: 56px !important; background: var(--night); color: #fffdf8; border-radius: var(--r-card); corner-shape: squircle; padding: clamp(22px, 3.5vw, 36px); }
body.night-page .cta { background: var(--night-2); }
.cta::before { content: ""; position: absolute; left: calc(-1 * var(--pad) - 10.75px); top: 34px; width: 20px; height: 20px; border-radius: 50%; background: var(--vermilion); }
.cta-title { font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 640; letter-spacing: -0.03em; line-height: 1.12; color: #fffdf8 !important; }
.cta p { color: var(--night-mute); margin-top: 10px; }
.cta .btn { margin-top: 20px; }
.cta .btn .icon { width: 18px; height: 18px; }
.cta-alt { font-size: 0.95rem; }
.cta a:not(.btn) { color: var(--sky); }
.cta a:not(.btn):hover { color: #fff; }
.cta :focus-visible { outline-color: var(--amber); }
.related { margin-top: 28px !important; font-size: 0.975rem; }

/* Stack page pieces */
.stack-group-title { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3) !important; }
.stack-group + .stack-group { margin-top: 20px; }
.stack-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.stack-grid li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; background: #fffdf8; color: #14172b; border: 1px solid #d9d2c3; border-radius: 999px; font-size: 0.875rem; font-weight: 550; }
.stack-grid img { width: 20px; height: 20px; object-fit: contain; }
.stack-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; }
.stack-stats > div { border-top: var(--line) solid var(--ink); padding-top: 12px; }
.stack-stats strong { display: block; font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 660; letter-spacing: -0.04em; line-height: 1.05; }
.stack-stats span { display: block; margin-top: 6px; font-size: 0.925rem; color: var(--ink-2); }
.stack-note { font-size: 0.875rem; color: var(--ink-3) !important; }

/* ---------- Mini footer ---------- */
.ftr-mini { padding: 36px 0; }
.ftr-mini-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.ftr-mini .ftr-brand { font-size: 1.0625rem; }
.ftr-mini nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 0.925rem; }
.ftr-mini nav a { display: inline-block; padding: 5px 0; }
.ftr-mini-base { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--night-rule); font-size: 0.825rem; color: var(--night-mute); }
.ftr-mini-base a { color: var(--card); text-decoration: underline; }
body.night-page .ftr { background: #0a0c1b; }
body.night-page .ftr a, body.night-page .ftr-brand { color: #fffdf8; }

/* ---------- Reviews: five stops on a line, none filled yet ---------- */
.wait { margin-top: 28px; }
.wait svg { width: 100%; max-width: 420px; height: auto; }
.wait-line { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: round; }
.wait-stop { fill: var(--sand); stroke: var(--ink); stroke-width: 6; }
.wait-cap { margin-top: 12px; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.note-card { background: var(--card); border: var(--line) solid var(--ink); border-radius: var(--r-card); corner-shape: squircle; padding: clamp(20px, 3vw, 30px); }
.note-card h2 { margin-top: 0 !important; }
.note-card h2::before { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- 404: a call comes in, goes unanswered, and gets a text back ---------- */
.lost { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 88px); align-items: center; padding: clamp(24px, 4vw, 56px) 0 clamp(56px, 8vw, 104px); }
.lost .code { display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.lost .code b { padding: 4px 11px; border-radius: 999px; background: var(--ink); color: var(--card); font-weight: 600; }
.lost h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); font-weight: 650; letter-spacing: -0.042em; line-height: 0.98; margin: 22px 0 20px; }
.lost h1 em { font-style: normal; color: var(--cobalt); }
.lost .lead { margin-top: 0; }
.lost .aside { margin-top: 14px; max-width: 34rem; color: var(--ink-3); font-size: 0.975rem; }
.phone-wrap { display: flex; justify-content: center; }
.phone { position: relative; width: 290px; height: 560px; padding: 12px; border-radius: calc(46px * var(--sq, 1)); corner-shape: squircle; background: var(--ink); }
.phone.is-ringing { animation: ring 0.5s ease-in-out 4; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-3deg); } 40% { transform: rotate(3deg); } 60% { transform: rotate(-2deg); } 80% { transform: rotate(2deg); } }
.screen { position: relative; height: 100%; border-radius: calc(46px * var(--sq, 1) - 12px); corner-shape: squircle; overflow: hidden; background: var(--night-2); color: #fffdf8; }
.notch { position: absolute; top: 10px; left: 50%; width: 92px; height: 26px; margin-left: -46px; border-radius: 20px; background: var(--ink); z-index: 5; }
.status { display: flex; justify-content: space-between; padding: 14px 24px 0; font-size: 0.72rem; font-weight: 700; }
.call { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding-top: 92px; text-align: center; transition: opacity 0.5s ease, transform 0.5s var(--ease); }
.call-label { font-size: 0.8rem; color: var(--night-mute); letter-spacing: 0.04em; }
.caller { margin: 6px 16px 0; font-size: 1.35rem; font-weight: 650; word-break: break-all; line-height: 1.25; }
.avatar { position: relative; width: 84px; height: 84px; margin-top: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--night); color: var(--amber); font-family: var(--mono); font-weight: 700; font-size: 1.4rem; border: 2px solid var(--amber); }
.avatar::before, .avatar::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--amber); opacity: 0; }
.is-ringing .avatar::before { animation: pulse 1.6s ease-out infinite; }
.is-ringing .avatar::after { animation: pulse 1.6s ease-out 0.8s infinite; }
@keyframes pulse { from { transform: scale(1); opacity: 0.7; } to { transform: scale(1.9); opacity: 0; } }
.call-buttons { position: absolute; bottom: 54px; left: 0; right: 0; display: flex; justify-content: space-around; }
.call-btn { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; }
.call-btn svg { width: 24px; height: 24px; }
.decline { background: var(--vermilion); }
.accept { background: var(--green); }
.is-missed .call { opacity: 0; transform: scale(0.94); pointer-events: none; }
.thread { position: absolute; inset: 0; padding: 70px 14px 16px; display: flex; flex-direction: column; gap: 10px; opacity: 0; transition: opacity 0.5s ease 0.2s; }
.is-missed .thread { opacity: 1; }
.missed { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: calc(16px * var(--sq, 1)); corner-shape: squircle; background: rgba(255, 255, 255, 0.09); font-size: 0.8rem; transform: translateY(-12px); opacity: 0; transition: all 0.5s var(--ease) 0.3s; }
.is-missed .missed { transform: none; opacity: 1; }
.missed svg { flex: none; width: 26px; height: 26px; padding: 5px; border-radius: calc(8px * var(--sq, 1)); corner-shape: squircle; background: var(--vermilion); color: #fff; }
.missed strong { display: block; font-size: 0.82rem; }
.missed span { color: var(--night-mute); word-break: break-all; }
.bubble { align-self: flex-start; max-width: 88%; padding: 10px 13px; border-radius: calc(18px * var(--sq, 1)) calc(18px * var(--sq, 1)) calc(18px * var(--sq, 1)) calc(6px * var(--sq, 1)); corner-shape: squircle; background: #fffdf8; color: #14172b; font-size: 0.84rem; line-height: 1.45; transform: translateY(10px) scale(0.96); opacity: 0; transform-origin: left bottom; transition: all 0.45s var(--ease); }
.bubble.is-in { transform: none; opacity: 1; }
.from { align-self: flex-start; margin: 4px 0 -4px 6px; font-size: 0.68rem; color: var(--night-mute); opacity: 0; transition: opacity 0.3s; }
.from.is-in { opacity: 1; }
.typing { display: inline-flex; gap: 4px; padding: 3px 1px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #7d84a8; animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }
.phone .chips { gap: 6px; margin-top: 2px; opacity: 0; transform: translateY(8px); transition: all 0.45s var(--ease); }
.phone .chips.is-in { opacity: 1; transform: none; }
.phone .chips a { padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--amber); color: var(--amber); font-size: 0.78rem; font-weight: 650; text-decoration: none; }
.phone .chips a:hover { background: var(--amber); color: var(--night); }

@media (max-width: 960px) {
  .doc-grid { grid-template-columns: minmax(0, 1fr); }
  .doc-head { position: static; }
  .lost { grid-template-columns: minmax(0, 1fr); }
  .phone { width: 270px; height: 520px; }
}
@media (max-width: 520px) {
  .stack-stats { grid-template-columns: minmax(0, 1fr); }
  .actions .btn { width: 100%; }
  .price-list strong { font-size: 1.0625rem; }
}
@media (max-width: 380px) {
  .hdr-page .hdr-in { gap: 10px; }
  .hdr-page .brand { gap: 8px; }
  .hdr-page .brand-mark { width: 30px; height: 30px; }
  .hdr-page .brand-name { font-size: 0.975rem; }
  .hdr-page .hdr-cta { padding: 0 12px; font-size: 0.85rem; min-height: 40px; }
}

/* About Mark (/mark-nadyuk): portrait above the heading, and the profile link groups. */
.profile-photo { display: block; width: 140px; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: calc(18px * var(--sq, 1)); corner-shape: squircle; border: 1px solid var(--rule); margin-bottom: 22px; }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; }
.profile-links a { font-weight: 560; }

/* Problem pages (/salons-and-barbers, /get-more-google-reviews): copyable examples and the author box. */
.example { margin-top: 18px; background: var(--card); border: var(--line) solid var(--ink); border-radius: var(--r-card); corner-shape: squircle; padding: clamp(18px, 3vw, 26px); }
.example-label { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin: 0 !important; }
.example-text { margin-top: 10px !important; white-space: pre-line; user-select: all; -webkit-user-select: all; cursor: text; color: var(--ink); }
.example-hint { margin-top: 10px !important; font-size: 0.875rem; color: var(--ink-3); }
.doc-body .faq-list { margin-top: 18px; }
.author-box { display: flex; gap: 16px; align-items: flex-start; margin-top: 40px !important; padding-top: 22px; border-top: 1px solid var(--rule); }
.author-box img { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--rule); }
.author-box p { margin: 0 !important; }
.author-box .author-name { font-weight: 640; color: var(--ink); }
.author-box .author-bio { margin-top: 4px !important; font-size: 0.95rem; color: var(--ink-2); }
