/* ITK Group — Official Accounts
   Classic, minimal corporate style: light surfaces, navy text, a restrained pink accent.
   Colours are defined once here as tokens; dark mode just redefines them. */

:root {
  --navy: #0b0b45;
  --bg: #f6f7fa;
  --surface: #ffffff;
  --surface-2: #f3f4f8;
  --text: #0b0b45;
  --text-2: #33365a;
  --muted: #5f637d;
  --border: #e5e7ee;
  --border-strong: #cfd3df;
  --accent: #c2185b;          /* restrained pink */
  --accent-soft: #fcf1f5;
  --ring: #c2185b;
  --primary-bg: #0b0b45;
  --primary-text: #ffffff;
  --primary-hover: #1d1d66;
  --ok: #0f6b3f;
  --ok-soft: #edf7f1;
  --ok-border: #cfe7da;
  --bad: #a3133f;
  --bad-soft: #fdf1f4;
  --bad-border: #f2cbd7;
  --warn: #8a5300;
  --logo-tile: #0b0b45;
  --shadow-sm: 0 1px 2px rgb(11 11 69 / 4%);
  --shadow: 0 1px 2px rgb(11 11 69 / 4%), 0 4px 14px rgb(11 11 69 / 4%);
  --radius: 14px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
          "Noto Sans Myanmar", "Padauk", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d1f;
    --surface: #14152e;
    --surface-2: #1b1c3a;
    --text: #eceef8;
    --text-2: #c9cce0;
    --muted: #a1a5c0;
    --border: #262846;
    --border-strong: #363959;
    --accent: #ff8db5;
    --accent-soft: #2a1730;
    --ring: #ff8db5;
    --primary-bg: #eceef8;
    --primary-text: #0b0b45;
    --primary-hover: #ffffff;
    --ok: #7fd9a7;
    --ok-soft: #10261d;
    --ok-border: #1f4a35;
    --bad: #ff9bb6;
    --bad-soft: #2a1220;
    --bad-border: #5a2238;
    --warn: #ffc66b;
    --logo-tile: #1e1f4f;
    --shadow-sm: none;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
/* Myanmar script needs more line height so stacked marks don't clip. */
html[lang="my"] body { line-height: 1.75; }

img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
p { margin: 0; }
a { color: inherit; }
ul { margin: 0; padding: 0; }

:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 8px; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 30;
  background: var(--primary-bg); color: var(--primary-text);
  padding: 10px 14px; border-radius: 8px; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- Local preview notice (never shown on the live site) ---------- */
.preview-notice {
  background: #fff7e6; color: #6b4100;
  border-bottom: 1px solid #f3dfb3;
  padding: 8px 20px; text-align: center; font-size: 14px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -.01em;
  white-space: nowrap;
}
/* ITK logo always sits on a navy tile with breathing room around it */
.logo-tile {
  display: inline-grid; place-items: center; flex: none;
  background: #0b0b45; border-radius: 10px;
}
.logo-tile img { width: 64%; height: 64%; object-fit: contain; }
.logo-tile-sm { width: 34px; height: 34px; border-radius: 9px; }
.header-nav { display: none; gap: 4px; margin-left: auto; }
.header-nav a {
  text-decoration: none; color: var(--text-2); font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
}
.header-nav a:hover { color: var(--text); background: var(--surface-2); }

.lang {
  margin-left: auto;
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
}
.lang button {
  font: inherit; font-size: 13px; font-weight: 600; line-height: 1;
  border: 0; background: transparent; color: var(--muted);
  min-height: 32px; padding: 0 12px; border-radius: 7px; cursor: pointer;
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { background: var(--primary-bg); color: var(--primary-text); }

/* ---------- Hero ---------- */
.hero { background: var(--surface); border-bottom: 1px solid var(--border); }
.hero-inner { display: flex; gap: 20px; align-items: flex-start; padding-top: 40px; padding-bottom: 36px; }
.hero-text { flex: 1; min-width: 0; }
.hero-logo { width: 60px; height: 60px; border-radius: 14px; }

/* Founder photo */
.founder { margin: 0; flex: none; }
.founder[hidden] { display: none; }
.founder img {
  width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; object-position: 50% 20%;
  border-radius: 16px; border: 1px solid var(--border); background: var(--surface-2);
}
.founder figcaption { margin-top: 10px; }
.founder strong { display: block; font-size: 15px; font-weight: 600; }
.founder span { display: block; font-size: 13px; color: var(--muted); }
.founder-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
.founder-actions[hidden] { display: none; }
.founder-actions .btn { min-height: 40px; padding: 0 10px; }
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.hero h1 { margin-top: 4px; font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.lead { margin-top: 10px; font-size: 16px; color: var(--text-2); max-width: 62ch; white-space: pre-line; }
.trust {
  margin-top: 16px;
  display: inline-flex; align-items: flex-start; gap: 8px;
  font-size: 14px; font-weight: 500; color: var(--ok);
}
.trust svg { flex: none; margin-top: 3px; }
.updated { margin-top: 4px; font-size: 13px; color: var(--muted); }

/* ---------- Toolbar: search + brand filter ---------- */
.toolbar { padding: 28px 0 8px; }

.search { position: relative; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px;
  min-height: 48px; padding: 10px 44px 10px 42px;
  box-shadow: var(--shadow-sm);
  -webkit-appearance: none; appearance: none;
}
.search input::-webkit-search-cancel-button { display: none; }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgb(11 11 69 / 10%); }
@media (prefers-color-scheme: dark) { .search input:focus { border-color: var(--text-2); box-shadow: 0 0 0 3px rgb(236 238 248 / 12%); } }
.search-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); cursor: pointer; display: grid; place-items: center;
}
.search-clear:hover { background: var(--surface-2); color: var(--text); }
.search-clear[hidden] { display: none; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.filters button {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  min-height: 38px; padding: 0 14px 0 6px; cursor: pointer;
  transition: border-color .15s, background-color .15s, color .15s;
}
.filters button.all { padding-left: 14px; }
.filters button:hover { border-color: var(--border-strong); color: var(--text); }
.filters button[aria-pressed="true"] { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-text); }
.filters .f-logo {
  width: 26px; height: 26px; border-radius: 999px; background: var(--logo-tile);
  display: grid; place-items: center; overflow: hidden;
}
.filters .f-logo img { width: 66%; height: 66%; object-fit: contain; }
.filters .f-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.filters button[aria-pressed="true"] .f-count { color: inherit; opacity: .75; }

.search-status { margin-top: 12px; font-size: 14px; color: var(--muted); min-height: 0; }
.search-status:empty { display: none; }
.verdict {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 10px; border: 1px solid; font-size: 14px; color: var(--text-2);
}
.verdict svg { flex: none; margin-top: 2px; }
.verdict strong { display: block; font-size: 15px; }
.verdict.ok { background: var(--ok-soft); border-color: var(--ok-border); }
.verdict.ok strong, .verdict.ok svg { color: var(--ok); }
.verdict.bad { background: var(--bad-soft); border-color: var(--bad-border); }
.verdict.bad strong, .verdict.bad svg { color: var(--bad); }
.verdict a { color: var(--bad); font-weight: 600; }

/* ---------- Sections (brands, contact, safety) ---------- */
.directory { outline: none; }
.section {
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scroll-margin-top: 16px;
}
.section[hidden] { display: none; }

.section-head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
}
.brand-logo {
  width: 48px; height: 48px; flex: none; border-radius: 12px;
  background: var(--logo-tile); display: grid; place-items: center; overflow: hidden;
}
.brand-logo img { width: 66%; height: 66%; object-fit: contain; }
.brand-logo.is-photo img, .filters .f-logo.is-photo img { width: 100%; height: 100%; object-fit: cover; }
.section-head h2 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.section-head p { margin-top: 1px; font-size: 14px; color: var(--muted); }
.section-head .count {
  margin-left: auto; flex: none;
  font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap;
}

.accounts { list-style: none; padding: 8px; display: grid; gap: 2px; }
.empty { padding: 18px 20px; font-size: 14px; color: var(--muted); }

/* ---------- Account row ---------- */
.acct {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center; gap: 14px;
  padding: 12px; border-radius: 10px;
  transition: background-color .15s;
}
.acct:hover { background: var(--surface-2); }
.acct[hidden] { display: none; }

.acct-icon {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; color: var(--text);
}
.acct-icon svg { width: 22px; height: 22px; }

.acct-text { min-width: 0; }
.acct-name { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; }
.verified { color: var(--ok); display: inline-flex; }
.acct-handle {
  display: block; font-size: 14px; font-weight: 500; color: var(--text-2);
  overflow-wrap: break-word; user-select: all;
}
.acct-note { display: block; font-size: 13px; color: var(--muted); }
.acct-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.acct-meta .acct-handle { display: inline; }
.acct-followers {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0 8px;
}
.acct-followers svg { color: var(--muted); }
.section { transition: border-color .4s, box-shadow .4s; }
.section.is-target { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }

.acct-actions { display: flex; align-items: center; gap: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1;
  min-height: 36px; padding: 0 14px; border-radius: 8px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn svg { width: 15px; height: 15px; flex: none; }
.btn-outline { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }
.btn-outline:hover { border-color: var(--text); }
.btn-primary { background: var(--primary-bg); color: var(--primary-text); border: 1px solid var(--primary-bg); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-icon {
  width: 36px; padding: 0; background: transparent; color: var(--muted);
  border: 1px solid transparent;
}
.btn-icon:hover { color: var(--text); border-color: var(--border); background: var(--surface); }
.btn-icon[data-copied="true"] { color: var(--ok); }
.btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* Placeholder rows: only visible in local preview, never on the live site */
.acct.is-placeholder { opacity: .65; }
.acct.is-placeholder .acct-icon { filter: grayscale(1); }
.tag {
  display: inline-block; font-size: 12px; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; white-space: nowrap;
}

/* ---------- Safety ---------- */
.safety { display: grid; gap: 0; }
.safety-body { padding: 22px 20px; }
.safety h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.safety h2 svg { color: var(--warn); }
.safety ul { margin-top: 12px; padding-left: 20px; color: var(--text-2); font-size: 15px; }
.safety li + li { margin-top: 8px; }
.safety li::marker { color: var(--accent); }
.report {
  padding: 22px 20px; background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
}
.report h3 { font-size: 16px; font-weight: 700; }
.report p { margin: 4px 0 14px; font-size: 14px; color: var(--text-2); }
.report .btn { min-height: 42px; padding: 0 18px; }

/* ---------- Footer, misc ---------- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { padding-top: 22px; padding-bottom: 32px; text-align: center; font-size: 14px; }
.footer-inner p + p { margin-top: 2px; }

.loading { padding: 24px 0; color: var(--muted); }
.error-box {
  margin-top: 20px; padding: 16px; border-radius: 10px;
  background: var(--bad-soft); border: 1px solid var(--bad-border); color: var(--bad);
}
.error-box code { overflow-wrap: anywhere; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px);
  background: var(--primary-bg); color: var(--primary-text);
  padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px;
  box-shadow: 0 6px 20px rgb(11 11 69 / 18%);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.noscript { max-width: 640px; margin: 16px auto; padding: 16px; background: var(--bad-soft); color: var(--bad); border-radius: 10px; }

.notfound { text-align: center; padding: 64px 20px; }
.notfound .hero-logo { margin: 0 auto 16px; display: grid; }
.notfound h1 { font-size: 40px; }
.notfound p { margin: 8px 0 20px; color: var(--muted); }

/* ---------- Phones: stack the hero, founder as a compact row ---------- */
@media (max-width: 719px) {
  .hero-inner { flex-direction: column; gap: 16px; padding-top: 28px; padding-bottom: 28px; }
  .founder { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; order: 3; width: 100%;
             padding-top: 16px; border-top: 1px solid var(--border); }
  .founder figcaption { flex: 1; }
  .founder-actions { width: 100%; margin-top: 0; grid-template-columns: 1fr 1fr; }
  .founder img { width: 64px; height: 64px; flex: none; border-radius: 50%; }
  .founder figcaption { margin-top: 0; }
}

/* ---------- Small phones ---------- */
@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .hero-logo { width: 52px; height: 52px; }
  .hero h1 { font-size: 28px; }
  .acct { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; padding: 12px 8px; }
  .acct-icon { width: 36px; height: 36px; }
  .acct-icon svg { width: 20px; height: 20px; }
  .btn-visit-text { display: none; }      /* Visit becomes an icon button */
  .btn-visit { width: 36px; padding: 0; }
  .section-head { padding: 16px; }
  .section-head .count { display: none; }
}

/* ---------- Tablet & desktop ---------- */
@media (min-width: 720px) {
  .header-nav { display: flex; }
  .header-nav + .lang { margin-left: 0; }
  .hero h1 { font-size: 40px; }
  .hero-logo { width: 72px; height: 72px; border-radius: 16px; }
  .founder { width: 240px; }
  .section-head { padding: 20px 24px; }
  .accounts { grid-template-columns: 1fr 1fr; padding: 10px 12px 12px; column-gap: 12px; }
  .empty { padding: 20px 24px; }
  .safety { grid-template-columns: 1.4fr 1fr; }
  .safety-body { padding: 26px 28px; }
  .report { border-top: 0; border-left: 1px solid var(--border); border-radius: 0 var(--radius) var(--radius) 0; padding: 26px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .toast, .acct, .btn, .filters button { transition: none; }
}
