:root {
  --bg: #f1f3f5;
  --bg-strong: #e6eaee;
  --panel: #ffffff;
  --panel-border: #cfd6dd;
  --text: #1c232b;
  --muted: #56616d;
  --accent: #2d5f8b;
  --accent-strong: #214766;
  --accent-soft: #e7eef5;
  --success: #2f6b52;
  --error: #9d2f2f;
  --shadow: 0 1px 3px rgba(28, 35, 43, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-strong) 100%);
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
textarea,
input {
  font: inherit;
}

.page-shell {
  width: min(1440px, calc(100% - 20px));
  margin: 0 auto;
  min-height: 100vh;
  padding: 14px 0 18px;
}

.trust-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px 16px;
  border: 1px solid #bfd7c9;
  border-radius: 6px;
  background: #eef8f1;
  box-shadow: none;
}

.trust-banner strong {
  font-size: 1rem;
  color: #184b39;
}

.trust-banner span {
  color: #2a5f4b;
  font-size: 0.95rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}

.hero-copy,
.hero-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 18px 20px;
}

.eyebrow,
.panel-label,
.card-title {
  margin: 0 0 8px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 16ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.1;
  font-weight: 700;
}

.hero-text {
  max-width: 48ch;
  margin-top: 10px;
  font-size: 0.94rem;
  line-height: 1.45;
  color: var(--muted);
}

.hero-subtext {
  max-width: 56ch;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.hero-card {
  padding: 18px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tag-list li {
  position: relative;
  padding: 6px 10px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.82rem;
  transition: background 160ms ease, color 160ms ease;
  border: 1px solid #c5d4e3;
}

.tag-list button {
  position: absolute;
  top: -5px;
  right: -3px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #fff8f1;
  font-size: 0.68rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 140ms ease, transform 140ms ease;
}

.tag-list li:hover button,
.tag-list li:focus-within button {
  opacity: 1;
  transform: scale(1);
}

.custom-keywords {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.custom-keywords input {
  width: 100%;
  border: 1px solid #bcc6d0;
  border-radius: 4px;
  background: #ffffff;
  padding: 10px 12px;
  color: var(--text);
  outline: none;
}

.custom-keywords input:focus {
  border-color: rgba(45, 95, 139, 0.48);
  box-shadow: 0 0 0 3px rgba(45, 95, 139, 0.12);
}

.helper-text {
  margin-top: 10px;
  font-size: 0.83rem;
  line-height: 1.4;
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.panel {
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
  content-visibility: auto;
  align-items: stretch;
}

.site-footer {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  padding-bottom: 8px;
}

.policy-header {
  padding: 20px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.policy-layout {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.policy-card {
  padding: 18px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.policy-card h2 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
}

.policy-card p {
  color: var(--muted);
  line-height: 1.6;
}

.footer-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
  color: var(--text);
  font-size: 0.82rem;
}

.footer-link {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 700;
}

.footer-link:hover {
  text-decoration: underline;
}

.technical-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.technical-list li + li {
  margin-top: 8px;
}

.technical-list code {
  font-family: "Courier New", Courier, monospace;
}

.info-card {
  padding: 20px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.info-card h2 {
  margin-bottom: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}

.info-card p {
  color: var(--muted);
  line-height: 1.55;
}

.feature-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--text);
}

.feature-list li + li {
  margin-top: 8px;
}

.faq-card details {
  padding: 12px 0;
  border-top: 1px solid rgba(65, 43, 27, 0.1);
}

.faq-card details:first-of-type {
  margin-top: 6px;
}

.faq-card summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  color: var(--text);
}

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

.faq-card details p {
  margin-top: 8px;
}

.panel-head,
.button-row,
.option-bar,
.action-strip {
  display: flex;
  align-items: center;
}

.panel-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-head h2 {
  font-size: 1.2rem;
}

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

.icon-button {
  min-width: 88px;
  padding: 9px 12px;
  gap: 8px;
}

.icon-button,
.icon-button span {
  display: inline-flex;
  align-items: center;
}

.icon-button span {
  font-size: 0.95rem;
  line-height: 1;
}

textarea {
  width: 100%;
  min-height: 0;
  height: clamp(280px, 50vh, 500px);
  resize: none;
  border: 1px solid #bcc6d0;
  border-radius: 4px;
  background: #ffffff;
  padding: 14px;
  color: var(--text);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.88rem;
  line-height: 1.45;
  outline: none;
}

textarea:focus {
  border-color: rgba(45, 95, 139, 0.48);
  box-shadow: 0 0 0 3px rgba(45, 95, 139, 0.12);
}

.option-bar {
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.action-strip {
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-width: 128px;
  padding: 0 2px;
}

.primary-button,
.ghost-button {
  appearance: none;
  border: 1px solid #b7c2cc;
  border-radius: 4px;
  padding: 9px 12px;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
  font-weight: 700;
}

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

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.ghost-button {
  background: #f8fafc;
  color: var(--text);
}

.status-message {
  color: var(--muted);
  max-width: 12ch;
  text-align: center;
  font-size: 0.84rem;
  line-height: 1.4;
}

.status-message.success {
  color: var(--success);
}

.status-message.error {
  color: var(--error);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 12px, 1440px);
    padding-top: 10px;
    min-height: auto;
  }

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

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

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

  .site-footer {
    justify-content: stretch;
  }

  .footer-bar {
    width: 100%;
    justify-content: flex-start;
  }

  .deep-dive-card {
    padding: 18px;
  }

  .panel-head,
  .action-strip {
    flex-direction: column;
    align-items: flex-start;
  }

  textarea {
    height: 260px;
    resize: vertical;
  }

  .status-message {
    max-width: none;
    text-align: left;
  }
}
