/* 내일상 brand layer */
:root {
  --naeilsang-blue: #2563eb;
  --naeilsang-blue-strong: #1d4ed8;
  --naeilsang-blue-ink: #173b7a;
  --naeilsang-blue-soft: #eff6ff;
  --naeilsang-line: #dbe7f7;
  --naeilsang-focus: rgba(37, 99, 235, .28);
}

.brand,
.footer-brand,
.brand-eyebrow {
  font-family: ui-rounded, "Arial Rounded MT Bold", "Pretendard", "SUIT", "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  font-weight: 900;
  font-synthesis: none;
  letter-spacing: -.055em;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  color: var(--naeilsang-blue) !important;
}

.site-header .brand {
  flex: 0 0 auto;
  font-size: 1.75rem !important;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.brand::before,
.brand::after,
.footer-brand::before,
.footer-brand::after {
  display: none !important;
  content: none !important;
}

.brand-eyebrow {
  color: var(--naeilsang-blue) !important;
}

.site-header {
  border-bottom-color: #e6edf7;
  background: rgba(255, 255, 255, .97);
}

.site-header .nav-shell {
  min-height: 72px;
}

.site-nav {
  gap: 28px;
}

.site-nav a {
  color: #53657a;
  font-weight: 600;
  text-decoration: none;
}

@media (min-width: 641px) {
  .site-nav a {
    position: relative;
    border-radius: 0;
    padding: 26px 0 23px;
    background: transparent !important;
  }

  .site-nav a::after {
    position: absolute;
    right: 0;
    bottom: 14px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: transparent;
    content: "";
  }

  .site-nav a:hover,
  .site-nav a[aria-current="page"] {
    background: transparent !important;
    color: var(--naeilsang-blue-strong);
  }

  .site-nav a[aria-current="page"]::after {
    background: var(--naeilsang-blue);
  }
}

.nav-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--naeilsang-line);
  border-radius: 10px;
  background: #fff;
  color: var(--naeilsang-blue-ink);
  box-shadow: none;
}

.home-hero {
  border-color: #e1e8f0 !important;
  box-shadow: none !important;
}

.home-hero h1 {
  letter-spacing: -.052em;
}

.search-box input,
.hero-search .btn,
.btn-primary,
button.btn-primary,
a.btn-primary {
  border-radius: 8px;
}

.btn-primary,
button.btn-primary,
a.btn-primary {
  border-color: var(--naeilsang-blue) !important;
  background: var(--naeilsang-blue) !important;
  box-shadow: none;
}

.btn-primary:hover,
button.btn-primary:hover,
a.btn-primary:hover {
  border-color: var(--naeilsang-blue-strong) !important;
  background: var(--naeilsang-blue-strong) !important;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--naeilsang-focus);
  outline-offset: 2px;
}

.site-footer .footer-copy,
.site-footer .footer-links a {
  color: #a9bdd5;
}

.site-nav a[href="/guides/"]:not([data-talk-label]),
.footer-links a[href="/guides/"]:not([data-talk-label]) {
  font-size: 0;
}

.site-nav a[href="/guides/"]:not([data-talk-label])::before,
.footer-links a[href="/guides/"]:not([data-talk-label])::before {
  font-size: .95rem;
  content: "내일상톡";
}

.home-section-heading a[href="/guides/"]:not([data-talk-label]) {
  font-size: 0;
}

.home-section-heading a[href="/guides/"]:not([data-talk-label])::before {
  font-size: .95rem;
  content: "내일상톡 보기";
}

.guide-hero {
  border: 1px solid #dbe7f7;
  background: linear-gradient(145deg, #ffffff 0%, #f6f9ff 100%);
  box-shadow: none;
}

.guide-hero h1 {
  color: #172554;
  letter-spacing: -.055em;
}

.guide-kicker {
  color: var(--naeilsang-blue-strong);
  font-weight: 800;
}

.guide-meta span {
  border-color: #dbe7f7;
  background: #fff;
  color: #5d6f86;
}

.guide-hub-card,
.guide-cluster-section,
.guide-discovery {
  box-shadow: none;
}

.guide-card-action {
  color: var(--naeilsang-blue-strong);
}

::selection {
  background: #dbeafe;
  color: #172554;
}

@media (max-width: 640px) {
  .site-header .nav-shell {
    min-height: 64px;
  }

  .site-header .brand {
    font-size: 1.55rem !important;
  }

  .site-nav {
    gap: 0;
  }

  .site-nav a {
    border-radius: 0;
    padding: 14px 4px;
    background: transparent !important;
  }

  .site-nav a[aria-current="page"] {
    color: var(--naeilsang-blue-strong);
    font-weight: 800;
  }

  .home-page .page-main {
    padding-top: 16px;
  }

  .home-hero-copy {
    padding: 24px 20px 26px;
  }

  .home-hero h1 {
    font-size: clamp(2rem, 10.5vw, 2.55rem);
    line-height: 1.14;
  }

  .home-lead {
    line-height: 1.68;
  }

  .guide-meta {
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary,
  .nav-toggle {
    transition: none !important;
  }
}

/* Korean-first typography system */
:root {
  --font-sans: "Pretendard Variable", "Pretendard", "SUIT Variable", "SUIT", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
  --font-rounded: ui-rounded, "Arial Rounded MT Bold", "Pretendard", "SUIT", "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
}

html {
  font-size: 16px;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: -.012em;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
  overflow-wrap: break-word;
}

button,
input,
select,
textarea {
  font-family: inherit;
  letter-spacing: inherit;
}

h1,
h2,
h3,
h4,
strong,
b {
  font-synthesis: none;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

.brand,
.footer-brand {
  font-family: var(--font-rounded);
}

.brand-eyebrow {
  font-family: var(--font-sans);
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -.018em;
}

.site-nav a {
  font-size: .9375rem;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -.015em;
}

.page-heading h1 {
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.042em;
}

.page-heading p {
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: -.012em;
}

.home-hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(2.75rem, 4.35vw, 3.5rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.052em;
}

.home-lead {
  font-size: 1.0625rem;
  font-weight: 450;
  line-height: 1.7;
  letter-spacing: -.014em;
}

.home-hero .search-box input {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -.012em;
}

.home-hero .search-box input::placeholder {
  font-weight: 450;
}

.home-quick-links > span,
.home-quick-links a {
  font-size: .875rem;
  line-height: 1.45;
}

.home-quick-links > span {
  font-weight: 700;
}

.home-quick-links a {
  font-weight: 600;
}

.home-privacy-note {
  font-size: .8125rem;
  line-height: 1.65;
}

.home-section-heading h2 {
  font-size: clamp(1.65rem, 2.45vw, 2rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.04em;
}

.home-section-heading p {
  font-size: .9375rem;
  line-height: 1.7;
  letter-spacing: -.012em;
}

.home-section-heading > a {
  font-size: .875rem;
  font-weight: 700;
}

.home-highlight-badge {
  font-size: .78125rem;
  font-weight: 800;
  letter-spacing: -.01em;
}

.home-highlight-banner strong {
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.55;
}

.home-task-list strong {
  font-size: 1.1875rem;
  font-weight: 750;
  line-height: 1.42;
  letter-spacing: -.025em;
}

.home-task-list > a > span:not(.home-task-icon) {
  font-size: .875rem;
  line-height: 1.68;
  letter-spacing: -.01em;
}

.home-task-list small {
  font-size: .84375rem;
  font-weight: 750;
}

.home-category-copy strong {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -.018em;
}

.home-category-copy small {
  font-size: .8125rem;
  line-height: 1.5;
}

.home-help-list span {
  font-size: .8125rem;
  font-weight: 750;
}

.home-help-list strong {
  font-size: .9375rem;
  font-weight: 650;
  line-height: 1.55;
  letter-spacing: -.016em;
}

.site-footer .footer-brand {
  font-size: 1.5rem;
  line-height: 1.1;
}

.site-footer .footer-copy,
.site-footer .footer-links a {
  font-size: .8125rem;
  line-height: 1.65;
}

@media (max-width: 640px) {
  .site-nav a {
    font-size: .875rem;
  }

  .brand-eyebrow {
    font-size: .875rem;
  }

  .home-hero h1 {
    font-size: clamp(2.05rem, 9.7vw, 2.5rem);
    line-height: 1.18;
    letter-spacing: -.047em;
  }

  .home-lead {
    font-size: .96875rem;
    line-height: 1.68;
  }

  .home-hero .search-box input {
    font-size: 1rem;
  }

  .home-section-heading h2 {
    font-size: 1.55rem;
    line-height: 1.32;
  }

  .home-section-heading p {
    font-size: .875rem;
  }

  .home-task-list strong {
    font-size: 1.125rem;
  }

  .home-task-list > a > span:not(.home-task-icon) {
    font-size: .875rem;
  }

  .home-category-copy strong {
    font-size: .96875rem;
  }

  .home-help-list strong {
    font-size: .90625rem;
  }
}

@media (max-width: 640px) {
  .site-header .nav-shell {
    position: relative;
    overflow: visible;
  }

  .site-header .site-nav {
    right: -16px !important;
    left: -16px !important;
    width: calc(100% + 32px) !important;
    max-width: none !important;
    box-sizing: border-box;
    overflow-x: hidden !important;
    white-space: normal !important;
  }

  .site-header .site-nav.is-open {
    display: flex;
  }

  .site-header .site-nav a {
    display: flex;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 52px;
    align-items: center;
    padding: 15px 20px !important;
    box-sizing: border-box;
    overflow: visible;
    color: #334155;
    font-size: 15px !important;
    line-height: 1.4 !important;
    text-overflow: clip;
    white-space: normal;
    word-break: keep-all;
  }

  .site-header .site-nav a[href="/guides/"] {
    font-size: 15px !important;
    line-height: 1.4 !important;
  }

  .site-header .site-nav a[href="/guides/"]::before {
    display: none !important;
    content: none !important;
  }
}

@font-face {
  font-family: "NaeilsangRound";
  src: url("https://cdn.jsdelivr.net/gh/sweetherofonts/fontshero_pack1/cafe24ssurround/cafe24ssurround-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.site-header .brand,
.site-footer .footer-brand {
  font-family: "NaeilsangRound", "Pretendard", "SUIT", "Noto Sans KR", sans-serif !important;
  font-weight: 400 !important;
  font-synthesis: none;
  font-kerning: normal;
  text-rendering: geometricPrecision;
}

.site-header .brand {
  font-size: 1.88rem !important;
  line-height: 1 !important;
  letter-spacing: -.075em !important;
}

.site-footer .footer-brand {
  font-size: 1.48rem !important;
  line-height: 1.05 !important;
  letter-spacing: -.068em !important;
}

.site-back-to-top,
.home-back-to-top {
  position: fixed;
  right: clamp(16px, 2.5vw, 30px);
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 100;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  border: 1px solid #dce5f1;
  border-radius: 50%;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .13);
  color: #31557d;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(.96);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.site-back-to-top.is-visible,
.home-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.site-back-to-top:hover,
.site-back-to-top:focus-visible,
.home-back-to-top:hover,
.home-back-to-top:focus-visible {
  border-color: #a9c2f5;
  box-shadow: 0 12px 30px rgba(37, 99, 235, .16);
  color: #2563eb;
}

.site-back-to-top:focus-visible,
.home-back-to-top:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .22);
  outline-offset: 3px;
}

.site-back-to-top svg,
.home-back-to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

@media (max-width: 640px) {
  .site-header .brand {
    font-size: 1.68rem !important;
    letter-spacing: -.07em !important;
  }

  .site-footer .footer-brand {
    font-size: 1.4rem !important;
  }

  .site-back-to-top,
  .home-back-to-top {
    right: 15px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: 44px;
    height: 44px;
  }

  .site-header .nav-shell .site-nav {
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow-x: hidden !important;
  }

  .site-header .nav-shell .site-nav a {
    width: 100% !important;
    max-width: 100% !important;
    padding-inline: 20px !important;
    box-sizing: border-box;
    overflow: visible !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    text-overflow: clip !important;
    word-break: keep-all;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-back-to-top,
  .home-back-to-top {
    transition: none;
  }
}
