:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #172033;
  --muted: #5f6b7a;
  --line: #dfe4ea;
  --accent: #2563eb;
  --accent-soft: #e8f0ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

.site-header,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
}

.brand {
  font-size: 1.1rem;
  font-weight: 800;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a {
  padding: 6px 0;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent);
}

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

.hero,
.page-intro {
  padding: 48px 0 32px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.18;
}

h2 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.hero p,
.page-intro p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
}

.card-grid,
.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tool-card,
.content-card,
.placeholder-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.tool-card,
.content-card {
  padding: 24px;
}

.tool-card {
  min-height: 180px;
  transition: border-color 160ms ease, transform 160ms ease;
}

.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tool-card p,
.content-card p {
  margin-bottom: 0;
  color: var(--muted);
}

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

.placeholder-box {
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  background: var(--accent-soft);
  text-align: center;
  font-weight: 700;
}

.notice-panel,
.calculator-shell,
.form-section,
.result-section,
.analysis-note-section,
.scenario-section,
.warning-section,
.seo-section,
.disclaimer-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.notice-panel {
  margin-bottom: 18px;
  padding: 18px 20px;
  color: var(--muted);
}

.notice-panel p,
.disclaimer-section p {
  margin-bottom: 6px;
}

.notice-panel p:last-child,
.disclaimer-section p:last-child {
  margin-bottom: 0;
}

.calculator-shell {
  padding: 22px;
}

.tabs {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 20px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f7;
}

.tabs input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.tabs label {
  min-width: 96px;
  padding: 9px 14px;
  border-radius: 6px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
  cursor: pointer;
}

.tabs input:checked + label {
  color: var(--accent);
  background: var(--surface);
  box-shadow: 0 1px 4px rgb(15 23 42 / 10%);
}

.calc-form {
  display: grid;
  gap: 18px;
}

.form-section,
.result-section,
.scenario-section,
.warning-section,
.seo-section,
.disclaimer-section {
  padding: 22px;
}

.form-section h2,
.result-section h2,
.scenario-section h2,
.warning-section h2,
.seo-section h2,
.disclaimer-section h2 {
  font-size: 1.12rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.form-grid input,
.form-grid select,
.confidence-grid select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  background: #ffffff;
  font: inherit;
}

.form-grid input:focus,
.form-grid select:focus,
.confidence-grid select:focus,
.source-options input:focus-visible,
.button-row button:focus-visible,
.tabs input:focus-visible + label {
  outline: 3px solid rgb(37 99 235 / 22%);
  outline-offset: 2px;
}

.helper-text,
.confidence-text,
.warning-section p {
  color: var(--muted);
}

.warning-section p {
  border-radius: 8px;
  padding: 12px 14px;
  background: #f8fafc;
}

.warning-section p[data-type="error"] {
  color: #b42318;
  background: #fff1f0;
}

.warning-section p[data-type="success"] {
  color: #047857;
  background: #ecfdf3;
}

.helper-text {
  margin-bottom: 16px;
}

.redevelopment-only {
  display: none;
}

.calculator-shell:has(#tab-redevelopment:checked) .rebuild-only {
  display: none;
}

.calculator-shell:has(#tab-redevelopment:checked) .redevelopment-only {
  display: block;
}

.source-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 10px;
}

.source-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.confidence-text {
  margin-bottom: 0;
  font-weight: 800;
}

.confidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.confidence-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-row button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.button-row .primary-button {
  border-color: var(--accent);
  color: #ffffff;
  background: var(--accent);
}

.result-section,
.analysis-note-section,
.scenario-section,
.warning-section,
.seo-section,
.disclaimer-section {
  margin-top: 18px;
}

.seo-section h2 {
  margin-bottom: 18px;
}

.text-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.text-section-grid article,
.guide-section,
.prompt-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.text-section-grid article,
.guide-section {
  padding: 20px;
}

.text-section-grid h3,
.guide-section h2 {
  margin-bottom: 10px;
  font-size: 1.06rem;
}

.text-section-grid p,
.guide-section p {
  margin-bottom: 0;
  color: var(--muted);
}

.text-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 18px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 9px 14px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 800;
}

.guide-section-list {
  display: grid;
  gap: 14px;
}

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.prompt-card {
  display: grid;
  align-content: space-between;
  gap: 18px;
  min-height: 260px;
  padding: 22px;
}

.prompt-card h2 {
  font-size: 1.14rem;
}

.prompt-card p {
  color: var(--muted);
}

.card-label {
  margin-bottom: 8px;
  color: var(--accent) !important;
  font-size: 0.9rem;
  font-weight: 800;
}

.use-case {
  margin-bottom: 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.use-case strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.prompt-card button {
  justify-self: start;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--muted);
  background: #eef2f7;
  font: inherit;
  font-weight: 800;
}

.analysis-note-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  border: 0;
  background: transparent;
}

.analysis-note-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
}

.analysis-note-card h2 {
  margin-bottom: 12px;
  font-size: 1.08rem;
}

.analysis-note-card p {
  margin-bottom: 8px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.analysis-note-card p:last-child {
  margin-bottom: 0;
}

.confidence-text[data-level="높음"] {
  color: #047857;
}

.confidence-text[data-level="보통"] {
  color: #9a5b00;
}

.confidence-text[data-level="낮음"] {
  color: #b42318;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.result-card,
.scenario-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.result-card {
  min-height: 112px;
  padding: 16px;
}

.result-card span {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.result-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1.15rem;
  line-height: 1.35;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.scenario-card {
  padding: 18px;
}

.scenario-card h3 {
  margin: 0 0 14px;
  font-size: 1.04rem;
}

.scenario-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.scenario-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.scenario-card dl div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.scenario-card dt {
  color: var(--muted);
  font-weight: 700;
}

.scenario-card dd {
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
  font-weight: 800;
}

.disclaimer-section {
  color: var(--muted);
  background: #fffdf5;
}

.disclaimer-section h2 {
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 32px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .container {
    padding-top: 12px;
  }

  .hero,
  .page-intro {
    padding: 32px 0 24px;
  }

  .card-grid,
  .placeholder-grid {
    grid-template-columns: 1fr;
  }

  .calculator-shell,
  .form-section,
  .result-section,
  .analysis-note-card,
  .scenario-section,
  .warning-section,
  .seo-section,
  .disclaimer-section {
    padding: 18px;
  }

  .tabs,
  .button-row {
    width: 100%;
  }

  .tabs label,
  .button-row button {
    flex: 1 1 auto;
  }

  .form-grid,
  .confidence-grid,
  .result-grid,
  .analysis-note-section,
  .text-section-grid,
  .prompt-grid,
  .scenario-grid {
    grid-template-columns: 1fr;
  }

  .prompt-card {
    min-height: auto;
  }

  .tool-card {
    min-height: 140px;
  }
}
