/* Kose legal/help pages — shared typography + chrome.
   Brand tokens match marketing/styles.css; body content inherits Inter Tight + Instrument Serif italic. */
:root {
  --ink:        #0B0F0D;
  --ink-2:      #12171A;
  --ink-soft:   #2A302D;
  --emerald:    #0FA958;
  --emerald-2:  #10B981;
  --emerald-soft: rgba(15,169,88,0.10);
  --gold:       #C9A55A;
  --cream:      #F6F2EA;
  --paper:      #FAFAF7;
  --line:       #E5E7EB;
  --line-2:     rgba(11,15,13,0.10);
  --muted:      #6B6963;
  --muted-2:    #4A4945;
  --warning-bg: #FFF8E1;
  --warning-border: #F6C75B;
  --critical-bg: #FFF1F0;
  --critical-border: #F2A6A0;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "ss01","cv11";
  background: #fff;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ====== HEADER (matches marketing nav) ====== */
.page-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.page-nav.is-scrolled {
  border-bottom-color: rgba(11,15,13,0.06);
  box-shadow: 0 1px 0 rgba(11,15,13,0.04);
}
.page-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}
@media (min-width: 900px) { .page-nav-inner { padding: 0 40px; } }
.page-nav-logo { display: flex; align-items: center; }
.page-nav-logo img { height: 34px; width: auto; }
.page-nav-cta {
  display: flex; align-items: center; gap: 12px;
}
.page-nav-cta .btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.page-nav-cta .btn-primary {
  background: var(--emerald);
  color: #fff;
}
.page-nav-cta .btn-primary:hover { background: var(--emerald-2); }
.page-nav-cta .btn-back {
  color: var(--ink);
  border: 1px solid rgba(11,15,13,0.16);
  background: transparent;
}
.page-nav-cta .btn-back:hover { background: rgba(11,15,13,0.04); border-color: rgba(11,15,13,0.32); }
@media (max-width: 520px) {
  .page-nav-cta .btn-back { display: none; }
}

/* ====== HERO ====== */
.page-hero {
  padding: 64px 0 36px;
  border-bottom: 1px solid var(--line-2);
}
@media (min-width: 760px) { .page-hero { padding: 96px 0 48px; } }
.page-hero-inner, .page-content, .page-footer-inner {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 900px) { .page-hero-inner, .page-content, .page-footer-inner { padding: 0 40px; } }
.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.page-eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--muted); display: inline-block; }
.page-hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.0;
  margin: 18px 0 0;
  color: var(--ink);
  text-wrap: balance;
}
.page-hero h1 em, .page-hero h1 .serif {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--emerald);
  letter-spacing: -0.01em;
}
.page-subtitle, .hero-meta {
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted-2);
  max-width: 60ch;
}

/* ====== CONTENT ====== */
.page-main { padding-bottom: 96px; }
.page-content {
  padding-top: 48px;
  padding-bottom: 48px;
}
.content { /* legacy class — preserved for inherited markup */
  max-width: 768px;
  margin: 0 auto;
  padding: 48px 24px;
}
@media (min-width: 900px) { .content { padding: 56px 40px; } }

/* Sections (legacy markup uses .content section) */
.content section, .page-content section {
  margin-bottom: 56px;
  padding-top: 8px;
}
.content section:first-of-type, .page-content section:first-of-type { padding-top: 0; }

.section-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-2);
}
.section-num {
  font-family: "Inter Tight", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--emerald);
}
.section-title {
  font-family: "Inter Tight", sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.15;
  margin: 0;
}

.content h2, .page-content h2 {
  font-family: "Inter Tight", sans-serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 48px 0 16px;
  line-height: 1.15;
}
.content h3, .page-content h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--emerald);
  margin: 28px 0 10px;
}
.content h4, .page-content h4 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 20px 0 8px;
}
.content p, .page-content p {
  color: var(--ink-soft);
  margin: 0 0 14px;
  font-size: 15.5px;
  line-height: 1.65;
}
.content ul, .content ol, .page-content ul, .page-content ol {
  margin: 8px 0 18px;
  padding-left: 0;
  list-style: none;
}
.content li, .page-content li {
  position: relative;
  padding: 10px 0 10px 24px;
  border-bottom: 1px solid rgba(11,15,13,0.06);
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.55;
}
.content li:last-child, .page-content li:last-child { border-bottom: 0; }
.content li::before, .page-content li::before {
  content: "";
  position: absolute;
  left: 4px; top: 18px;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--emerald);
}
.content a, .page-content a {
  color: var(--emerald);
  font-weight: 500;
  border-bottom: 1px solid currentColor;
}
.content a:hover, .page-content a:hover { color: var(--ink); }
.content strong, .page-content strong { color: var(--ink); font-weight: 600; }

/* ====== CALLOUT BOXES ====== */
.box {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 14px;
  margin: 22px 0;
  font-size: 15px;
  line-height: 1.55;
}
.box-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  line-height: 1;
}
.box strong { color: inherit; font-weight: 700; }
.box a { color: inherit; font-weight: 600; }
.box-info {
  background: var(--emerald-soft);
  border: 1px solid rgba(15,169,88,0.20);
  color: #065F46;
}
.box-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: #6B4500;
}
.box-critical {
  background: var(--critical-bg);
  border: 1px solid var(--critical-border);
  color: #7B0000;
}

/* ====== CONTACT GRID + CARDS ====== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 22px 0;
}
@media (min-width: 640px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-card {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 18px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.contact-card:hover { border-color: rgba(15,169,88,0.32); }
.contact-card .label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.contact-card .value, .contact-card .name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.contact-card .country {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.contact-card a {
  color: var(--emerald);
  border: 0;
  font-weight: 500;
}
.contact-card p {
  margin: 4px 0 0;
  font-size: 14px;
}

/* Authority list (gov contacts in Privacy/Terms) */
.authority-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 16px 0;
}
@media (min-width: 700px) { .authority-list { grid-template-columns: repeat(2, 1fr); } }
.authority-card {
  background: var(--cream);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 16px 18px;
}

/* ====== TOC (kept light if pages render one) ====== */
.toc {
  position: sticky; top: 88px;
  padding: 24px 0;
  font-size: 13.5px;
}
.toc-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.toc ol { list-style: none; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0; }
.toc a {
  display: block;
  padding: 7px 10px;
  color: var(--muted-2);
  border-radius: 8px;
  transition: background .15s ease, color .15s ease, padding-left .2s ease;
  border: 0;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero) " · ";
  font-feature-settings: "tnum"; font-variant-numeric: tabular-nums;
  color: var(--muted);
  margin-right: 4px;
}
.toc a:hover { color: var(--ink); background: var(--emerald-soft); padding-left: 14px; }

/* If a page wraps content + toc in a grid, still works */
.page-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 96px;
}
@media (min-width: 980px) {
  .page-shell { grid-template-columns: 220px 1fr; gap: 56px; padding: 40px 40px 120px; }
}

/* Tables (privacy uses a few) */
.content table, .page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 14.5px;
}
.content th, .content td, .page-content th, .page-content td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
}
.content th, .page-content th {
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--cream);
}

/* ====== FOOTER (matches marketing footer) ====== */
.page-footer {
  background: #050807;
  color: rgba(255,255,255,0.65);
  padding: 56px 0 36px;
  margin-top: 64px;
  font-size: 14.5px;
}
.page-footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
@media (min-width: 720px) {
  .page-footer-inner { grid-template-columns: 1fr auto; gap: 40px; }
}
.page-footer-brand img { height: 32px; width: auto; margin-bottom: 14px; }
.page-footer-tag {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 20px;
  color: #fff;
  margin: 0 0 8px;
}
.page-footer p { margin: 0 0 6px; max-width: 36ch; line-height: 1.55; }
.page-footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.page-footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  transition: color .15s ease;
  border: 0;
}
.page-footer-links a:hover { color: #fff; }
.page-footer-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  font-size: 12.5px;
  color: rgba(255,255,255,0.5);
}

/* ====== Accessibility ====== */
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ====== CONTACT FORM ====== */
.contact-form {
  margin: 24px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 640px) {
  .form-row { grid-template-columns: 1fr 1fr; gap: 16px; }
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.form-field input,
.form-field textarea {
  width: 100%;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  resize: vertical;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(11,15,13,0.35); }
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px rgba(15,169,88,0.14);
}
.form-error {
  font-size: 12.5px;
  color: #B42318;
  margin-top: 2px;
}
.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}
.form-note {
  font-size: 13px;
  color: var(--muted);
}
.btn-submit {
  background: var(--emerald);
  color: #fff;
  border: 0;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: -0.005em;
  transition: background .15s ease, transform .12s ease;
}
.btn-submit:hover  { background: var(--emerald-2); }
.btn-submit:active { transform: translateY(1px); }

/* ====== LEGACY ALIASES — old blade pages use .hero/.hero-tag/.page-wrap/.hero-meta ====== */
/* New chrome uses .page-hero/.page-eyebrow/.page-shell — these aliases keep the old blade pages styled. */

.hero {
  padding: 64px 24px 36px;
  border-bottom: 1px solid var(--line-2);
  max-width: 768px;
  margin: 0 auto;
}
@media (min-width: 760px) { .hero { padding: 96px 40px 48px; } }
.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.0;
  margin: 18px 0 0;
  color: var(--ink);
  text-wrap: balance;
}
.hero h1 em, .hero h1 .serif {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--emerald);
  letter-spacing: -0.01em;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-tag::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--muted);
  display: inline-block;
}
.hero-meta {
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  max-width: none;
}
.hero-meta .dot {
  width: 4px; height: 4px;
  border-radius: 999px;
  background: var(--muted);
  display: inline-block;
  flex-shrink: 0;
}

/* Two-column page layout (TOC + content) for the legacy pages */
.page-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 96px;
}
@media (min-width: 980px) {
  .page-wrap {
    grid-template-columns: 220px 1fr;
    gap: 56px;
    padding: 40px 40px 120px;
  }
}

/* Make sure section-num inside section-header (legacy markup uses div) renders consistently */
.section-header > div.section-num,
.section-header > span.section-num { color: var(--emerald); }

/* ====== CONTACT PAGE — defensive overrides so labels stack regardless of UA quirks ====== */
form.contact-form .form-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px;
  width: 100%;
}
form.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) {
  form.contact-form .form-row { grid-template-columns: 1fr 1fr; }
}
