/* ============================================================
   shared/site.css — sak3.info common design tokens + components
   Both /calculator/ and /petdb/ link this. Page-specific overrides
   live in each page's <style>.
   ============================================================ */

:root {
  /* Color tokens */
  --c-bg: #f5f5f0;
  --c-surface: #fff;
  --c-surface-alt: #fafaf8;
  --c-text: #1a1a1a;
  --c-text-2: #666;
  --c-text-3: #888;
  --c-text-4: #aaa;
  --c-text-5: #bbb;
  --c-border: #e0e0d8;
  --c-border-2: #ddd;
  --c-border-soft: #eee;

  /* Accent + semantic */
  --c-accent: #1855c0;
  --c-accent-soft: #e8eeff;
  --c-accent-bg: #f8faff;
  --c-accent-border: #c8d8ff;
  --c-success: #1a7a1a;
  --c-warn: #c97a00;
  --c-danger: #c03030;
  --c-purple: #7c3aed;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', sans-serif;

  /* Spacing / radius */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 10px;
  --r-xl: 12px;

  /* Layout */
  --container-max: 800px;
}

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

body {
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100dvh;
}

/* ── 공통 top nav (계산기 / 펫DB 탭) ──────────────── */
.top-nav {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 12px 1.25rem 0;
  display: flex;
  gap: 6px;
  font-size: 13px;
}
.top-nav-inner {
  display: flex;
  gap: 4px;
  background: var(--c-surface);
  border: 0.5px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 4px;
  width: 100%;
  max-width: 280px;
  font-family: var(--font-sans);
}
.top-nav-inner > * {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  border-radius: 7px;
  font-size: 13px;
}
.top-nav-inner a {
  color: var(--c-text-2);
  text-decoration: none;
  transition: background .15s;
}
.top-nav-inner a:hover { background: var(--c-bg); }
.top-nav-inner .top-nav-active {
  background: var(--c-text);
  color: var(--c-surface);
  font-weight: 600;
}

/* ── 공통 sticky header bar ──────────────── */
.site-header {
  background: var(--c-surface);
  border-bottom: 0.5px solid var(--c-border);
  padding: 1.25rem 0 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.site-header h1 {
  font-size: 22px;
  font-weight: 500;
  color: var(--c-text);
}
.site-header h1 span {
  font-weight: 400;
  font-size: 13px;
  color: var(--c-text-3);
}
.site-header .subtitle {
  font-size: 12px;
  color: var(--c-text-3);
  margin-top: 4px;
}

/* ── 공통 main content container ──────────────── */
.site-main {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}
