/* Cyber Duct Tape — inner pages (services, guides, products, legal).
   Loaded after home-v2.css, which supplies tokens, header, footer and buttons,
   so every page shares one design system. No inline styles (CSP: style-src 'self'). */

/* ---------- Hero ---------- */
.page-hero {
  position: relative; overflow: hidden;
  padding: calc(var(--header-h) + 72px) 0 72px;
  background:
    radial-gradient(55% 60% at 85% 0%, rgba(110, 231, 168, .14), transparent 70%),
    radial-gradient(40% 50% at 0% 100%, rgba(217, 243, 106, .06), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .45;
  background-image: linear-gradient(rgba(110, 231, 168, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(110, 231, 168, .07) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 80% at 70% 20%, #000, transparent 100%);
          mask-image: radial-gradient(70% 80% at 70% 20%, #000, transparent 100%);
}
.page-hero-inner { position: relative; width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.page-hero h1 {
  max-width: 860px; margin: 18px 0 20px;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.06; letter-spacing: -.04em; font-weight: 800; text-wrap: balance;
}
.page-hero .hero-copy { max-width: 680px; color: var(--muted); font-size: 19px; line-height: 1.6; }
.page-hero .hero-copy code { color: var(--lime); font: .9em var(--mono); }
.breadcrumb { margin-bottom: 26px; color: var(--dim); font: 12px/1.5 var(--mono); letter-spacing: .02em; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--lime); }

/* ---------- Content area (light, for long reading) ---------- */
.page-content { padding: 72px 0 96px; color: var(--ink); background: var(--paper); }
.section-inner { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.article-layout > * { min-width: 0; }

.prose { max-width: 760px; font-size: 17.5px; line-height: 1.75; color: #22312a; }
.prose > * + * { margin-top: 18px; }
.prose h2 { margin-top: 52px; color: var(--ink); font-size: clamp(1.55rem, 2.6vw, 2rem); line-height: 1.15; letter-spacing: -.03em; font-weight: 800; text-wrap: balance; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 34px; color: var(--ink); font-size: 1.2rem; line-height: 1.3; letter-spacing: -.015em; font-weight: 750; }
.prose ul:not(.checklist), .prose ol { padding-left: 1.3em; }
.prose ul:not(.checklist) { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 8px; }
.prose a { color: var(--link); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(13, 122, 71, .35); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { color: var(--ink); }
.prose code { padding: 2px 6px; color: #0b3d26; background: var(--paper-2); border: 1px solid #d7e0d2; border-radius: 6px; font: .88em var(--mono); }
.prose pre { overflow-x: auto; padding: 20px 22px; color: #dfeee6; background: #0a1512; border: 1px solid #1c3329; border-radius: 14px; font: 14px/1.6 var(--mono); }
.prose pre code { padding: 0; color: inherit; background: none; border: 0; font: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.prose th, .prose td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #d7e0d2; vertical-align: top; }

.checklist { display: grid; gap: 10px; }
.checklist li { position: relative; margin: 0; padding: 14px 16px 14px 48px; background: #fff; border: 1px solid #dde5d8; border-radius: 12px; line-height: 1.55; }
.checklist li + li { margin-top: 0; }
.checklist li::before {
  content: "✓"; position: absolute; left: 14px; top: 13px; display: grid; place-items: center; width: 22px; height: 22px;
  color: #0b1110; background: var(--lime); border-radius: 6px; font: 800 13px/1 var(--sans);
}

/* ---------- Sidebar ---------- */
.sidebar-card {
  position: sticky; top: calc(var(--header-h) + 24px);
  padding: 28px; color: var(--ink); background: #fff; border: 1px solid #dde5d8; border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(12, 24, 19, .07);
}
.sidebar-card > * + * { margin-top: 14px; }
.sidebar-card h2 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -.02em; font-weight: 800; }
.sidebar-card h3 { margin-top: 28px; color: var(--ink-muted); font: 700 11.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.sidebar-card p, .sidebar-card li { color: var(--ink-muted); font-size: 15px; line-height: 1.6; }
.sidebar-card ul { padding-left: 1.1em; list-style: disc; }
.sidebar-card li + li { margin-top: 6px; }
.sidebar-card .eyebrow { color: var(--link); }
.sidebar-card .eyebrow::before { background: var(--link); box-shadow: 0 0 0 4px rgba(13, 122, 71, .14); }
.sidebar-card a:not(.button) { color: var(--link); }
.service-links { display: grid; margin-top: 10px; border-top: 1px solid #e3eadf; }
.service-links a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 2px; color: var(--ink) !important; font-size: 15px; font-weight: 600; line-height: 1.4; border-bottom: 1px solid #e3eadf; transition: color .15s, padding .15s; }
.service-links a::after { content: "→"; color: #9db2a6; transition: color .15s, transform .15s; }
.service-links a:hover { color: var(--link) !important; }
.service-links a:hover::after { color: var(--link); transform: translateX(3px); }

/* ---------- Buttons (legacy markup → home button look) ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 12px 20px;
  color: #0b1110; background: var(--lime); border: 1px solid transparent; border-radius: 10px;
  font-size: 14px; font-weight: 700; line-height: 1.2; cursor: pointer;
  box-shadow: 0 8px 24px rgba(160, 190, 40, .22); transition: transform .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(160, 190, 40, .32); }
.button:disabled { opacity: .6; cursor: progress; transform: none; }
.sidebar-card .button { width: 100%; }

/* ---------- Guide cards (knowledge-base hub) ---------- */
.link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.link-grid a {
  display: block; padding: 22px; color: var(--ink) !important; background: #fff; border: 1px solid #dde5d8; border-radius: 14px;
  font-size: 17px; font-weight: 750; line-height: 1.35; text-decoration: none !important; transition: transform .18s, border-color .18s, box-shadow .18s;
}
.link-grid a:hover { transform: translateY(-3px); border-color: #b9cf6a; box-shadow: 0 14px 34px rgba(12, 24, 19, .08); }
.link-grid a small { display: block; margin-bottom: 8px; color: var(--link); font: 700 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.link-grid a span { display: block; margin-top: 8px; color: var(--ink-muted); font-size: 15px; font-weight: 400; line-height: 1.55; }

/* ---------- Generic sections (email migration page) ---------- */
.section { padding: 72px 0; }
.section-heading { display: grid; gap: 10px; margin-bottom: 26px; }
.section-heading h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); letter-spacing: -.03em; font-weight: 800; }
.page-content .eyebrow { color: var(--link); }
.page-content .eyebrow::before { background: var(--link); box-shadow: 0 0 0 4px rgba(13, 122, 71, .14); }

.migration-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(28px, 4vw, 56px); align-items: start; }
.migration-form { display: grid; gap: 18px; }
.migration-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.migration-form fieldset { display: grid; gap: 14px; margin: 0; padding: 22px; background: #fff; border: 1px solid #dde5d8; border-radius: 14px; }
.migration-form legend { padding: 0 6px; font-weight: 800; }
.migration-form label { display: grid; gap: 6px; color: var(--ink-muted); font-size: 14px; font-weight: 600; }
.migration-form input, .migration-form select {
  width: 100%; min-height: 44px; padding: 10px 12px; color: var(--ink); background: #fbfcf9;
  border: 1px solid #cdd8c8; border-radius: 9px; font: 15px var(--sans);
}
.migration-form input:focus, .migration-form select:focus { outline: 2px solid var(--link); outline-offset: 1px; border-color: transparent; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.migration-options { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.migration-options label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.migration-options input { width: 18px; min-height: 18px; accent-color: var(--link); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form-actions p { margin: 0; color: var(--ink-muted); font-weight: 600; }
.form-actions .error-text { color: #b4322b; }
.migration-notes { position: static; }
.migration-output { margin-top: 40px; padding: 26px; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); }
.output-header { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.output-header h2 { font-size: 1.5rem; letter-spacing: -.02em; }
.output-header .eyebrow { color: var(--mint); }
.status-pill { display: inline-flex; min-width: 96px; justify-content: center; padding: 7px 12px; color: #0b1110; background: var(--lime); border-radius: 8px; font: 800 12px var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.status-pill[data-state="complete"] { background: var(--mint); }
.status-pill[data-state="failed"] { color: #fff; background: #cf3f37; }
.status-pill[data-state="cancelled"] { color: var(--text); background: rgba(255, 255, 255, .12); }
.job-id { margin-top: 12px; color: var(--muted); font: 13px var(--mono); }
.job-id .button { width: auto; color: var(--text); background: rgba(255, 255, 255, .06); border-color: var(--line-2); box-shadow: none; }
.migration-output pre { max-height: 520px; overflow: auto; margin-top: 18px; padding: 18px; color: #dfeee6; background: #050b09; border: 1px solid var(--line); border-radius: 10px; font: 13px/1.5 var(--mono); white-space: pre-wrap; word-break: break-word; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .article-layout, .migration-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar-card { position: static; }
}
@media (max-width: 760px) {
  .page-hero { padding: calc(var(--header-h) + 40px) 0 52px; }
  .page-hero-inner, .section-inner { width: calc(100% - 32px); }
  .page-hero .hero-copy { font-size: 17px; }
  .page-content { padding: 48px 0 72px; }
  .prose { font-size: 16.5px; }
  .link-grid, .migration-columns, .field-row { grid-template-columns: minmax(0, 1fr); }
  .sidebar-card { padding: 22px; }
}
