@charset "utf-8";

[hidden] {
  display: none !important;
}

/* ========================================================
   Color Tokens & Minimal Theme System
   ======================================================== */
:root {
  color-scheme: light dark;

  --bg-light: #fafafa;
  --bg-dark: #0b0d12;
  --surface-light: #ffffff;
  --surface-dark: #131722;
  --surface-muted-light: #f3f4f6;
  --surface-muted-dark: #1a202e;

  --text-light: #111827;
  --text-dark: #f3f4f6;
  --muted-light: #6b7280;
  --muted-dark: #9ca3af;

  --border-light: #e5e7eb;
  --border-dark: #262e40;
  --input-border-light: #9ca3af;
  --input-border-dark: #4b5563;

  --brand-light: #2563eb;
  --brand-dark: #60a5fa;
  --brand-hover-light: #1d4ed8;
  --brand-hover-dark: #93c5fd;
  --brand-fg-light: #ffffff;
  --brand-fg-dark: #0b0d12;

  --safe-light: #15803d;
  --safe-dark: #4ade80;
  --safe-bg-light: #f0fdf4;
  --safe-bg-dark: rgba(34, 197, 94, 0.14);

  --warn-light: #b45309;
  --warn-dark: #fbbf24;
  --warn-bg-light: #fffbeb;
  --warn-bg-dark: rgba(245, 158, 11, 0.14);

  --danger-light: #b91c1c;
  --danger-dark: #f87171;
  --danger-bg-light: #fef2f2;
  --danger-bg-dark: rgba(239, 68, 68, 0.14);

  --info-light: #1d4ed8;
  --info-dark: #60a5fa;
  --info-bg-light: #eff6ff;
  --info-bg-dark: rgba(59, 130, 246, 0.14);

  --bg: var(--bg-light);
  --card: var(--surface-light);
  --surface-muted: var(--surface-muted-light);
  --text: var(--text-light);
  --muted: var(--muted-light);
  --border: var(--border-light);
  --input-border: var(--input-border-light);
  --brand: var(--brand-light);
  --brand-hover: var(--brand-hover-light);
  --brand-fg: var(--brand-fg-light);
  --accent: var(--brand-light);
  --safe: var(--safe-light);
  --safe-bg: var(--safe-bg-light);
  --warn: var(--warn-light);
  --warn-bg: var(--warn-bg-light);
  --danger: var(--danger-light);
  --danger-bg: var(--danger-bg-light);
  --info: var(--info-light);
  --info-bg: var(--info-bg-light);
  --scrollbar-track: #e5e7eb;
  --scrollbar-thumb: #6b7280;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--bg-dark);
    --card: var(--surface-dark);
    --surface-muted: var(--surface-muted-dark);
    --text: var(--text-dark);
    --muted: var(--muted-dark);
    --border: var(--border-dark);
    --input-border: var(--input-border-dark);
    --brand: var(--brand-dark);
    --brand-hover: var(--brand-hover-dark);
    --brand-fg: var(--brand-fg-dark);
    --accent: var(--brand-dark);
    --safe: var(--safe-dark);
    --safe-bg: var(--safe-bg-dark);
    --warn: var(--warn-dark);
    --warn-bg: var(--warn-bg-dark);
    --danger: var(--danger-dark);
    --danger-bg: var(--danger-bg-dark);
    --info: var(--info-dark);
    --info-bg: var(--info-bg-dark);
    --scrollbar-track: #1a202e;
    --scrollbar-thumb: #6b7280;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
  }
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) {
  color-scheme: dark;
}

:root:has(> head > meta[name="color-scheme"][content="light"]) {
  color-scheme: light;
}

@supports (color: light-dark(white, black)) {
  :root {
    --bg: light-dark(var(--bg-light), var(--bg-dark));
    --card: light-dark(var(--surface-light), var(--surface-dark));
    --surface-muted: light-dark(var(--surface-muted-light), var(--surface-muted-dark));
    --text: light-dark(var(--text-light), var(--text-dark));
    --muted: light-dark(var(--muted-light), var(--muted-dark));
    --border: light-dark(var(--border-light), var(--border-dark));
    --input-border: light-dark(var(--input-border-light), var(--input-border-dark));
    --brand: light-dark(var(--brand-light), var(--brand-dark));
    --brand-hover: light-dark(var(--brand-hover-light), var(--brand-hover-dark));
    --brand-fg: light-dark(var(--brand-fg-light), var(--brand-fg-dark));
    --accent: light-dark(var(--brand-light), var(--brand-dark));
    --safe: light-dark(var(--safe-light), var(--safe-dark));
    --safe-bg: light-dark(var(--safe-bg-light), var(--safe-bg-dark));
    --warn: light-dark(var(--warn-light), var(--warn-dark));
    --warn-bg: light-dark(var(--warn-bg-light), var(--warn-bg-dark));
    --danger: light-dark(var(--danger-light), var(--danger-dark));
    --danger-bg: light-dark(var(--danger-bg-light), var(--danger-bg-dark));
    --info: light-dark(var(--info-light), var(--info-dark));
    --info-bg: light-dark(var(--info-bg-light), var(--info-bg-dark));
    --scrollbar-track: light-dark(#e5e7eb, #1a202e);
    --scrollbar-thumb: light-dark(#6b7280, #6b7280);
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  }
}

:root:has(> head > meta[name="color-scheme"][content="light"]) {
  --bg: var(--bg-light);
  --card: var(--surface-light);
  --surface-muted: var(--surface-muted-light);
  --text: var(--text-light);
  --muted: var(--muted-light);
  --border: var(--border-light);
  --brand: var(--brand-light);
  --brand-hover: var(--brand-hover-light);
  --brand-fg: var(--brand-fg-light);
  --accent: var(--brand-light);
  --safe: var(--safe-light);
  --safe-bg: var(--safe-bg-light);
  --warn: var(--warn-light);
  --warn-bg: var(--warn-bg-light);
  --danger: var(--danger-light);
  --danger-bg: var(--danger-bg-light);
  --info: var(--info-light);
  --info-bg: var(--info-bg-light);
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) {
  --bg: var(--bg-dark);
  --card: var(--surface-dark);
  --surface-muted: var(--surface-muted-dark);
  --text: var(--text-dark);
  --muted: var(--muted-dark);
  --border: var(--border-dark);
  --brand: var(--brand-dark);
  --brand-hover: var(--brand-hover-dark);
  --brand-fg: var(--brand-fg-dark);
  --accent: var(--brand-dark);
  --safe: var(--safe-dark);
  --safe-bg: var(--safe-bg-dark);
  --warn: var(--warn-dark);
  --warn-bg: var(--warn-bg-dark);
  --danger: var(--danger-dark);
  --danger-bg: var(--danger-bg-dark);
  --info: var(--info-dark);
  --info-bg: var(--info-bg-dark);
}

/* ========================================================
   Base & Typography
   ======================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  accent-color: var(--brand);
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: Pretendard, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

a {
  color: var(--brand);
  text-underline-offset: 3px;
}

:where(a:any-link, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link {
  position: fixed;
  inset-block-start: 0.75rem;
  inset-inline-start: 0.75rem;
  z-index: 2000;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
}

.container {
  max-width: 880px;
  margin-inline: auto;
  padding-inline: 20px;
}

.page {
  padding-block: 40px 72px;
  width: 100%;
}

/* ========================================================
   Minimal Site Header & Responsive Navbar
   ======================================================== */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 1000;
  width: 100%;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: 960px;
  margin-inline: auto;
  padding: 0 20px;
  min-block-size: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header__inner>* {
  flex-shrink: 0;
  white-space: nowrap;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.3px;
  min-block-size: 40px;
}

.site-logo__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--brand);
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
}

/* Collapsed Popover Navigation (Default / Mobile) */
.menu-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-block-size: 38px;
  min-inline-size: 40px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  anchor-name: --menu-button;
}

.menu-button:hover {
  background: var(--surface-muted);
}

.site-menu {
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-md);
}

.site-menu[popover] {
  position: fixed;
  inset: auto;
  inset-block-start: 4rem;
  inset-block-start: anchor(--menu-button bottom);
  inset-inline-end: 1rem;
  inline-size: min(82dvw, 17rem);
  max-inline-size: calc(100dvw - 2rem);
  block-size: fit-content;
  max-block-size: calc(100dvh - 5rem);
  margin-block-start: 0.35rem;
  overflow: auto;
}

.site-menu[popover]:not(:is(:popover-open, .\:popover-open)) {
  display: none;
}

.site-menu[popover]:is(:popover-open, .\:popover-open) {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-menu::backdrop {
  background: rgba(0, 0, 0, 0.25);
}

.site-nav__link {
  display: flex;
  align-items: center;
  min-block-size: 40px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-nav__link:hover {
  color: var(--text);
  background: var(--surface-muted);
}

.site-nav__link[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
  background: var(--surface-muted);
}

/* Wide Inline Layout (Clean minimal text links) */
.site-header.is-wide .menu-button {
  display: none;
}

.site-header.is-wide .site-menu {
  position: static;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 22px;
  inline-size: auto;
  max-inline-size: none;
  block-size: auto;
  max-block-size: none;
  overflow: visible;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.site-header.is-wide .site-menu::backdrop {
  display: none;
}

.site-header.is-wide .site-nav__link {
  min-block-size: 60px;
  padding: 0 2px;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  position: relative;
}

.site-header.is-wide .site-nav__link:hover {
  background: transparent;
  color: var(--text);
}

.site-header.is-wide .site-nav__link[aria-current="page"] {
  background: transparent;
  color: var(--text);
  font-weight: 700;
}

.site-header.is-wide .site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  height: 2px;
  background: var(--text);
}

.site-header.is-measuring * {
  transition: none !important;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 36px;
  min-block-size: 36px;
  padding: 6px;
  border-radius: var(--radius-sm);
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.theme-toggle .icon-to-light {
  display: none;
}

.theme-toggle .icon-to-dark {
  display: inline-flex;
}

@media (prefers-color-scheme: dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .theme-toggle .icon-to-dark {
    display: none;
  }

  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .theme-toggle .icon-to-light {
    display: inline-flex;
  }
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-toggle .icon-to-dark {
  display: none;
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-toggle .icon-to-light {
  display: inline-flex;
}

.header-ext-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}

.header-ext-link:hover {
  color: var(--text);
  background: var(--surface-muted);
}

@media (max-width: 480px) {
  .header-ext-link {
    display: none;
  }
}

@media (forced-colors: active) {
  .site-header.is-wide .site-nav__link[aria-current="page"]::after {
    background: Highlight;
  }

  .site-menu {
    border: 2px solid CanvasText;
  }
}

/* ========================================================
   Hero & Page Headings (Simple, Zero Clutter)
   ======================================================== */
.breadcrumb {
  margin-bottom: 14px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--text);
  text-decoration: underline;
}

.breadcrumb li+li::before {
  content: "/";
  margin-inline-end: 6px;
  color: var(--border);
}

.home-intro {
  margin-bottom: 24px;
}

.home-intro__title {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.home-intro__desc {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.page-hero {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.page-hero__title {
  margin: 0 0 8px;
  font-size: clamp(22px, 3.6vw, 28px);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.35;
}

.page-hero__desc {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  max-width: 68ch;
}

.page-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

/* ========================================================
   Buttons
   ======================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-block-size: 44px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.88;
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--text);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========================================================
   Home Analyzer Card (Focused & Clean)
   ======================================================== */
.hero-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 44px 20px;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--brand);
  background: var(--surface-muted);
}

.dropzone__icon {
  color: var(--muted);
}

.dropzone__text {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
}

.dropzone__sub {
  font-size: 12.5px;
  color: var(--muted);
}

.file-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--brand);
  border-radius: 12px;
  background: var(--surface-muted);
}

.file-card__info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.file-card__icon {
  color: var(--brand);
  flex-shrink: 0;
}

.file-card__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.file-card__name {
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-card__size {
  font-size: 12.5px;
  color: var(--muted);
}

.btn-cancel-file {
  flex-shrink: 0;
  min-block-size: 36px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}

.btn-cancel-file:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.btn-analyze-action {
  min-block-size: 50px;
  font-size: 15.5px;
  width: 100%;
}

.sample-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.btn-sample {
  min-block-size: 32px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

.btn-sample:hover {
  border-color: var(--text);
}

.terms-implied {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.terms-implied a {
  color: var(--muted);
  text-decoration: underline;
}

/* Simple Home Directory Grid */
.home-links-section {
  border-top: 1px solid var(--border);
  padding-top: 28px;
}

.home-links-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}

.simple-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.simple-link-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease;
}

.simple-link-card:hover {
  border-color: var(--text);
}

.simple-link-card strong {
  font-size: 15px;
  font-weight: 700;
}

.simple-link-card span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ========================================================
   30-Second Registry Trap Quiz (Simple Interactive Experience)
   ======================================================== */
.quiz-section {
  margin-bottom: 40px;
}

.quiz-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.quiz-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.quiz-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.quiz-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quiz-tab {
  min-block-size: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.quiz-tab[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.quiz-doc-preview {
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.quiz-doc-meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 6px;
}

.quiz-doc-highlight {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  font-weight: 700;
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quiz-feedback {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.quiz-feedback--danger {
  border-inline-start: 4px solid var(--danger);
  background: var(--danger-bg);
}

.quiz-feedback__title {
  margin: 0 0 6px;
  font-size: 14.5px;
  font-weight: 800;
}

.quiz-feedback__actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Plain-language translation block inside report */
.plain-verdict {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
}

.plain-verdict--danger {
  border-inline-start: 4px solid var(--danger);
  background: var(--danger-bg);
}

.plain-verdict--warn {
  border-inline-start: 4px solid var(--warn);
  background: var(--warn-bg);
}

.plain-verdict--safe {
  border-inline-start: 4px solid var(--safe);
  background: var(--safe-bg);
}

.plain-verdict__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
}

.plain-verdict__desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
}

.risk-card__plain {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.glossary-plain {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--bg);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.copy-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.copy-tip {
  font-size: 12px;
  font-weight: 600;
  color: var(--safe);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.copy-wrap:has([data-copied]) .copy-tip {
  opacity: 1;
}

.copy-wrap:has([data-failed]) .copy-tip {
  opacity: 1;
  color: var(--danger);
}

/* ========================================================
   Subpage Content & Cards (Clean Editorial Layout)
   ======================================================== */
.section-block {
  margin-bottom: 40px;
}

.section-head {
  margin-bottom: 18px;
}

.section-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.section-desc {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.article-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.guide-card,
.case-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.guide-card h2,
.case-card h3 {
  margin: 0 0 10px;
  font-size: 18.5px;
  font-weight: 800;
}

.guide-card h3 {
  margin: 18px 0 6px;
  font-size: 15.5px;
  font-weight: 700;
}

.guide-card p,
.case-card p {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.75;
}

.guide-card p:last-child,
.case-card p:last-child {
  margin-bottom: 0;
}

.guide-card ul,
.guide-card ol {
  margin: 0 0 10px;
  padding-inline-start: 20px;
  font-size: 14.5px;
}

.guide-card li {
  margin-bottom: 6px;
}

.toc-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.toc-box__title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.toc-box ul {
  margin: 0;
  padding-inline-start: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 6px 16px;
  font-size: 13.5px;
}

.toc-box a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.toc-box a:hover {
  text-decoration: underline;
}

.callout {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--brand);
  background: var(--bg);
  margin-block: 12px;
}

.callout--warn {
  border-inline-start-color: var(--warn);
  background: var(--warn-bg);
}

.callout__title {
  margin: 0 0 4px;
  font-size: 13.5px;
  font-weight: 700;
}

.callout p {
  margin: 0;
  font-size: 13.5px;
}

.case-meta {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.case-lesson {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  margin-top: 12px;
  font-size: 13.5px;
}

.lesson-badge {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 4px;
}

/* ========================================================
   Calculator & Forms
   ======================================================== */
.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 20px;
  align-items: start;
}

@media (max-width: 820px) {
  .calc-layout {
    grid-template-columns: 1fr;
  }
}

.calc-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.calc-fieldset {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.calc-legend {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 8px;
}

.radio-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

@media (max-width: 520px) {
  .radio-group {
    grid-template-columns: 1fr;
  }
}

.radio-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  min-block-size: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
}

.radio-pill:has(input:checked) {
  border-color: var(--text);
  background: var(--surface-muted);
  font-weight: 700;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.form-label {
  font-size: 13.5px;
  font-weight: 700;
}

.form-hint {
  font-size: 12px;
  color: var(--muted);
}

.form-error {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--danger);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
  width: 100%;
  font: inherit;
  font-size: max(1rem, 1em);
  min-block-size: 46px;
  padding: 10px 60px 10px 12px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.form-input[aria-invalid="true"] {
  border-color: var(--danger);
}

.input-unit {
  position: absolute;
  inset-inline-end: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  pointer-events: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.calc-result-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.calc-meter {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  text-align: center;
}

.calc-ratio {
  font-size: 34px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.calc-grade-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}

.calc-bar {
  margin-top: 12px;
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.calc-bar__fill {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}

.calc-metrics-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.calc-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 13.5px;
}

.calc-metric-row dt {
  color: var(--muted);
}

.calc-metric-row dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.checklist-progress-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.checklist-progress-box progress {
  width: 100%;
  height: 8px;
}

.check-step-list {
  display: grid;
  gap: 10px;
}

.check-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
}

.check-step-item input[type="checkbox"] {
  inline-size: 18px;
  block-size: 18px;
  margin-top: 3px;
  flex-shrink: 0;
}

.check-step-item label {
  cursor: pointer;
  flex: 1;
}

.check-step-item strong {
  display: block;
  font-size: 14.5px;
  margin-bottom: 2px;
}

.check-step-item p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* ========================================================
   Responsive Tables
   ======================================================== */
.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  container-type: inline-size;
  background: var(--card);
}

.risk-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.risk-table caption {
  padding: 12px 16px;
  font-weight: 700;
  font-size: 14px;
  text-align: left;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.risk-table thead th {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
  padding: 12px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  white-space: nowrap;
}

.risk-table tbody th,
.risk-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.risk-table tbody tr:last-child th,
.risk-table tbody tr:last-child td {
  border-bottom: 0;
}

@container (width < 560px) {

  .risk-table,
  .risk-table thead,
  .risk-table tbody,
  .risk-table tr,
  .risk-table th,
  .risk-table td {
    display: block;
  }

  .risk-table thead {
    display: none;
  }

  .risk-table tbody tr {
    margin: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }

  .risk-table tbody th {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }

  .risk-table tbody td::before {
    content: attr(data-label) " : ";
    font-weight: 600;
    color: var(--muted);
  }
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge--safe {
  background: var(--safe-bg);
  color: var(--safe);
}

.badge--normal {
  background: var(--info-bg);
  color: var(--info);
}

.badge--warning {
  background: var(--warn-bg);
  color: var(--warn);
}

.badge--danger {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ========================================================
   Glossary & FAQ Accordion
   ======================================================== */
.glossary-search-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
}

.glossary-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.glossary-search-row input[type="search"] {
  flex: 1;
  min-inline-size: 200px;
  font: inherit;
  font-size: max(1rem, 1em);
  min-block-size: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--input-border);
  background: var(--bg);
  color: var(--text);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.filter-pill {
  min-block-size: 34px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.filter-pill[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.glossary-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.glossary-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.glossary-card__term {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
}

.glossary-card__desc {
  margin: 0 0 8px;
  font-size: 13.5px;
  line-height: 1.65;
}

.glossary-card__tip {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-question {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::before {
  content: "+";
  font-weight: 700;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.faq-item[open]>.faq-question::before {
  content: "−";
  color: var(--text);
}

.faq-answer {
  padding: 0 16px 14px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.faq-answer p {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .faq-item::details-content {
    interpolate-size: allow-keywords;
    overflow: clip;
    contain: layout;
    transition: block-size 0.25s ease, content-visibility 0.25s ease;
    transition-behavior: allow-discrete;
  }

  .faq-item:not([open])::details-content {
    block-size: 0;
  }
}

/* ========================================================
   Native <dialog> Modals & Report
   ======================================================== */
dialog.native-dialog {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  width: min(820px, calc(100dvw - 24px));
  max-height: min(90dvh, 860px);
  box-shadow: var(--shadow-md);
  margin: auto;
}

dialog.native-dialog--compact {
  width: min(440px, calc(100dvw - 24px));
}

dialog.native-dialog[open] {
  display: flex;
  flex-direction: column;
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
  overflow: hidden;
  overscroll-behavior: contain;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.dialog-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 34px;
  min-block-size: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.dialog-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.dialog-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.dialog-footer__left {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.loading__text {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--muted);
}

.progress {
  width: 100%;
  height: 8px;
}

.report-wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.report-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--muted);
}

.report-meta-bar strong {
  color: var(--text);
}

.report-meta-badge {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--safe-bg);
  color: var(--safe);
  font-weight: 600;
  font-size: 11.5px;
}

.report-property-card,
.report-mortgage-card {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.report-mortgage-card {
  border-color: var(--warn);
}

.prop-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.prop-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.prop-badge--type {
  background: var(--info-bg);
  color: var(--info);
}

.prop-badge--area {
  background: var(--safe-bg);
  color: var(--safe);
}

.prop-badge--court {
  background: var(--card);
  color: var(--muted);
  border: 1px solid var(--border);
}

.prop-address {
  font-size: 15.5px;
}

.prop-owner-info {
  font-size: 13.5px;
  color: var(--muted);
}

.prop-owner-info strong {
  color: var(--text);
}

.mortgage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.mortgage-grid-item {
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mg-label {
  font-size: 12px;
  color: var(--muted);
}

.mg-val {
  font-size: 14.5px;
  font-weight: 700;
}

.mg-val--amount {
  color: var(--warn);
}

.mg-val--joint {
  color: var(--danger);
}

.mg-sub {
  font-size: 11.5px;
  color: var(--muted);
}

.joint-warning-box {
  padding: 12px;
  background: var(--danger-bg);
  border-inline-start: 3px solid var(--danger);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.joint-warning-title {
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 4px;
}

.report-hero {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

@media (max-width: 640px) {
  .report-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.report-score-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: var(--card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.report-score-num {
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.report-score-max {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
}

.grade-badge {
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.grade--safe {
  background: var(--safe-bg);
  color: var(--safe);
}

.grade--caution {
  background: var(--info-bg);
  color: var(--info);
}

.grade--warning {
  background: var(--warn-bg);
  color: var(--warn);
}

.grade--danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.report-summary-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.report-summary-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.report-summary-text {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

.report-score-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.report-score-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.report-zones-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 680px) {
  .report-zones-grid {
    grid-template-columns: 1fr;
  }
}

.zone-card {
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.zone-name {
  font-size: 13.5px;
  font-weight: 700;
}

.zone-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

.zone-status--ok {
  background: var(--safe-bg);
  color: var(--safe);
}

.zone-status--caution {
  background: var(--warn-bg);
  color: var(--warn);
}

.zone-status--danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.zone-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.report-section-title {
  margin: 0 0 10px;
  font-size: 15.5px;
  font-weight: 700;
}

.risk-card-list,
.clause-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.risk-card {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  border-inline-start-width: 4px;
}

.risk-card--severe {
  border-inline-start-color: var(--danger);
}

.risk-card--moderate {
  border-inline-start-color: var(--warn);
}

.risk-card--info {
  border-inline-start-color: var(--info);
}

.risk-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.risk-card-keyword {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.risk-level-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

.risk-level--severe {
  background: var(--danger-bg);
  color: var(--danger);
}

.risk-level--moderate {
  background: var(--warn-bg);
  color: var(--warn);
}

.risk-level--info {
  background: var(--info-bg);
  color: var(--info);
}

.risk-analysis-grid {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.risk-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 8px;
}

@media (max-width: 520px) {
  .risk-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.risk-label {
  font-weight: 600;
  color: var(--muted);
}

.risk-val--danger {
  color: var(--danger);
  font-weight: 600;
}

.risk-val--action {
  color: var(--brand);
  font-weight: 600;
}

.risk-empty-box {
  padding: 16px;
  text-align: center;
  border: 1px solid var(--safe);
  border-radius: var(--radius-sm);
  background: var(--safe-bg);
  color: var(--safe);
  font-weight: 600;
  font-size: 13.5px;
}

.clause-card {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clause-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.clause-title {
  font-size: 13.5px;
  font-weight: 700;
}

.btn-copy-clause {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-copy-clause:hover {
  border-color: var(--text);
}

.clause-body {
  margin: 0;
  font-size: 13px;
  background: var(--card);
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.action-box {
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.action-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.action-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
}

.action-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
}

.action-text strong {
  display: block;
  margin-bottom: 2px;
}

.action-text span {
  color: var(--muted);
}

.tech-toggle-btn {
  background: none;
  border: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.tech-content {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.report-toast {
  position: fixed;
  inset-block-end: 24px;
  inset-inline-start: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--text);
  color: var(--bg);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 3000;
}

.report-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========================================================
   Minimal Footer
   ======================================================== */
.footer {
  margin-top: auto;
  padding: 32px 20px 40px;
  background: var(--card);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
}

.footer__inner {
  max-width: 880px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer__logo {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.footer__links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.footer__links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer__disclaimer {
  margin: 0;
  line-height: 1.6;
}

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.footer__meta a {
  color: inherit;
}

.btn-floating-tool {
  position: fixed;
  inset-block-end: 20px;
  inset-inline-end: 20px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  min-block-size: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  border: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn-floating-tool.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 640px) {
  .hero-card {
    padding: 20px 16px;
  }

  .file-card {
    flex-direction: column;
    align-items: stretch;
  }
}

@media print {

  header,
  main,
  footer,
  .btn-floating-tool,
  .report-toast {
    display: none !important;
  }

  dialog#resultModal[open] {
    display: block !important;
    position: static;
    width: 100%;
    max-height: none;
    border: 0;
    box-shadow: none;
    margin: 0;
  }

  dialog#resultModal .dialog-close,
  dialog#resultModal .dialog-footer {
    display: none !important;
  }
}