/* TRUST Support — plain stylesheet (no frameworks). Edit freely. */

@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/jakarta-0.ttf) format("truetype"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/jakarta-1.ttf) format("truetype"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/jakarta-2.ttf) format("truetype"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/jakarta-3.ttf) format("truetype"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url(/assets/fonts/jakarta-4.ttf) format("truetype"); }

:root {
  --background: oklch(1 0 0);
  --foreground: oklch(0.14 0 0);
  --card: oklch(0.968 0.003 264);
  --muted: oklch(0.955 0.004 264);
  --muted-foreground: oklch(0.48 0.01 264);
  --primary: oklch(0.45 0.31 264);
  --primary-foreground: oklch(1 0 0);
  --border: oklch(0.91 0.005 264);
  --chat: oklch(0.16 0.01 264);
  --chat-surface: oklch(0.2 0.012 264);
  --chat-raised: oklch(0.26 0.014 264);
  --chat-foreground: oklch(0.97 0 0);
  --chat-muted: oklch(0.68 0.01 264);
  --shadow-blue: 0 18px 40px -16px color-mix(in oklab, var(--primary) 60%, transparent);
}

* { box-sizing: border-box; border-color: var(--border); }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
button:not(:disabled), [role="button"]:not([aria-disabled="true"]) { cursor: pointer; touch-action: manipulation; }
button { font: inherit; color: inherit; background: none; border: none; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container { margin-inline: auto; max-width: 72rem; padding-inline: 1.25rem; }
.container-narrow { margin-inline: auto; max-width: 48rem; padding-inline: 1.25rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent); background: color-mix(in oklab, var(--background) 90%, transparent); backdrop-filter: blur(8px); }
.site-header-inner { display: flex; height: 4rem; align-items: center; justify-content: space-between; }
.brand { font-size: 1.25rem; font-weight: 800; letter-spacing: 0.18em; }
.pill-outline { border: 2px solid var(--foreground); border-radius: 9999px; padding: 0.375rem 1.25rem; font-size: 0.875rem; font-weight: 600; }
.pill-outline:hover { background: var(--foreground); color: var(--background); }

/* Hero */
.hero { padding: 4rem 0 3.5rem; }
.hero h1 { font-size: 2.75rem; font-weight: 800; line-height: 1.05; letter-spacing: -0.025em; }
.search-box { margin-top: 2rem; display: flex; height: 4rem; align-items: center; gap: 0.75rem; border: 1px solid var(--border); border-radius: 9999px; background: var(--muted); padding-inline: 1.5rem; }
.search-box:focus-within { outline: 2px solid var(--primary); outline-offset: -2px; }
.search-box svg { flex-shrink: 0; width: 1.25rem; height: 1.25rem; color: var(--muted-foreground); }
.search-box input { width: 100%; border: none; background: transparent; font: inherit; font-size: 1.125rem; color: var(--foreground); }
.search-box input::placeholder { color: var(--muted-foreground); }
.search-box input:focus { outline: none; }

/* Get Support banner + Troubleshoot card */
.dual-grid { display: block; }
.banner-support { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 1.75rem; background: var(--primary); padding: 3.5rem 1.5rem; text-align: center; color: var(--primary-foreground); box-shadow: var(--shadow-blue); }
.banner-support p { font-size: 1rem; opacity: 0.9; }
.banner-support h2 { margin-top: 0.75rem; font-size: 1.875rem; font-weight: 800; }
.banner-support .btn { margin-top: 2rem; }
.troubleshoot-card { margin-top: 2.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 1.75rem; background: var(--card); padding: 2rem 1.25rem; text-align: center; }
.troubleshoot-card img { height: 6rem; width: 6rem; object-fit: contain; }
.troubleshoot-card h2 { margin-top: 0.375rem; font-size: 1.875rem; font-weight: 800; letter-spacing: -0.025em; }
.troubleshoot-card p { margin-top: 0.5rem; max-width: 28rem; font-size: 0.875rem; color: var(--muted-foreground); }
.troubleshoot-card .btn { margin-top: 1.25rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; border-radius: 9999px; font-weight: 700; }
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-blue); padding: 0.75rem 2rem; font-size: 1rem; }
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; }
.btn-light { background: var(--background); color: var(--primary); padding: 1rem 2rem; font-size: 1.125rem; font-weight: 700; transition: transform 0.15s; }
.btn-light:hover { transform: scale(1.05); }
.btn-ghost { border: 1px solid var(--border); padding: 0.625rem 1.5rem; font-size: 0.875rem; font-weight: 600; }
.btn-ghost:hover { background: var(--muted); }
.btn-outline-primary { border: 2px solid var(--primary); color: var(--primary); padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 700; }
.btn-outline-primary:hover { background: color-mix(in oklab, var(--primary) 5%, transparent); }

/* Card sections */
.card-section { padding-top: 2.5rem; }
.card-section h2 { font-size: 1.875rem; font-weight: 800; letter-spacing: -0.025em; }
.card-grid { margin-top: 1.25rem; display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.card-item { display: flex; flex-direction: column; align-items: center; border: 1px solid var(--border); border-radius: 1.75rem; background: var(--card); padding: 1rem; text-align: center; transition: all 0.2s; }
.card-item:hover { transform: translateY(-0.25rem); border-color: color-mix(in oklab, var(--primary) 40%, transparent); box-shadow: var(--shadow-blue); }
.card-item img { height: 6rem; width: 6rem; object-fit: contain; transition: transform 0.2s; }
.card-item:hover img { transform: scale(1.05); }
.card-item h3 { margin-top: 0.375rem; font-size: 1rem; font-weight: 700; line-height: 1.375; }
.no-results { padding: 2.5rem 0; text-align: center; color: var(--muted-foreground); }

/* Contact Us */
.contact-grid { margin-top: 1.25rem; display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.contact-card { display: flex; flex-direction: column; align-items: center; border: 1px solid var(--border); border-radius: 1.75rem; background: var(--card); padding: 1.25rem; text-align: center; }
.contact-card img { height: 6rem; width: 6rem; object-fit: contain; }
.contact-card h3 { margin-top: 0.375rem; font-size: 1.125rem; font-weight: 700; }
.contact-card p { margin-top: 0.375rem; max-width: 20rem; font-size: 0.875rem; color: var(--muted-foreground); }
.contact-card .btn { margin-top: 0.75rem; width: 100%; max-width: 20rem; padding: 0.625rem 1.5rem; }

/* Footer */
.site-footer { margin-top: 7rem; background: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; padding: 4rem 1.25rem; }
.footer-brand { font-size: 1.5rem; font-weight: 800; letter-spacing: 0.18em; }
.footer-grid h4 { margin-top: 1.5rem; font-size: 1.125rem; font-weight: 700; }
.footer-grid .footer-col h4 { margin-top: 0; }
.footer-grid p { margin-top: 0.5rem; color: var(--muted-foreground); }
.footer-col ul { margin-top: 1rem; display: grid; gap: 0.75rem; }
.footer-col button { color: var(--muted-foreground); }
.footer-col button:hover { color: var(--primary); }
.newsletter { margin-top: 1rem; display: flex; gap: 0.5rem; }
.newsletter input { height: 3rem; min-width: 0; flex: 1; border: 1px solid var(--border); border-radius: 9999px; background: var(--background); padding-inline: 1rem; font: inherit; color: var(--foreground); }
.newsletter input:focus { outline: 2px solid var(--primary); }
.newsletter button { height: 3rem; flex-shrink: 0; border-radius: 9999px; background: var(--primary); padding-inline: 1.25rem; font-weight: 600; color: var(--primary-foreground); display: grid; place-items: center; }
.newsletter svg { width: 1.25rem; height: 1.25rem; }
.footer-legal { border-top: 1px solid var(--border); padding: 1.5rem 0; text-align: center; font-size: 0.875rem; color: var(--muted-foreground); }

/* Troubleshoot page */
.ts-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 2.5rem; }
.ts-hero img { height: 7rem; width: 7rem; object-fit: contain; }
.ts-hero h1 { margin-top: 0.5rem; font-size: 1.875rem; font-weight: 800; letter-spacing: -0.025em; }
.ts-hero p { margin-top: 0.5rem; max-width: 36rem; color: var(--muted-foreground); }
.ts-progress { margin-top: 2rem; }
.ts-progress-label { display: flex; align-items: center; justify-content: space-between; font-size: 0.75rem; font-weight: 600; color: var(--muted-foreground); }
.ts-progress-label span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-progress-track { margin-top: 0.5rem; height: 0.5rem; overflow: hidden; border-radius: 9999px; background: var(--muted); }
.ts-progress-fill { height: 100%; border-radius: 9999px; background: var(--primary); transition: width 0.3s; }
.ts-stage { margin-top: 2rem; }
.ts-stage[hidden] { display: none; }
.ts-stage h2 { font-size: 1.25rem; font-weight: 700; }
.issue-list { margin-top: 1rem; display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.issue-btn { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--border); border-radius: 1.75rem; background: var(--card); padding: 1rem 1.25rem; text-align: left; transition: all 0.2s; }
.issue-btn:hover { transform: translateY(-0.125rem); border-color: color-mix(in oklab, var(--primary) 40%, transparent); box-shadow: var(--shadow-blue); }
.issue-btn span { font-size: 1rem; font-weight: 700; }
.issue-btn svg { flex-shrink: 0; width: 1.25rem; height: 1.25rem; color: var(--primary); }
.ts-panel { border: 1px solid var(--border); border-radius: 1.75rem; background: var(--card); padding: 1.5rem 1.25rem; }
.ts-panel[hidden], .ts-step[hidden] { display: none; }
.ts-panel-head { display: flex; align-items: center; gap: 0.75rem; }
.ts-panel-icon { display: grid; height: 2.75rem; width: 2.75rem; flex-shrink: 0; place-items: center; border-radius: 9999px; background: color-mix(in oklab, var(--primary) 10%, transparent); color: var(--primary); }
.ts-panel-icon svg { width: 1.25rem; height: 1.25rem; }
.ts-panel-body { margin-top: 1rem; font-size: 0.875rem; line-height: 1.625; color: var(--muted-foreground); }
.connectAndClaim { margin-top: 1.25rem; width: 100%; border-radius: 9999px; background: var(--primary); padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 700; color: var(--primary-foreground); box-shadow: var(--shadow-blue); }
.connectAndClaim:hover { opacity: 0.9; }
.connectAndClaim:disabled { opacity: 0.5; }
.ts-actions { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.ts-actions .btn-primary { flex: 1; padding: 0.625rem 1.5rem; font-size: 0.875rem; }
.ts-contact-hint { margin-top: 1rem; text-align: center; font-size: 0.75rem; color: var(--muted-foreground); }
.ts-contact-hint button { font-weight: 600; color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.ts-resolved { text-align: center; }
.ts-resolved h2 { font-size: 1.5rem; font-weight: 800; }
.ts-resolved .ts-sub { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); }
.ts-resolved .ts-actions { margin-top: 1.5rem; gap: 0.75rem; }
.ts-resolved .ts-actions .btn { flex: 1; }
.ts-back-link { margin-top: 1rem; display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.875rem; font-weight: 600; color: var(--muted-foreground); white-space: nowrap; }
.ts-back-link:hover { color: var(--foreground); }
.ts-back-link svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.ts-done-icon { margin-inline: auto; width: 3rem; height: 3rem; color: var(--primary); }
.still-stuck { margin-top: 2.5rem; border-radius: 1.75rem; background: var(--primary); padding: 2rem 1.5rem; text-align: center; color: var(--primary-foreground); box-shadow: var(--shadow-blue); }
.still-stuck svg { margin-inline: auto; width: 2rem; height: 2rem; }
.still-stuck h2 { margin-top: 0.5rem; font-size: 1.5rem; font-weight: 800; }
.still-stuck p { margin-top: 0.25rem; font-size: 0.875rem; opacity: 0.9; }
.still-stuck .btn-light { margin-top: 1.25rem; padding: 0.75rem 2rem; font-size: 1rem; }
.ts-main { padding-bottom: 6rem; }

/* Support chat widget */
.chat-fab { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 50; display: grid; height: 4rem; width: 4rem; place-items: center; border-radius: 9999px; background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-blue); transition: transform 0.15s; }
.chat-fab:hover { transform: scale(1.05); }
.chat-fab:active { transform: scale(0.95); }
.chat-fab svg { width: 1.75rem; height: 1.75rem; }
.chat-fab[hidden] { display: none; }

.trust-chat-panel {
  position: fixed;
  box-sizing: border-box;
  right: 12px;
  bottom: calc(12px + var(--chat-keyboard-inset, 0px));
  width: 90vw;
  max-width: calc(100vw - 24px);
  height: min(65dvh, 520px, calc(var(--chat-visible-height, 100dvh) - 24px));
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--chat);
  color: var(--chat-foreground);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5);
  animation: chat-in 0.2s ease-out;
}
.trust-chat-panel[hidden] { display: none; }
@keyframes chat-in { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: none; } }
@media (min-width: 640px) {
  .trust-chat-panel { width: 360px; height: min(500px, calc(var(--chat-visible-height, 100dvh) - 24px)); }
}
.chat-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.5rem; flex-shrink: 0; border-bottom: 1px solid var(--chat-raised); padding: 0.75rem; }
.chat-title { min-width: 0; }
.chat-title p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-title .chat-name { font-size: 0.875rem; font-weight: 700; }
.chat-title .chat-ticket { font-size: 0.75rem; color: var(--chat-muted); }
.chat-header-btns { display: flex; flex-shrink: 0; gap: 0.25rem; }
.chat-icon-btn { display: grid; height: 2rem; width: 2rem; place-items: center; border-radius: 9999px; color: var(--chat-foreground); }
.chat-icon-btn:hover { background: var(--chat-raised); }
.chat-icon-btn svg { width: 1rem; height: 1rem; }
.chat-messages { min-height: 0; min-width: 0; flex: 1; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 0.75rem; overflow-wrap: anywhere; }
.chat-messages > * + * { margin-top: 0.75rem; }
.chat-row { display: flex; }
.chat-row.visitor { justify-content: flex-end; }
.chat-row.agent, .chat-row.system { justify-content: flex-start; }
.chat-bubble { max-width: 85%; border-radius: 1rem; padding: 0.625rem 1rem; font-size: 0.875rem; background: var(--chat-raised); }
.chat-row.visitor .chat-bubble { max-width: 80%; border-bottom-right-radius: 0.375rem; background: var(--primary); color: var(--primary-foreground); }
.chat-row.agent .chat-bubble, .chat-row.system .chat-bubble { border-bottom-left-radius: 0.375rem; }
.chat-bubble .chat-from { margin-bottom: 0.25rem; font-size: 0.75rem; font-weight: 600; color: var(--chat-muted); }
.chat-topics { padding-top: 0.5rem; }
.chat-topics p { margin-bottom: 0.75rem; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--chat-muted); }
.chat-topics-list { display: grid; min-width: 0; grid-template-columns: 1fr; gap: 0.375rem; }
.chat-topic-btn { width: 100%; min-height: 2rem; border: 1px solid var(--chat-raised); border-radius: 0.5rem; background: var(--chat-surface); padding: 0.375rem 0.75rem; text-align: left; font-size: 0.75rem; white-space: normal; }
.chat-topic-btn:hover { border-color: var(--primary); background: var(--primary); color: var(--primary-foreground); }
.chat-form { display: flex; min-width: 0; flex-shrink: 0; align-items: flex-end; gap: 0.5rem; border-top: 1px solid var(--chat-raised); padding: 0.75rem; }
.chat-form textarea { height: 2.75rem; min-width: 0; flex: 1; resize: none; overflow: hidden; border: none; border-radius: 0.75rem; background: var(--chat-surface); padding: 0.625rem 0.75rem; font: inherit; font-size: 1rem; color: var(--chat-foreground); }
.chat-form textarea::placeholder { color: var(--chat-muted); }
.chat-form textarea:focus { outline: 2px solid var(--primary); }
.chat-send { display: grid; height: 2.75rem; width: 2.75rem; flex-shrink: 0; place-items: center; border-radius: 9999px; background: var(--primary); color: var(--primary-foreground); }
.chat-send:disabled { opacity: 0.4; }
.chat-send svg { width: 1.25rem; height: 1.25rem; }

/* Responsive */
@media (min-width: 640px) {
  .brand { font-size: 1.5rem; }
  .hero { padding-top: 6rem; }
  .hero h1 { font-size: 4.5rem; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-item img { height: 7rem; width: 7rem; }
  .ts-hero { padding-top: 3.5rem; }
  .ts-hero img { height: 8rem; width: 8rem; }
  .ts-hero h1 { font-size: 2.25rem; }
  .ts-panel { padding: 1.5rem 2rem; }
  .ts-actions { flex-direction: row; }
  .ts-resolved { padding: 2rem; }
  .troubleshoot-card { padding: 2rem; }
  .troubleshoot-card img { height: 7rem; width: 7rem; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .dual-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; gap: 1.5rem; }
  .troubleshoot-card { margin-top: 0; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}
