:root {
  --blue: #1d4ed8;
  --blue-dark: #173a8a;
  --green: #047857;
  --amber: #b45309;
  --red: #b91c1c;
  --text: #111827;
  --muted: #667085;
  --soft: #f6f8fb;
  --line: #d9e0ea;
  --card: #ffffff;
  --ink-soft: #344054;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--soft);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--soft);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  max-width: calc(100% - 20px);
  padding: 10px 14px;
  color: #fff;
  background: var(--blue-dark);
  border-radius: 8px;
  font-weight: 900;
  transform: translateY(-140%);
  transition: transform .16s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(1120px, calc(100% - 24px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  color: var(--blue-dark);
  font-size: 23px;
  font-weight: 900;
  white-space: nowrap;
}

.tagline {
  display: none;
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: none;
  margin-left: auto;
  gap: 18px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

.hero {
  background: #eef4ff;
  border-bottom: 1px solid #c7d7fe;
}

.hero-inner {
  padding: 36px 0 24px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.hero h1 {
  margin: 0;
  color: #0f172a;
  font-size: 38px;
  line-height: 1.16;
  letter-spacing: 0;
}

.hero-copy > p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
}

.search-panel {
  margin-top: 22px;
  padding: 14px;
  background: var(--card);
  border: 1px solid #b9cbf7;
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(31, 41, 55, .08);
}

.search-panel label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.search-box {
  display: grid;
  gap: 8px;
}

.search-box input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 0 14px;
  color: var(--text);
  background: #fff;
  font-size: 16px;
}

.search-box input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .14);
}

.search-box button,
.quick-actions button {
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 900;
}

.search-box button {
  color: #fff;
  background: var(--blue);
  padding: 0 16px;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.quick-actions button {
  min-height: 38px;
  padding: 0 12px;
  color: var(--blue-dark);
  background: #f7fbff;
  border-color: #c7d7fe;
  font-size: 14px;
}

.suggested-queries {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.suggested-queries strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 13px;
}

.suggested-queries div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggested-queries button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.workbench {
  display: grid;
  gap: 18px;
  padding-top: 24px;
}

.action-list-panel,
.preview-panel {
  min-width: 0;
}

.section {
  padding-top: 30px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.section-head a {
  flex: none;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.action-card-list {
  display: grid;
  gap: 10px;
}

.action-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 15px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.action-card:hover,
.action-card:focus-visible,
.action-card.is-active {
  border-color: var(--blue);
  box-shadow: 0 8px 18px rgba(31, 41, 55, .08);
}

.action-card:focus-visible {
  outline: 3px solid rgba(29, 78, 216, .18);
  outline-offset: 2px;
}

.card-main {
  min-width: 0;
}

.label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 8px;
  padding: 0 8px;
  color: var(--green);
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.action-card strong {
  display: block;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
}

.action-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.action-card small {
  color: #7a8699;
  font-size: 12px;
}

.empty-state {
  margin-top: 12px;
  padding: 18px;
  color: var(--ink-soft);
  background: #fff8e6;
  border: 1px solid #f7d37b;
  border-radius: 8px;
  font-weight: 800;
}

.related-results {
  margin-top: 14px;
}

.related-results p {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 900;
}

.related-card-list {
  display: grid;
  gap: 8px;
}

.related-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.related-card strong {
  color: #111827;
  font-size: 14px;
  line-height: 1.35;
}

.related-card span {
  color: var(--muted);
  font-size: 13px;
}

.preview-panel {
  align-self: start;
  order: -1;
}

.query-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  max-width: 100%;
  margin-bottom: 10px;
  padding: 0 12px;
  color: var(--blue-dark);
  background: #eaf1ff;
  border: 1px solid #c7d7fe;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.preview-card {
  padding: 18px;
  background: var(--card);
  border: 1px solid #b9cbf7;
  border-radius: 8px;
}

.preview-card h2,
.preview-card h3 {
  margin: 0;
  color: #111827;
  letter-spacing: 0;
}

.preview-card h2 {
  font-size: 22px;
  line-height: 1.28;
}

.preview-card h3 {
  margin-top: 18px;
  font-size: 15px;
}

.preview-card > p {
  margin: 10px 0 0;
  color: var(--muted);
}

.steps,
.checklist {
  margin: 10px 0 0;
  padding-left: 20px;
}

.steps li,
.checklist li {
  margin: 6px 0;
}

.steps {
  color: var(--blue-dark);
  font-weight: 800;
}

.checklist {
  color: var(--ink-soft);
}

.preview-links {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.primary-link,
.secondary-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 900;
  text-align: center;
}

.primary-link {
  color: #fff;
  background: var(--green);
}

.secondary-link {
  color: var(--blue-dark);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.note {
  padding: 12px;
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  font-size: 14px;
}

.category-grid,
.break-grid {
  display: grid;
  gap: 10px;
}

.category-card,
.break-grid a {
  display: block;
  min-width: 0;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.category-card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  font-size: 20px;
}

.category-card strong,
.break-grid strong {
  display: block;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
}

.category-card p {
  min-height: 0;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.category-card em {
  color: var(--blue);
  font-style: normal;
  font-weight: 900;
}

.break-section {
  padding-bottom: 36px;
}

.break-grid span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
}

.page {
  max-width: 820px;
  padding: 34px 0 48px;
}

.page h1 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: 0;
}

.page h2 {
  margin-top: 30px;
  color: #111827;
  font-size: 22px;
  letter-spacing: 0;
}

.page h3 {
  margin-top: 22px;
  font-size: 18px;
  letter-spacing: 0;
}

.page p,
.page li {
  color: var(--ink-soft);
}

.page a {
  color: var(--blue);
  font-weight: 800;
}

.page blockquote {
  margin: 20px 0;
  padding: 14px 16px;
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 4px solid var(--amber);
  border-radius: 8px;
}

.page blockquote p {
  margin: 0;
  color: inherit;
  font-weight: 800;
}

.tool-page {
  max-width: 920px;
}

.tool-widget {
  margin-top: 24px;
  padding: 18px;
  background: var(--card);
  border: 1px solid #b9cbf7;
  border-radius: 8px;
}

.tool-widget-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.tool-widget-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.tool-grid {
  display: grid;
  gap: 12px;
}

.tool-field {
  margin-top: 16px;
}

.tool-field label,
.tool-check {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 900;
}

.tool-field input,
.tool-field select,
.tool-field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.tool-field textarea {
  min-height: 180px;
  resize: vertical;
}

.tool-field input:focus,
.tool-field select:focus,
.tool-field textarea:focus {
  border-color: var(--blue);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .14);
}

.tool-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.tool-check input {
  width: 18px;
  height: 18px;
}

.tool-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.tool-actions button {
  min-height: 42px;
  padding: 0 14px;
  color: var(--blue-dark);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.tool-results {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.tool-results div {
  min-width: 0;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tool-results span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tool-results strong {
  display: block;
  margin-top: 4px;
  color: #111827;
  font-size: 22px;
  line-height: 1.25;
  word-break: keep-all;
}

.tool-status,
.tool-privacy {
  margin: 14px 0 0;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
}

.tool-status {
  color: var(--blue-dark);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  font-weight: 900;
}

.tool-privacy {
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.tools-hub {
  max-width: 1040px;
}

.tool-hub-section {
  margin-top: 28px;
}

.tool-hub-grid {
  display: grid;
  gap: 10px;
}

.tool-hub-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

a.tool-hub-card:hover,
a.tool-hub-card:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 8px 18px rgba(31, 41, 55, .08);
}

a.tool-hub-card:focus-visible {
  outline: 3px solid rgba(29, 78, 216, .18);
  outline-offset: 2px;
}

.tool-hub-card strong {
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
}

.tool-hub-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tool-hub-card small {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.tool-hub-card-muted small {
  color: var(--amber);
}

.category-page-cards {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.not-found-actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.not-found-actions a {
  display: block;
  min-width: 0;
  padding: 14px;
  color: var(--blue-dark);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-weight: 900;
}

.site-footer {
  margin-top: 24px;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 28px 0;
}

.footer-inner {
  display: grid;
  gap: 18px;
}

.footer-inner strong {
  color: var(--blue-dark);
  font-size: 24px;
  font-weight: 900;
}

.footer-inner p {
  margin: 4px 0 0;
  color: var(--muted);
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.copyright {
  width: min(1120px, calc(100% - 24px));
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 13px;
}

@media (min-width: 700px) {
  .tagline {
    display: inline;
  }

  .search-box {
    grid-template-columns: 1fr auto;
  }

  .search-box button {
    min-width: 154px;
  }

  .action-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .action-card small {
    text-align: right;
    white-space: nowrap;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-grid,
  .tool-results,
  .tool-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .break-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

@media (min-width: 960px) {
  .container {
    width: min(1120px, calc(100% - 40px));
  }

  .nav {
    display: flex;
  }

  .hero-inner {
    padding: 54px 0 34px;
  }

  .hero h1 {
    font-size: 56px;
  }

  .search-panel {
    margin-top: 26px;
    padding: 18px;
  }

  .workbench {
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
    gap: 22px;
  }

  .preview-panel {
    order: 0;
    position: sticky;
    top: 88px;
  }

  .category-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .tool-hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
