* {
  box-sizing: border-box;
}

:root {
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --accent: #111827;
  --accent-dark: #374151;
  --blue: #2563eb;
  --green: #15803d;
  --white: #ffffff;
  --radius: 14px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

.site-header {
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.header-inner {
  width: min(1120px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
}

.brand-logo {
  display: block;
  width: 190px;
  max-width: 100%;
  height: auto;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 550;
  color: #4b5563;
}

.top-nav a:hover {
  color: var(--ink);
}

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

.intro {
  padding: 56px 0 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.15;
  letter-spacing: -1.5px;
}

.intro-copy {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.trust-points {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin-top: 18px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 550;
}

.trust-points span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trust-points i {
  color: var(--green);
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}

.workspace {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.045);
}

.workspace-heading,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.workspace-heading h2,
.section-heading h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.3px;
}

.workspace-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.privacy-tag {
  flex: none;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f0fdf4;
  color: var(--green);
  font-size: 12px;
  font-weight: 650;
}

.editor-panel {
  margin-top: 22px;
}

.editor-panel > label,
.result-heading label {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

textarea {
  display: block;
  width: 100%;
  min-height: 190px;
  padding: 15px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  outline: none;
  resize: vertical;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
  font-size: 15px;
  line-height: 1.7;
  font-family: inherit;
}

textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

textarea::placeholder {
  color: #9ca3af;
}

#text-input {
  margin-top: 8px;
}

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 5px;
}

.input-footer > span {
  color: var(--muted);
  font-size: 12px;
}

button {
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

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

.button-primary:hover:not(:disabled) {
  background: var(--accent-dark);
}

.button-quiet,
.button-text {
  padding: 8px 12px;
  border-color: var(--line);
  background: #ffffff;
  color: #4b5563;
}

.button-quiet:hover:not(:disabled),
.button-text:hover:not(:disabled) {
  border-color: #9ca3af;
  background: var(--soft);
  color: var(--ink);
}

.conversion-section {
  margin-top: 25px;
}

.conversion-section .section-heading {
  margin-bottom: 12px;
}

.section-heading > span {
  color: var(--muted);
  font-size: 12px;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.case-button {
  min-width: 0;
  min-height: 76px;
  padding: 11px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  text-align: left;
  color: var(--ink);
}

.case-button:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

.case-button.active {
  border-color: var(--accent);
  background: #f3f4f6;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.case-button strong {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.case-button span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.result-panel {
  margin-top: 25px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

#text-output {
  min-height: 150px;
  background: var(--soft);
}

.status {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.results {
  padding: 32px 0 12px;
}

.results > .section-heading {
  margin-bottom: 14px;
}

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

.stat-card {
  min-height: 100px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--soft);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
}

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

.content-section {
  padding: 30px 0 5px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 46px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}

.content-section h2 {
  margin: 0 0 10px;
  font-size: 20px;
  letter-spacing: -0.35px;
}

.content-section p,
.content-section li {
  color: #4b5563;
  font-size: 14px;
}

.content-section p {
  margin: 0 0 12px;
}

.content-section ol {
  padding-left: 22px;
}

.content-section li {
  padding: 3px 0;
}

.faq-section {
  max-width: 860px;
  margin: 12px auto 0;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}

.faq-section h2 {
  margin-bottom: 12px;
}

.faq-section details {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.faq-section summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}

.faq-section details p {
  margin: 8px 0 0;
}

.privacy-section {
  margin: 28px 0 30px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--soft);
}

.privacy-section h2 {
  margin: 0 0 7px;
  font-size: 16px;
}

.privacy-section p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.footer-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-inner > nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.footer-inner a {
  color: #6b7280;
}

.footer-inner a:hover {
  color: var(--ink);
}

@media (max-width: 900px) {
  .case-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .content-grid {
    gap: 28px;
  }
}

@media (max-width: 760px) {
  .intro {
    padding: 38px 0 24px;
  }

  .workspace {
    padding: 19px;
  }

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

  .content-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .page,
  .footer-inner {
    width: calc(100% - 28px);
  }

  .brand-logo {
    width: 155px;
  }

  .top-nav {
    gap: 13px;
    font-size: 12px;
  }

  .intro {
    padding: 32px 0 22px;
  }

  .intro-copy {
    font-size: 15px;
  }

  .trust-points {
    gap: 8px 14px;
  }

  .workspace-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .privacy-tag {
    align-self: flex-start;
  }

  .section-heading {
    align-items: flex-start;
  }

  .stats-grid {
    gap: 8px;
  }

  .stat-card {
    padding: 13px;
  }

  .stat-card strong {
    font-size: 24px;
  }

  .case-button {
    padding: 10px 8px;
  }

  .case-button strong {
    font-size: 12px;
  }

  .case-button span {
    font-size: 9px;
  }

  .privacy-section {
    padding: 17px;
  }

  .footer-inner > nav {
    gap: 10px 15px;
  }
}

@media (max-width: 360px) {
  .top-nav {
    gap: 9px;
    font-size: 11px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .case-grid {
    gap: 7px;
  }

  .result-heading {
    align-items: flex-start;
  }
}

/* Restore original guide and FAQ layout */
.content-section {
  max-width: 820px;
  padding: 30px 0 5px;
}

.content-grid {
  display: block;
  padding: 0;
  border: 0;
}

.content-grid article + article {
  margin-top: 24px;
}

.content-section h2 {
  margin: 0 0 10px;
  font-size: 21px;
  letter-spacing: -0.35px;
}

.content-section p,
.content-section li {
  color: #4b5565;
  font-size: 14px;
}

.content-section ol {
  padding-left: 22px;
}

.content-section li {
  padding: 3px 0;
}

.faq-section {
  max-width: none;
  margin: 26px 0 0;
  padding: 0;
  border: 0;
}

.faq-section h2 {
  margin: 0 0 10px;
  font-size: 21px;
  letter-spacing: -0.35px;
}

.faq-section details {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.faq-section summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}

.faq-section details p {
  margin: 8px 0 0;
  color: #4b5565;
  font-size: 14px;
}
