/* =========================================================
   매쓰플랫 사용 가이드 — Design System
   Tone: Toss / 당근 — clean, calm, generous whitespace
   ========================================================= */

:root {
  /* Neutrals (Toss-like) */
  --bg: #ffffff;
  --bg-subtle: #f7f8fa;
  --bg-muted: #f2f4f6;
  --line: #eceef1;
  --line-strong: #e1e4e8;

  --ink: #191f28;        /* primary text */
  --ink-2: #4e5968;      /* secondary text */
  --ink-3: #8b95a1;      /* tertiary text */
  --ink-4: #b0b8c1;      /* disabled */

  /* Brand */
  --brand: #3182f6;
  --brand-strong: #2272eb;
  --brand-tint: #eaf2ff;

  /* Service accents */
  --teacher: #3182f6;
  --teacher-tint: #eaf2ff;
  --student: #12b886;
  --student-tint: #e6f8f1;
  --attendance: #ff6b3d;
  --attendance-tint: #fff0eb;

  /* Semantic for callouts */
  --tip: #f59f00;
  --tip-tint: #fff8e6;
  --tip-line: #ffe8a8;

  /* Radius */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(17,24,39,.04);
  --shadow-md: 0 4px 16px rgba(17,24,39,.06), 0 1px 3px rgba(17,24,39,.04);
  --shadow-lg: 0 12px 36px rgba(17,24,39,.10);

  --maxw: 1080px;
  --header-h: 64px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }

body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  letter-spacing: -0.01em;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: var(--maxw); margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 16px; padding: 0 24px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; }
.brand .logo {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #3182f6, #4dabf7);
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800;
  box-shadow: 0 2px 8px rgba(49,130,246,.35);
}
.brand .sub { color: var(--ink-3); font-weight: 600; font-size: 14px; }
/* TEMP: 로고 잠시 숨김 — 다시 보이려면 아래 한 줄 삭제 */
.brand .logo { display: none; }
.header-spacer { flex: 1; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 13px; border-radius: 10px; font-size: 14.5px; font-weight: 600;
  color: var(--ink-2); transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--bg-muted); color: var(--ink); }
.nav-links a.active { color: var(--brand); }

.searchbox {
  display: flex; align-items: center; gap: 7px;
  background: var(--bg-muted); border: 1px solid transparent;
  border-radius: 12px; padding: 8px 13px; min-width: 220px;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.searchbox:focus-within { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.searchbox svg { color: var(--ink-3); flex: none; }
.searchbox input { border: 0; outline: 0; background: transparent; font-size: 14.5px; width: 100%; color: var(--ink); }
.searchbox input::placeholder { color: var(--ink-4); }

/* Search results dropdown */
.search-pop {
  position: absolute; top: calc(var(--header-h) - 6px); right: 24px; z-index: 200;
  width: 420px; max-width: calc(100vw - 48px);
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 8px; display: none;
  max-height: min(58vh, 440px); overflow-y: auto; overscroll-behavior: contain;
}
.search-pop.open { display: block; }
.search-pop a { display: flex; flex-direction: column; gap: 2px; padding: 11px 13px; border-radius: 11px; }
.search-pop a:hover { background: var(--bg-muted); }
.search-pop .r-title { font-weight: 600; font-size: 14.5px; }
.search-pop .r-path { font-size: 12.5px; color: var(--ink-3); }
.search-pop .r-empty { padding: 18px 13px; color: var(--ink-3); font-size: 14px; }
.search-pop .r-snip { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-pop a.r-soon { cursor: default; opacity: .55; }
.search-pop a.r-soon:hover { background: none; }
.search-pop mark { background: var(--brand-tint); color: var(--brand); border-radius: 4px; padding: 0 1px; }

/* ---------------------------------------------------------
   Hero (hub)
   --------------------------------------------------------- */
.hero { padding: 76px 0 36px; text-align: center; }
.hero .eyebrow {
  display: inline-block; font-size: 13.5px; font-weight: 700; color: var(--brand);
  background: var(--brand-tint); padding: 6px 13px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { font-size: 42px; line-height: 1.25; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 16px; }
.hero p { font-size: 18px; color: var(--ink-2); margin: 0 auto; max-width: 540px; }

.hero-search-wrap { position: relative; max-width: 560px; margin: 32px auto 0; text-align: left; }
.hero-search {
  margin: 0;
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid var(--line-strong);
  border-radius: 16px; padding: 15px 20px; box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
/* 히어로 검색 드롭다운: 입력창 바로 아래 전폭 */
.search-pop.hero-pop { top: calc(100% + 10px); left: 0; right: 0; width: auto; max-width: none; }
.hero-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 5px var(--brand-tint); }
.hero-search svg { color: var(--ink-3); flex: none; }
.hero-search input { border: 0; outline: 0; font-size: 16.5px; width: 100%; color: var(--ink); background: transparent; }
.hero-search input::placeholder { color: var(--ink-4); }

/* ---------------------------------------------------------
   Service cards (hub)
   --------------------------------------------------------- */
.section-label { font-size: 14px; font-weight: 700; color: var(--ink-3); margin: 0 0 16px; }

.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 28px 0 8px; }
.svc-card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px 26px; box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
  overflow: hidden;
}
.svc-card::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: var(--accent, var(--brand));
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.svc-card:hover::after { transform: scaleX(1); }
.svc-icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  font-size: 28px; background: var(--accent-tint, var(--brand-tint)); margin-bottom: 18px;
}
.svc-card h3 { font-size: 20px; font-weight: 800; margin: 0 0 7px; letter-spacing: -0.02em; }
.svc-card .svc-desc { font-size: 14.5px; color: var(--ink-2); margin: 0 0 18px; flex: 1; line-height: 1.55; }
.svc-card .svc-meta { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--accent, var(--brand)); }
.svc-card .svc-meta .arrow { display: inline-flex; align-items: center; transition: transform .2s var(--ease); }
.svc-card:hover .svc-meta .arrow { transform: translateX(3px); }

/* Secondary link row */
.quick-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 16px; }
.quick-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-subtle); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px 20px; transition: background .15s, transform .15s;
}
a.quick-card { text-decoration: none; color: inherit; }
.quick-card:hover { background: #fff; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.quick-card .q-emoji { font-size: 22px; }
.quick-card .q-text b { display: block; font-size: 15px; font-weight: 700; }
.quick-card .q-text span { font-size: 13px; color: var(--ink-3); }

/* ---------------------------------------------------------
   Support callout (shared)
   --------------------------------------------------------- */
.support {
  margin: 56px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: var(--bg-subtle); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 32px;
}
.support .s-left b { font-size: 17px; font-weight: 800; display: block; margin-bottom: 4px; }
.support .s-left span { color: var(--ink-2); font-size: 14.5px; }
.support .s-actions { display: flex; gap: 10px; flex: none; }
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 12px 20px; border-radius: 12px;
  font-size: 14.5px; font-weight: 700; border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  transition: transform .12s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-strong); }

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 36px 0; color: var(--ink-3); font-size: 13.5px; }
.site-footer .inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------------------------------------------------------
   Service page
   --------------------------------------------------------- */
.page-head { padding: 44px 0 12px; }
.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-3); margin-bottom: 18px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--ink-2); }
.breadcrumb .sep { color: var(--ink-4); }
.breadcrumb .cur { color: var(--ink-2); font-weight: 600; }

.page-title-row { display: flex; align-items: center; gap: 16px; }
.page-title-row .p-icon {
  width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; font-size: 30px;
  background: var(--accent-tint, var(--brand-tint)); flex: none;
}
.page-head h1 { font-size: 32px; font-weight: 800; margin: 0; letter-spacing: -0.03em; }
.page-head .p-desc { color: var(--ink-2); font-size: 15.5px; margin: 6px 0 0; }

.banner {
  margin: 28px 0 8px; border-radius: var(--r-lg); padding: 40px;
  background: linear-gradient(120deg, var(--accent-tint), #fff);
  border: 1px solid var(--line); display: flex; align-items: center; gap: 16px;
  color: var(--ink-2);
}
.banner .b-emoji { font-size: 40px; }
.banner b { color: var(--ink); }

/* 서비스 상단 강조 안내 (예: PC용 앱 설치 다운로드) */
.svc-notice {
  margin: 12px 0 4px; padding: 20px 24px; border-radius: var(--r-lg);
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.svc-notice .n-emoji { font-size: 30px; line-height: 1; }
.svc-notice .n-body { display: flex; flex-direction: column; gap: 3px; min-width: 220px; flex: 1; }
.svc-notice .n-body b { font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.svc-notice .n-body span { font-size: 13.5px; color: var(--ink-3); white-space: pre-line; }
.svc-notice .n-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.svc-notice .n-dl {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 700;
  background: var(--accent); color: #fff; text-decoration: none; white-space: nowrap;
}
.svc-notice .n-dl:hover { filter: brightness(.95); }
.svc-notice .n-more {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 13.5px; font-weight: 700; color: var(--accent); text-decoration: none; white-space: nowrap;
}
.svc-notice .n-more:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .svc-notice { padding: 16px 18px; }
  .svc-notice .n-actions { width: 100%; }
  .svc-notice .n-dl { flex: 1; justify-content: center; }
}

/* group + category grid */
.group { margin-top: 44px; }
.group > h2 {
  font-size: 22px; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 9px;
}
.group > .g-sub { color: var(--ink-3); font-size: 14px; margin: 0 0 20px; }
.group .accent-dot { width: 9px; height: 9px; border-radius: 3px; background: var(--accent, var(--brand)); }

.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.cat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 22px 22px 12px; box-shadow: var(--shadow-sm);
}
.cat h3 { font-size: 16px; font-weight: 700; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.cat ul { list-style: none; margin: 0; padding: 0; }
.cat li { margin: 0; }
.cat li a, .cat li .soon {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 12px; margin: 0 -12px; border-radius: 11px; font-size: 14.5px;
  transition: background .14s;
}
.cat li a { color: var(--ink); font-weight: 500; }
.cat li a:hover { background: var(--bg-muted); }
.cat li a .go { color: var(--ink-4); transition: transform .15s, color .15s; }
.cat li a:hover .go { color: var(--accent, var(--brand)); transform: translateX(2px); }
.cat li .soon { color: var(--ink-4); cursor: default; }
.badge-soon { font-size: 11px; font-weight: 700; color: var(--ink-3); background: var(--bg-muted); padding: 3px 8px; border-radius: 999px; }
.badge-new { font-size: 11px; font-weight: 800; color: var(--brand); background: var(--brand-tint); padding: 3px 8px; border-radius: 999px; }

/* ---------------------------------------------------------
   Article page layout
   --------------------------------------------------------- */
.article-layout { display: grid; grid-template-columns: 1fr 240px; gap: 56px; align-items: start; padding-top: 36px; }
.article { min-width: 0; max-width: 720px; }
.article-toc { position: sticky; top: calc(var(--header-h) + 28px); }
.article-toc .toc-title { font-size: 12.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px; }
.article-toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.article-toc li a {
  display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent;
  font-size: 13.5px; color: var(--ink-3); transition: color .14s, border-color .14s; line-height: 1.4;
}
.article-toc li.sub a { padding-left: 26px; font-size: 13px; }
.article-toc li a:hover { color: var(--ink); }
.article-toc li a.active { color: var(--brand); border-left-color: var(--brand); font-weight: 600; }

/* Article content */
.article h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; margin: 6px 0 14px; line-height: 1.3; }
.article .lead { font-size: 17px; color: var(--ink-2); margin: 0 0 28px; line-height: 1.6; }

.article h2 {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  font-size: 23px; font-weight: 800; letter-spacing: -0.02em; margin: 52px 0 18px; padding-top: 8px;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.article h2 .h2-chip {
  display: inline-block; flex-shrink: 0; font-size: 13px; font-weight: 700; color: var(--brand);
  background: var(--brand-tint); padding: 4px 11px; border-radius: 8px;
}
.article h2 .h2-chip + br { display: none; }
.article h3 {
  font-size: 18px; font-weight: 700; margin: 36px 0 14px; letter-spacing: -0.01em;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.article h4 { font-size: 15.5px; font-weight: 700; color: var(--ink-2); margin: 24px 0 10px; }
.article p { margin: 0 0 16px; color: var(--ink); }
.article hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.article code {
  background: var(--bg-muted); padding: 2px 7px; border-radius: 6px; font-size: 0.9em;
  font-family: "SF Mono", ui-monospace, Menlo, monospace; color: #d6336c; font-weight: 600;
}
.article a.inline { color: var(--brand); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: rgba(49,130,246,.55); }
.article a.inline:hover { text-decoration-color: var(--brand); }
/* 검색으로 들어왔을 때 본문 매칭 하이라이트 */
.article mark.search-hit { background: #fff3bf; color: inherit; border-radius: 3px; padding: 0 2px; box-shadow: 0 0 0 1px #ffe8a8; }

/* numbered steps */
.steps { list-style: none; counter-reset: step; margin: 0 0 20px; padding: 0; }
.steps > li {
  position: relative; counter-increment: step; padding: 0 0 18px 44px; margin: 0;
  border-left: 2px solid var(--line); margin-left: 14px;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(step); position: absolute; left: -15px; top: -2px;
  width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: 13px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(49,130,246,.3);
}
.steps > li .s-body { padding-top: 1px; }
.steps ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14.5px; }
.steps ul li { margin: 3px 0; }

/* simple ordered/unordered lists */
.article ol:not(.steps), .article ul:not(.steps):not(.toc-list) { padding-left: 22px; margin: 0 0 16px; color: var(--ink); }
.article ol:not(.steps) li, .article ul:not(.steps) li { margin: 5px 0; }

/* image placeholder */
.shot {
  margin: 16px 0 22px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md);
  background:
    linear-gradient(var(--bg-subtle), var(--bg-subtle)) padding-box;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 38px 24px; text-align: center; color: var(--ink-3);
}
.shot .shot-ico {
  width: 44px; height: 44px; border-radius: 12px; background: var(--bg-muted);
  display: grid; place-items: center; font-size: 22px;
}
.shot .shot-cap { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.shot .shot-tag { font-size: 11.5px; color: var(--ink-4); font-weight: 600; letter-spacing: .03em; }
.shot.dual { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 0; border: 0; background: none; }
.shot.dual > div {
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); background: var(--bg-subtle);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 30px 18px;
}
/* 실제 이미지가 들어간 스크린샷 */
.shot.has-img { border: 0; background: none; padding: 0; display: block; }
.shot.dual > div.has-img { border: 0; background: none; padding: 0; }
.shot-img {
  width: 100%; display: block; border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.shot.has-img .shot-cap, .shot.dual > div.has-img .shot-cap { margin-top: 9px; }

/* video embed (YouTube) */
.video-embed {
  position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 22px 0 10px;
  border-radius: var(--r-md); overflow: hidden; background: #000; box-shadow: var(--shadow-sm);
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-embed + .shot-cap { display: block; margin: -2px 0 18px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }

/* callouts */
.callout {
  display: flex; gap: 13px; border-radius: var(--r-md); padding: 18px 20px; margin: 20px 0;
  font-size: 14.5px; line-height: 1.6;
}
.callout .c-ico { font-size: 19px; flex: none; line-height: 1.4; }
.callout .c-body { min-width: 0; }
.callout .c-body b { display: inline; font-weight: 700; }
.callout .c-body p { margin: 0 0 6px; }
.callout .c-body p:last-child { margin: 0; }
.callout.tip { background: var(--tip-tint); border: 1px solid var(--tip-line); }
.callout.tip b { color: #b5760a; }
.callout.note { background: var(--bg-subtle); border: 1px solid var(--line); }
.callout.video { background: #f3f0ff; border: 1px solid #e0d4ff; }
.callout.video a { color: #7048e8; font-weight: 700; }

/* toggle / accordion (FAQ) */
.toggle {
  border: 1px solid var(--line); border-radius: var(--r-md); margin: 10px 0; background: #fff;
  overflow: hidden; transition: box-shadow .15s, border-color .15s;
}
.toggle[open] { box-shadow: var(--shadow-sm); border-color: var(--line-strong); }
.toggle summary {
  list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink);
}
.toggle summary::-webkit-details-marker { display: none; }
.toggle summary .t-chevron { color: var(--ink-4); transition: transform .2s var(--ease); flex: none; }
.toggle[open] summary .t-chevron { transform: rotate(180deg); }
.toggle summary:hover { background: var(--bg-subtle); }
.toggle .t-content { padding: 0 20px 18px; color: var(--ink-2); font-size: 14.5px; line-height: 1.65; }

/* steps 안에 펼쳐지는 인라인 embed (토글 없이 이미지·설명 바로 노출) */
.steps .s-embed { margin: 10px 0 4px; }
.steps .s-embed > :first-child { margin-top: 0; }
.steps .s-embed > :last-child { margin-bottom: 0; }

/* "same as" reference block */
.refbox {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--bg-subtle); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px 22px; margin: 18px 0;
}
.refbox .r-text { font-size: 14.5px; color: var(--ink-2); }
.refbox .r-text b { color: var(--ink); }
.refbox a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--brand); flex: none; }

/* article footer nav */
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 48px 0 0; }
.article-nav a {
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; background: #fff;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.article-nav a:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.article-nav .dir { font-size: 12.5px; color: var(--ink-3); font-weight: 600; margin-bottom: 4px; }
.article-nav .ttl { font-size: 15px; font-weight: 700; }
.article-nav a.next { text-align: right; }

/* back to top */
.to-top { display: inline-flex; align-items: center; gap: 7px; margin: 36px 0 0; padding: 12px 18px;
  background: var(--bg-subtle); border: 1px solid var(--line); border-radius: 12px;
  font-size: 14px; font-weight: 600; color: var(--ink-2); }
.to-top:hover { background: var(--bg-muted); }

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 900px) {
  .services { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .quick-row { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .article-toc { display: none; }
  .nav-links { display: none; }
  .hero h1 { font-size: 32px; }
  .support { flex-direction: column; align-items: flex-start; }
  .article-nav { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .searchbox { min-width: 0; width: 40px; padding: 8px; }
  .searchbox input { display: none; }
  .shot.dual { grid-template-columns: 1fr; }
}
