@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --ink: #171B26;
  --slate: #68707E;
  --faint: #98A1AE;
  --line: #E6E1D6;
  --bg: #FAF8F3;
  --white: #FFFFFF;
  --orange: #E4692C;
  --orange-dark: #B84E1A;
  --orange-bg: #FBE3D0;
  --green: #1E7A3D;
  --green-bg: #E9F7EE;
  --blue: #2563EB;
  --blue-bg: #EAF1FE;
  --purple: #7C3AED;
  --purple-bg: #F1EBFE;
  --red: #D1453B;
  --red-bg: #FBEAE9;

  --font-display: 'Fraunces', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-lux: 0 12px 24px -8px rgba(228, 105, 44, 0.18), 0 4px 12px -4px rgba(0, 0, 0, 0.03);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }

/* ── Header ── */
header.top { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.header-left { display: flex; align-items: center; gap: 40px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-badge {
  width: 38px; height: 38px; border-radius: 10px; background: var(--orange); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display);
  font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.brand-name-block { display: flex; flex-direction: column; line-height: 1.25; }
.brand-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--ink); }
.brand-sub { font-size: 11.5px; color: var(--faint); font-weight: 600; }
.header-nav { display: flex; align-items: center; gap: 28px; }
.header-nav a { font-size: 14px; font-weight: 600; color: var(--slate); position: relative; }
.header-nav a:hover, .header-nav a.active { color: var(--orange-dark); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.header-signin {
  font-size: 13.5px; font-weight: 700; color: var(--ink); padding: 9px 16px; border-radius: 8px;
  border: 1.5px solid var(--line);
}
.header-signin:hover { border-color: var(--orange); color: var(--orange-dark); }

/* ── Hero / Search ── */
.hc-hero {
  padding: 76px 0 64px; text-align: center; position: relative; overflow: hidden;
  background:
    radial-gradient(560px 320px at 12% -10%, rgba(228, 105, 44, 0.16), transparent 65%),
    radial-gradient(520px 300px at 88% 0%, rgba(124, 58, 237, 0.14), transparent 65%),
    radial-gradient(480px 260px at 50% 110%, rgba(37, 99, 235, 0.08), transparent 65%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hc-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--orange-dark);
  background: var(--white); border: 1px solid var(--orange-bg); padding: 6px 14px; border-radius: 999px;
  margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.hc-hero h1 {
  font-family: var(--font-display); font-size: 44px; font-weight: 700; color: var(--ink);
  margin-bottom: 12px; letter-spacing: -0.01em; position: relative;
}
.hc-hero h1 .accent {
  background: linear-gradient(100deg, var(--orange) 0%, #C2410C 50%, var(--purple) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hc-hero p { font-size: 16px; color: var(--slate); margin-bottom: 32px; position: relative; }
.hc-search-wrap { max-width: 620px; margin: 0 auto; position: relative; }
.hc-search-input {
  width: 100%; height: 56px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--white);
  padding: 0 20px 0 50px; font-size: 15.5px; font-family: inherit; color: var(--ink); box-shadow: var(--shadow-md);
}
.hc-search-input:focus { outline: none; border-color: var(--orange); box-shadow: var(--shadow-lux); }
.hc-search-icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--faint);
}
.hc-search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 380px; overflow-y: auto; text-align: left; z-index: 40;
  display: none;
}
.hc-search-results.open { display: block; }
.hc-search-result {
  display: block; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 13.5px;
}
.hc-search-result:last-child { border-bottom: none; }
.hc-search-result:hover { background: var(--orange-bg); }
.hc-search-result .r-cat { font-size: 10.5px; font-weight: 700; color: var(--orange-dark); text-transform: uppercase; letter-spacing: 0.04em; }
.hc-search-result .r-title { font-weight: 700; color: var(--ink); margin-top: 2px; }
.hc-search-result .r-summary { color: var(--slate); font-size: 12.5px; margin-top: 2px; }
.hc-search-empty { padding: 16px 18px; color: var(--faint); font-size: 13px; }

/* ── Category grid ── */
.hc-section { padding: 8px 0 56px; }
.hc-section-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.hc-cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .hc-cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .hc-cat-grid { grid-template-columns: 1fr; } }

.hc-cat-card {
  background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--cat-color, var(--orange));
  border-radius: 14px; padding: 22px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px; transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.hc-cat-card::before {
  content: ''; position: absolute; top: -40px; right: -40px; width: 120px; height: 120px; border-radius: 50%;
  background: var(--cat-bg, var(--orange-bg)); opacity: 0.5; pointer-events: none;
  transition: transform .25s ease;
}
.hc-cat-card:hover {
  box-shadow: 0 14px 28px -12px var(--cat-shadow, rgba(228, 105, 44, 0.35)), var(--shadow-sm);
  transform: translateY(-3px);
}
.hc-cat-card:hover::before { transform: scale(1.25); }
.hc-cat-icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative; z-index: 1;
  background: linear-gradient(135deg, var(--cat-bg, var(--orange-bg)) 0%, var(--white) 130%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.03);
}
.hc-cat-icon svg { width: 23px; height: 23px; }
.hc-cat-card h3 { font-size: 16px; font-weight: 700; color: var(--ink); position: relative; z-index: 1; }
.hc-cat-card p { font-size: 13px; color: var(--slate); line-height: 1.5; position: relative; z-index: 1; }
.hc-cat-count {
  font-size: 11px; color: var(--cat-color, var(--orange-dark)); font-weight: 700; margin-top: 2px;
  position: relative; z-index: 1;
}

.hc-group-label {
  font-size: 12px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em;
  margin: 40px 0 16px;
}
.hc-group-label:first-child { margin-top: 0; }

/* ── Popular articles ── */
.hc-popular-list { display: flex; flex-direction: column; gap: 2px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.hc-popular-item { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink); }
.hc-popular-item:last-child { border-bottom: none; }
.hc-popular-item:hover { background: var(--bg); color: var(--orange-dark); }
.hc-popular-item .r-cat { font-size: 11px; color: var(--faint); font-weight: 600; }
.hc-popular-num {
  width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid; display: inline-flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0;
}

/* ── Breadcrumb ── */
.hc-breadcrumb { font-size: 13px; color: var(--faint); margin-bottom: 20px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hc-breadcrumb a { color: var(--slate); font-weight: 600; }
.hc-breadcrumb a:hover { color: var(--orange-dark); }

/* ── Category page ── */
.hc-cat-header { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
.hc-cat-header .hc-cat-icon { width: 52px; height: 52px; }
.hc-cat-header .hc-cat-icon svg { width: 26px; height: 26px; }
.hc-cat-header h1 { font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.hc-cat-header p { color: var(--slate); font-size: 14px; margin-top: 4px; }

.hc-article-list { display: flex; flex-direction: column; gap: 10px; }
.hc-article-item {
  background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.hc-article-item:hover { border-color: var(--orange); }
.hc-article-item .a-title { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.hc-article-item .a-summary { font-size: 12.5px; color: var(--slate); margin-top: 3px; }
.hc-article-item .a-arrow { color: var(--faint); flex-shrink: 0; }

/* ── Article page ── */
.hc-article-layout { display: grid; grid-template-columns: 1fr 240px; gap: 48px; align-items: start; }
@media (max-width: 860px) { .hc-article-layout { grid-template-columns: 1fr; } .hc-toc { display: none; } }

.hc-article h1 { font-family: var(--font-display); font-size: 30px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.hc-article-meta { font-size: 12.5px; color: var(--faint); margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.hc-article-body { font-size: 15px; color: var(--ink); line-height: 1.75; }
.hc-article-body h3 { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin: 32px 0 12px; }
.hc-article-body p { margin-bottom: 14px; color: var(--slate); }
.hc-article-body ul, .hc-article-body ol { margin: 0 0 16px 22px; color: var(--slate); }
.hc-article-body li { margin-bottom: 6px; }
.hc-article-body ol { counter-reset: step; list-style: none; margin-left: 0; }
.hc-article-body ol li { counter-increment: step; position: relative; padding-left: 34px; margin-bottom: 12px; }
.hc-article-body ol li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 7px;
  background: var(--orange-bg); color: var(--orange-dark); font-weight: 800; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.hc-note {
  background: var(--orange-bg); border-left: 3px solid var(--orange); border-radius: 8px; padding: 14px 16px;
  font-size: 13.5px; color: var(--ink); margin: 18px 0; line-height: 1.6;
}
.hc-note strong { color: var(--orange-dark); }
.hc-note.warn { background: var(--red-bg); border-left-color: var(--red); }
.hc-note.warn strong { color: var(--red); }
.hc-note.tip { background: var(--green-bg); border-left-color: var(--green); }
.hc-note.tip strong { color: var(--green); }

.hc-toc { position: sticky; top: 96px; }
.hc-toc-label { font-size: 11px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.hc-toc a { display: block; font-size: 13px; color: var(--slate); padding: 6px 0; border-left: 2px solid var(--line); padding-left: 12px; }
.hc-toc a:hover { color: var(--orange-dark); border-left-color: var(--orange); }

.hc-related { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.hc-related h4 { font-size: 13px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.hc-related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 620px) { .hc-related-grid { grid-template-columns: 1fr; } }

.hc-role-tag {
  display: inline-block; font-size: 10.5px; font-weight: 700; padding: 3px 10px; border-radius: 8px; margin-right: 6px;
}

/* ── Footer ── */
footer.hc-footer { background: var(--white); border-top: 1px solid var(--line); padding: 32px 0; margin-top: 40px; text-align: center; }
footer.hc-footer p { font-size: 13px; color: var(--faint); }
footer.hc-footer a { color: var(--slate); font-weight: 600; }
footer.hc-footer a:hover { color: var(--orange-dark); }

.hc-back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--slate); margin-bottom: 20px; }
.hc-back-link:hover { color: var(--orange-dark); }
