/* Shared Kontext skin for static legal / A2P / directory pages.
   Document-first: readable for carrier review, lightly branded. */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --ktx-ink: #12141a;
  --ktx-ink-2: #3d4450;
  --ktx-ink-3: #6b7280;
  --ktx-bg: #f4f2ef;
  --ktx-bg-2: #ebe7e1;
  --ktx-surface: #ffffff;
  --ktx-orange: #ff6b35;
  --ktx-orange-soft: rgba(255, 107, 53, 0.12);
  --ktx-orange-border: rgba(255, 107, 53, 0.35);
  --ktx-green: #10b981;
  --ktx-border: rgba(18, 20, 26, 0.1);
  --ktx-font: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --ktx-radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ktx-font);
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(255, 107, 53, 0.14), transparent 55%),
    radial-gradient(700px 380px at 92% 0%, rgba(16, 185, 129, 0.1), transparent 50%),
    linear-gradient(180deg, var(--ktx-bg) 0%, var(--ktx-bg-2) 100%);
  color: var(--ktx-ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ktx-orange);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: #e85a28; }

.ktx-legal-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(7, 7, 10, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.ktx-legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff;
}

.ktx-legal-brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
}

.ktx-legal-brand span {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ff6b35, #10b981);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ktx-legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.ktx-legal-nav a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}
.ktx-legal-nav a:hover { color: #fff; }
.ktx-legal-nav a.is-active { color: #ff6b35; }

.ktx-legal-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.ktx-legal-shell--narrow {
  max-width: 560px;
}

.ktx-legal-shell--dir {
  max-width: 920px;
}

.ktx-legal-doc {
  background: var(--ktx-surface);
  border: 1px solid var(--ktx-border);
  border-radius: 16px;
  padding: 2rem 1.75rem 2.25rem;
  box-shadow: 0 12px 40px rgba(18, 20, 26, 0.06);
}

@media (min-width: 640px) {
  .ktx-legal-doc { padding: 2.5rem 2.5rem 2.75rem; }
}

.ktx-legal-kicker {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--ktx-orange-soft);
  border: 1px solid var(--ktx-orange-border);
  color: #c2410c;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.65rem, 4vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--ktx-ink);
}

.meta {
  color: var(--ktx-ink-3);
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
  line-height: 1.55;
}

ul { padding-left: 1.25rem; margin: 0.5rem 0 1rem; }
li { margin: 0.35rem 0; }
p { margin: 0 0 1rem; color: var(--ktx-ink-2); }
p strong, li strong { color: var(--ktx-ink); }

.callout {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.08), rgba(16, 185, 129, 0.06));
  border: 1px solid var(--ktx-orange-border);
  border-radius: var(--ktx-radius);
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.callout h2 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

.ktx-legal-foot {
  margin-top: 2.5rem;
  padding: 1.5rem 1.25rem 2rem;
  background: #07070a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.85rem;
  text-align: center;
}
.ktx-legal-foot a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  margin: 0 0.4rem;
}
.ktx-legal-foot a:hover { color: #ff6b35; }
.ktx-legal-foot .ktx-legal-foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.ktx-legal-foot .ktx-legal-foot-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

/* —— SMS opt-in form —— */
.ktx-form-card {
  background: var(--ktx-surface);
  border: 1px solid var(--ktx-border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 12px 40px rgba(18, 20, 26, 0.06);
}

label.field {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ktx-ink);
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ktx-border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 1rem;
  background: #fff;
  color: var(--ktx-ink);
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
  outline: 2px solid rgba(255, 107, 53, 0.45);
  outline-offset: 1px;
  border-color: var(--ktx-orange);
}

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0.35rem 0 1.25rem;
  padding: 14px;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(16, 185, 129, 0.06));
  border: 1px solid var(--ktx-orange-border);
  border-radius: var(--ktx-radius);
  font-size: 0.88rem;
  color: var(--ktx-ink-2);
}
.consent input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--ktx-orange);
}

button.ktx-btn,
button[type="submit"] {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 650;
  font-family: inherit;
  background: linear-gradient(135deg, #ff6b35, #f59e0b);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 107, 53, 0.28);
}
button.ktx-btn:hover,
button[type="submit"]:hover {
  filter: brightness(1.04);
}
button[type="submit"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.note {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--ktx-ink-3);
}

.ok {
  display: none;
  margin-top: 1rem;
  padding: 12px 14px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 10px;
  color: #065f46;
  font-size: 0.92rem;
}
.ok.show { display: block; }

/* —— Public directory —— */
.ktx-dir-lead {
  margin: 0 0 1.35rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ktx-ink-2);
  max-width: 38rem;
}

.ktx-dir-search {
  width: 100%;
  max-width: 28rem;
  margin: 0 0 1.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(18, 20, 26, 0.12);
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ktx-ink);
  box-shadow: 0 8px 24px rgba(18, 20, 26, 0.04);
}
.ktx-dir-search:focus {
  outline: none;
  border-color: rgba(255, 107, 53, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.16);
}

.ktx-dir-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  margin: 0 0 1.35rem;
  padding: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--ktx-border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(18, 20, 26, 0.04);
}

.ktx-dir-tab {
  appearance: none;
  flex: 1 0 auto;
  min-width: 5.4rem;
  padding: 0.62rem 0.85rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ktx-ink-2);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  cursor: pointer;
  width: auto;
  box-shadow: none;
}
.ktx-dir-tab:hover { background: rgba(255, 107, 53, 0.08); color: #c2410c; filter: none; }
.ktx-dir-tab.is-active {
  background: linear-gradient(135deg, #ff6b35, #f59e0b);
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 107, 53, 0.28);
}
.ktx-dir-tab.is-empty,
.ktx-dir-tab:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  box-shadow: none;
}

.ktx-dir-group { margin: 0 0 1.75rem; }
.ktx-dir-group[hidden] { display: none; }
.ktx-dir-group h2 {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ktx-ink-3);
}

.ktx-dir-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ktx-dir-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem 0.85rem;
  align-items: center;
  padding: 0.95rem 1rem;
  background: var(--ktx-surface);
  border: 1px solid var(--ktx-border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(18, 20, 26, 0.04);
}

.ktx-dir-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 650;
  font-size: 1.02rem;
  text-decoration: none;
  color: var(--ktx-ink);
}
.ktx-dir-title:hover { color: var(--ktx-orange); }

.ktx-dir-href {
  display: block;
  margin-top: 0.2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 0.75rem;
  color: var(--ktx-ink-3);
  word-break: break-all;
}

.ktx-dir-note {
  margin: 0.3rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ktx-ink-2);
}

.ktx-dir-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 5.5rem;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(18, 20, 26, 0.14);
  background: #f7f5f2;
  color: var(--ktx-ink-2);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  width: auto;
  box-shadow: none;
}
.ktx-dir-copy:hover {
  background: rgba(255, 107, 53, 0.1);
  border-color: rgba(255, 107, 53, 0.35);
  color: #c2410c;
  filter: none;
}
.ktx-dir-copy.is-ok {
  color: #047857;
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.1);
}

.ktx-dir-empty { display: none; margin: 1.5rem 0; color: var(--ktx-ink-3); }
.ktx-dir-empty.show { display: block; }

@media (max-width: 560px) {
  .ktx-dir-card { grid-template-columns: 1fr; }
  .ktx-dir-copy { justify-self: start; }
}

@media (max-width: 520px) {
  .ktx-legal-nav { font-size: 0.78rem; gap: 0.25rem 0.75rem; }
}
