/* Indochina AI Business Map. Tokens match the newsletter homepage. */
:root {
  --paper:        #f5efe4;
  --paper-raised: #fbf8f1;
  --paper-sunk:   #ece4d5;
  --ink:          #1a2b4a;
  --ink-soft:     #3a4a68;
  --muted:        #6f6859;
  --rule:         #d9cfb8;
  --rule-strong:  #c3b696;
  --accent:       #b8501f;
  --accent-ink:   #ffffff;
  --gold:         #96702f;
  --success:      #2d6a4f;
  --error:        #9a3a3a;
  --shadow:       0 1px 2px rgba(26, 43, 74, .05), 0 8px 24px -12px rgba(26, 43, 74, .18);
  --yes-bg:       #e3efe0;
  --yes-border:   #9cc39a;
  --no-bg:        #f4e1da;
  --no-border:    #d9a08c;

  --step--1: clamp(.78rem, .76rem + .1vw, .84rem);
  --step-0:  clamp(1rem, .97rem + .16vw, 1.09rem);
  --step-1:  clamp(1.15rem, 1.09rem + .3vw, 1.35rem);
  --step-2:  clamp(1.45rem, 1.33rem + .6vw, 1.9rem);
  --step-3:  clamp(1.9rem, 1.6rem + 1.5vw, 2.9rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:        #14161c;
    --paper-raised: #1b1e26;
    --paper-sunk:   #101216;
    --ink:          #ece5d8;
    --ink-soft:     #c3bcae;
    --muted:        #918a7c;
    --rule:         #2c313c;
    --rule-strong:  #3d434f;
    --accent:       #ef9061;
    --accent-ink:   #14161c;
    --gold:         #cba55f;
    --success:      #6ac292;
    --error:        #e08585;
    --shadow:       0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .7);
    --yes-bg:       #1a3324;
    --yes-border:   #3d6b4a;
    --no-bg:        #3a2420;
    --no-border:    #8a5344;
  }
}

:root[data-theme="dark"] {
  --paper:        #14161c;
  --paper-raised: #1b1e26;
  --paper-sunk:   #101216;
  --ink:          #ece5d8;
  --ink-soft:     #c3bcae;
  --muted:        #918a7c;
  --rule:         #2c313c;
  --rule-strong:  #3d434f;
  --accent:       #ef9061;
  --accent-ink:   #14161c;
  --gold:         #cba55f;
  --success:      #6ac292;
  --error:        #e08585;
  --shadow:       0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .7);
  --yes-bg:       #1a3324;
  --yes-border:   #3d6b4a;
  --no-bg:        #3a2420;
  --no-border:    #8a5344;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--accent-ink); }

a { color: var(--accent); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: .5rem;
  background: var(--ink);
  color: var(--paper);
  padding: .6rem 1rem;
  z-index: 10;
  border-radius: 3px;
}
.skip-link:focus { left: .75rem; }

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.15rem;
  padding-block: 1.15rem 1rem;
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 5;
}

.brand {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -.02em;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.brand em { font-style: italic; font-weight: 400; color: var(--accent); }

.masthead nav {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
}

.masthead nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: var(--step--1);
}
.masthead nav a:hover,
.masthead nav a[aria-current="page"] { color: var(--accent); }

.theme-toggle {
  appearance: none;
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--muted);
  border-radius: 999px;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); }
.theme-toggle svg { width: 1rem; height: 1rem; }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}

main { padding-block: clamp(1.75rem, 4vw, 2.75rem) 1rem; }

.kicker {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: var(--step--1);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-title,
main h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: var(--step-3);
  letter-spacing: -.02em;
  line-height: 1.08;
  margin: .35rem 0 .75rem;
  text-wrap: balance;
}

.page-intro {
  color: var(--ink-soft);
  max-width: 62ch;
  margin-bottom: 1.35rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .75rem;
  margin: .25rem 0 1rem;
}

.filter {
  display: flex;
  flex: 1 1 9.5rem;
  max-width: 16rem;
  flex-direction: column;
  gap: .3rem;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: var(--step--1);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.filter select {
  text-transform: none;
  letter-spacing: 0;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: .55rem 1rem;
  width: 100%;
  min-width: 0;
}

.legend { color: var(--muted); font-size: var(--step--1); margin-bottom: .35rem; }
.legend .tag { margin-right: .35rem; }

.meta {
  color: var(--muted);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: var(--step--1);
  letter-spacing: .01em;
  overflow-wrap: anywhere;
}
.card .meta a { white-space: nowrap; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
  gap: .9rem;
  margin-top: .9rem;
}

.card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1rem 1.05rem 1.05rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.card h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.2;
}

.card h2 a { color: inherit; text-decoration: none; }
.card h2 a:hover { color: var(--accent); }

.tags { display: flex; flex-wrap: wrap; gap: .25rem; }

.tag {
  display: inline-block;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .05rem .5rem;
  font-size: .75rem;
  line-height: 1.45;
  color: var(--ink-soft);
  background: var(--paper);
}

.sy { background: var(--yes-bg); border-color: var(--yes-border); color: var(--ink); }
.sn { background: var(--no-bg); border-color: var(--no-border); color: var(--ink); }
.su { color: var(--muted); border-style: dashed; background: transparent; }

.uv { color: var(--muted); font-style: italic; }

.table-wrap { overflow-x: auto; margin: .4rem 0 1.25rem; }

table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td {
  border-bottom: 1px solid var(--rule);
  padding: .7rem .55rem;
  text-align: left;
  vertical-align: top;
}
th {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
td:first-child, th:first-child { padding-left: 0; }
td a { white-space: nowrap; }

main h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: var(--step-2);
  letter-spacing: -.015em;
  margin: 1.5rem 0 .4rem;
}

.suggest { margin-top: .5rem; }

.featured-form {
  max-width: 36rem;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}

.featured-form label {
  display: block;
  margin-bottom: .9rem;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: var(--step--1);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.featured-form input,
.featured-form textarea {
  display: block;
  width: 100%;
  margin-top: .35rem;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: var(--step-0);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  padding: .7rem .9rem;
}

.featured-form textarea { min-height: 7rem; resize: vertical; }
.featured-form input:focus,
.featured-form textarea:focus,
.filter select:focus { border-color: var(--accent); outline: none; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: var(--step-0);
  font-weight: 500;
  padding: .75rem 1.4rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }

.form-status {
  margin-top: .9rem;
  min-height: 1.2em;
  color: var(--ink-soft);
}

.placeholder-note {
  margin-top: .85rem;
  color: var(--muted);
  font-size: var(--step--1);
  max-width: 52ch;
}

footer {
  border-top: 1px solid var(--rule);
  padding-block: 2rem 2.75rem;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: var(--step--1);
  color: var(--muted);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 1px;
}
.footer-links a:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 40rem) {
  .masthead {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .brand { margin-right: 0; grid-column: 1; grid-row: 1; }
  .theme-toggle { grid-column: 2; grid-row: 1; }
  .masthead nav { grid-column: 1 / -1; grid-row: 2; }
  .filter { flex: 1 1 100%; max-width: none; }
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

[hidden] { display: none !important; }

.subscribe-box,
.alert-box {
  max-width: 40rem;
  margin: 0 0 1.4rem;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: clamp(1.15rem, 3vw, 1.6rem);
  box-shadow: var(--shadow);
}

.subscribe-box h2,
.alert-box h2 { margin-top: 0; }

.alert-box h2 {
  font-size: var(--step-1);
  line-height: 1.45;
}

.alert-box h2 select,
.stack-form select {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: .95rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: .35rem .8rem;
  margin: .15rem .1rem;
}

.stack-form .field {
  display: block;
  margin: .85rem 0;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: var(--step--1);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.stack-form input[type="email"] {
  display: block;
  width: 100%;
  margin-top: .35rem;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: var(--step-0);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  padding: .7rem .9rem;
}

.stack-form input[type="email"]:focus,
.alert-box h2 select:focus { border-color: var(--accent); outline: none; }

.stack-form .check {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  margin: .2rem 0 .9rem;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: var(--step-0);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
}

.stack-form .check input { margin-top: .35rem; }

.country-links { margin: 0 0 1rem; }

.faq { margin: .2rem 0 1.25rem; }
.faq dt { font-weight: 500; margin-top: .85rem; }
.faq dd { margin: .15rem 0 0; color: var(--ink-soft); }

.tool-index { margin: .4rem 0 1rem 1.2rem; }
.tool-index li { margin: .2rem 0; }

.tag a,
a.tag { color: inherit; text-decoration: none; }
a.tag:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
