/* Shared styles for the text pages (connector docs, privacy, support).
   Same palette and type as index.html. */
:root {
  --bg: #fbf9f5; --bg-card: #ffffff; --ink: #232838; --ink-deep: #1a1f2c;
  --dim: #5f6473; --gold: #a9853c; --gold-soft: rgba(169, 133, 60, 0.08);
  --gold-line: rgba(169, 133, 60, 0.4); --border: #e7e0d0; --max: 1080px;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg); color: var(--ink); line-height: 1.65;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
header {
  position: sticky; top: 0; z-index: 10; background: rgba(251, 249, 245, 0.9);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand {
  display: flex; align-items: center; gap: 11px; font-family: var(--serif);
  font-weight: 600; font-size: 1.3rem; color: var(--ink); text-decoration: none;
}
.brand img { height: 34px; width: auto; display: block; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--dim); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }

main.doc { max-width: 46rem; margin: 0 auto; padding: 56px 24px 80px; }
.kicker {
  display: inline-block; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold-line);
  border-radius: 999px; padding: 5px 16px; margin-bottom: 20px; background: var(--gold-soft);
}
h1 { font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.2; font-weight: 600; }
.lede { margin-top: 16px; font-size: 1.1rem; color: var(--dim); }
.updated { margin-top: 10px; font-size: 0.85rem; color: var(--dim); }
h2 {
  font-family: var(--serif); font-size: 1.4rem; font-weight: 600;
  margin: 48px 0 12px; padding-top: 28px; border-top: 1px solid var(--border);
}
h3 { font-family: var(--serif); font-size: 1.08rem; font-weight: 600; margin: 26px 0 8px; }
p { margin: 12px 0; }
main.doc a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }
ul, ol { margin: 12px 0 12px 1.4em; }
li { margin: 6px 0; }
code {
  font-family: var(--mono); font-size: 0.88em; background: var(--gold-soft);
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px;
}
pre {
  font-family: var(--mono); font-size: 0.86rem; background: var(--ink-deep); color: #f1ede3;
  border-radius: 10px; padding: 16px 18px; overflow-x: auto; margin: 14px 0; line-height: 1.5;
}
pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.table-scroll { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; background: var(--bg-card); }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border: 1px solid var(--border); }
th { font-weight: 600; background: var(--gold-soft); }
.note {
  background: var(--bg-card); border: 1px solid var(--border); border-left: 3px solid var(--gold);
  border-radius: 8px; padding: 14px 18px; margin: 18px 0; color: var(--dim); font-size: 0.95rem;
}
.note strong { color: var(--ink); }
footer { border-top: 1px solid var(--border); padding: 36px 0 48px; color: var(--dim); font-size: 0.85rem; }
footer a { color: var(--dim); }
.foot-links { margin-bottom: 10px; }
.foot-links a { margin-right: 18px; }
.disclaimer { max-width: 44em; margin-top: 10px; font-size: 0.8rem; opacity: 0.85; }
@media (max-width: 640px) {
  .nav-links a:not([aria-current="page"]) { display: none; }
  main.doc { padding-top: 40px; }
}

/* Support form */
.form-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px;
  padding: 32px; margin: 24px 0;
  box-shadow: 0 1px 2px rgba(35, 40, 56, 0.04), 0 12px 32px -12px rgba(35, 40, 56, 0.12);
}
.form-card fieldset { border: 0; min-width: 0; }
.field { margin-top: 26px; }
.field:first-child { margin-top: 0; }
.field-label, .form-card legend {
  display: flex; align-items: baseline; gap: 8px; padding: 0;
  font-weight: 600; font-size: 0.95rem; margin-bottom: 9px; color: var(--ink);
}
.optional {
  font-weight: 500; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--dim); background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 1px 8px;
}
.hint { font-size: 0.85rem; color: var(--dim); margin: 8px 0 0; line-height: 1.45; }

/* Topic choices: radio buttons shown as cards */
.choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.choice { position: relative; display: block; margin: 0; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
  display: flex; flex-direction: column; gap: 8px; height: 100%;
  padding: 14px 14px 13px; border: 1.5px solid var(--border); border-radius: 14px;
  background: var(--bg); font-size: 0.9rem; font-weight: 600; line-height: 1.3; color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.choice svg { width: 20px; height: 20px; color: var(--dim); transition: color 0.15s ease; }
.choice:hover span { border-color: var(--gold-line); background: #fff; }
.choice input:checked + span {
  border-color: var(--gold); background: var(--gold-soft);
  box-shadow: 0 0 0 3px rgba(169, 133, 60, 0.14);
}
.choice input:checked + span svg { color: var(--gold); }
.choice input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.choice input:active + span { transform: scale(0.985); }

.form-card input[type="text"], .form-card input[type="email"], .form-card textarea {
  display: block; width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--border); border-radius: 12px;
  padding: 13px 15px; transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  -webkit-appearance: none; appearance: none;
}
.form-card ::placeholder { color: #a3a6b0; }
.form-card textarea { min-height: 170px; resize: vertical; line-height: 1.55; }
.form-card input:hover, .form-card textarea:hover { border-color: var(--gold-line); }
.form-card input:focus, .form-card textarea:focus {
  outline: none; background: #fff; border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(169, 133, 60, 0.16);
}
.form-card [aria-invalid="true"] { border-color: #b3261e; background: #fffafa; }
.form-card [aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(179, 38, 30, 0.14); }
.field-foot { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.counter { font-size: 0.8rem; color: var(--dim); margin-top: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.field-error {
  display: flex; gap: 6px; align-items: center; color: #b3261e; font-size: 0.87rem; font-weight: 500; margin-top: 8px;
}
.field-error[hidden] { display: none; }
.field-error::before { content: "!"; flex: none; width: 16px; height: 16px; border-radius: 50%;
  background: #b3261e; color: #fff; font-size: 0.72rem; font-weight: 700; line-height: 16px; text-align: center; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
.field-row .field { margin-top: 0; }

.form-actions {
  margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.form-card button {
  display: inline-flex; align-items: center; gap: 10px; font: inherit; font-weight: 600; font-size: 1rem;
  background: var(--ink); color: #fdfcf9; border: 0; border-radius: 12px; padding: 14px 26px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(26, 31, 44, 0.2), 0 6px 16px -6px rgba(26, 31, 44, 0.45);
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.form-card button svg { width: 18px; height: 18px; transition: transform 0.15s ease; }
.form-card button:hover { background: #323950; }
.form-card button:hover svg { transform: translateX(3px); }
.form-card button:active { transform: translateY(1px); }
.form-card button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.form-card button[disabled] { opacity: 0.7; cursor: default; box-shadow: none; }
.form-card button.is-busy svg { display: none; }
.form-card button.is-busy::after {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(253, 252, 249, 0.35); border-top-color: #fdfcf9; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.form-status { font-size: 0.9rem; color: var(--dim); }
.form-status.is-error { color: #b3261e; font-weight: 500; }
.form-note { font-size: 0.85rem; color: var(--dim); }

.form-done { text-align: center; padding: 22px 8px 14px; outline: none; }
.form-done .tick {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center;
  background: var(--gold-soft); border: 1.5px solid var(--gold-line); color: var(--gold);
}
.form-done .tick svg { width: 26px; height: 26px; }
.form-done h3 { margin: 0 0 8px; font-size: 1.3rem; }
.form-done p { color: var(--dim); margin: 0 auto; max-width: 30em; }
.form-done .ref {
  display: inline-block; margin-top: 16px; font-family: var(--mono); font-size: 0.88rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px;
}
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 640px) {
  .form-card { padding: 22px 18px; border-radius: 16px; }
  .choices { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 26px; }
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .form-card button { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .form-card *, .form-card *::after { transition: none !important; animation-duration: 1.5s !important; }
}
