/* asai.nz: DataForge palette (dataforge.co.nz landing tokens) on a dark base. */
:root {
  --purple: #5a329a;
  --purple-hi: #8a5cf6;
  --orange: #f39568;
  --orange-hi: #e07e50;
  --teal: #077c76;
  --teal-hi: #13a59d;
  --dark: #0a0812;
  --dark2: #130e24;
  --panel: rgba(255, 255, 255, .045);
  --line: rgba(246, 243, 255, .12);
  --ink: #f6f3ff;
  --muted: rgba(246, 243, 255, .68);
  --radius: 18px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --grad: linear-gradient(110deg, var(--purple) 0%, #7a43d6 45%, var(--orange) 100%);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: 'Inter', 'Inter-Fallback', Arial, sans-serif; font-size: 1.0625rem; line-height: 1.6;
  color: var(--ink); background: var(--dark);
  background-image: radial-gradient(120% 70% at 50% 0%, var(--dark2) 0%, var(--dark) 60%);
  background-attachment: fixed;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); text-underline-offset: 3px; }
a:hover { color: #ffb08a; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.025em; margin: 0 0 .6em; color: #fff; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 750; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; color: #000; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--orange); margin-bottom: .9rem; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 46rem; }
.muted { color: var(--muted); }
.grad-text { background: linear-gradient(90deg, #4fd1ff, var(--purple-hi)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: .55rem; justify-content: center;
  padding: .85rem 1.5rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--grad); color: #fff; font: inherit; font-weight: 700; text-decoration: none;
  box-shadow: 0 10px 30px -12px rgba(138, 92, 246, .8); transition: transform .3s var(--ease), box-shadow .3s;
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 34px -10px rgba(243, 149, 104, .7); }
.btn-sm { padding: .5rem 1rem; font-size: .92rem; }
.btn-ghost { background: transparent; border: 1px solid var(--line); box-shadow: none; color: var(--ink); }
.btn-ghost:hover { border-color: var(--orange); color: #fff; box-shadow: none; }
.btn-orange { background: var(--orange); color: #000; box-shadow: none; font-weight: 600; }
.btn-orange:hover { background: var(--orange-hi); color: #000; }
.btn-danger { background: transparent; border: 1px solid rgba(255, 120, 120, .5); color: #ffb3b3; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }

/* header */
.hdr { position: sticky; top: 0; z-index: 50; background: rgba(10, 8, 18, .82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.hdr-in { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: #fff; margin-right: auto; }
.brand img { border-radius: 9px; }
.brand span { display: flex; flex-direction: column; line-height: 1.05; }
.brand b { font-weight: 900; letter-spacing: .06em; }
.brand small { font-size: .72rem; color: var(--muted); }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a { color: var(--ink); text-decoration: none; padding: .5rem .7rem; border-radius: 10px; font-size: .95rem; font-weight: 500; }
.nav a:hover { background: var(--panel); color: #fff; }
.nav a[aria-current="page"] { color: var(--orange); }
.nav a.btn { color: #fff; margin-left: .35rem; padding: .5rem 1.05rem; }
.nav-group { position: relative; }
.nav-sub-toggle { background: none; border: 0; color: var(--ink); font: inherit; font-size: .95rem; font-weight: 500; padding: .5rem .7rem; border-radius: 10px; cursor: pointer; }
.nav-sub-toggle::after { content: ""; display: inline-block; width: .38em; height: .38em; margin-left: .45em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-.2em) rotate(45deg); }
.nav-sub-toggle:hover { background: var(--panel); color: #fff; }
.nav-group.is-current > .nav-sub-toggle { color: var(--orange); }
.nav-sub { display: none; position: absolute; left: 0; top: 100%; min-width: 12rem; padding: .4rem; margin-top: .35rem; background: rgba(16, 13, 28, .98); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .45); }
.nav-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -.5rem; height: .5rem; }
.nav-sub a { display: block; white-space: nowrap; }
.nav-group:hover > .nav-sub, .nav-group.open > .nav-sub { display: block; }
.nav-toggle { display: none; background: var(--panel); border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: .5rem .9rem; font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; padding: .75rem 1.25rem 1.25rem; background: rgba(10, 8, 18, .97); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: .8rem .6rem; }
  .nav a.btn { margin: .5rem 0 0; }
  /* Phone menu: News Feeds is a heading with its links always shown underneath. */
  .nav-sub-toggle { width: 100%; text-align: left; padding: .8rem .6rem; pointer-events: none; color: var(--muted); }
  .nav-sub-toggle::after { display: none; }
  .nav-sub { display: block; position: static; margin: 0; padding: 0 0 0 1rem; background: none; border: 0; box-shadow: none; min-width: 0; }
  .nav-sub::before { display: none; }
}

/* sections */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-tight { padding: clamp(2.2rem, 5vw, 3.5rem) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }
.page-hero { padding: clamp(3rem, 7vw, 5rem) 0 1rem; }

/* home hero: the banner already carries the wordmark */
.hero { position: relative; padding: 1.25rem 0 0; }
.hero-banner { position: relative; border-radius: calc(var(--radius) + 6px); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 40px 90px -40px rgba(90, 50, 154, .9); }
.hero-banner img { width: 100%; }
.hero-body { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: center; padding: clamp(2rem, 5vw, 3.5rem) 0 0; }
.hero-body h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
.price-pill { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.price-pill .amt { font-size: 2.8rem; font-weight: 900; letter-spacing: -.04em; color: #fff; line-height: 1; }
.price-pill .amt small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.price-pill ul { margin: 1rem 0 1.3rem; padding: 0; list-style: none; }
.price-pill li { padding: .35rem 0 .35rem 1.7rem; position: relative; }
.price-pill li::before { content: ""; position: absolute; left: 0; top: .78rem; width: .9rem; height: .5rem; border-left: 2px solid var(--teal-hi); border-bottom: 2px solid var(--teal-hi); transform: rotate(-45deg); }
@media (max-width: 860px) { .hero-body { grid-template-columns: 1fr; } }

/* cards */
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem; }
.card h3 { margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }
.card-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 1.1rem; background: rgba(138, 92, 246, .16); color: var(--purple-hi); }
.card-icon.o { background: rgba(243, 149, 104, .16); color: var(--orange); }
.card-icon.t { background: rgba(19, 165, 157, .16); color: var(--teal-hi); }
.card-icon svg { width: 24px; height: 24px; }

/* split section with photo */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.split .photo { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.photo-wide { border-radius: calc(var(--radius) + 6px); overflow: hidden; border: 1px solid var(--line); margin: 1.5rem 0 2.5rem; }

/* insights cards */
.icard a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; transition: border-color .3s, transform .3s var(--ease); }
.icard a:hover { border-color: rgba(243, 149, 104, .6); transform: translateY(-3px); color: var(--ink); }
.icard h3 { font-size: 1.12rem; margin: 0 0 .6rem; }
.icard p { color: var(--muted); font-size: .97rem; }
.icard-meta { display: flex; justify-content: space-between; gap: 1rem; font-size: .78rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); margin-bottom: .8rem; }
.icard-meta time { white-space: nowrap; }
.icard-meta span { color: var(--teal-hi); text-transform: uppercase; letter-spacing: .12em; }
.icard-go { margin-top: auto; color: var(--orange); font-weight: 600; font-size: .92rem; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 2rem; }
.chip { display: inline-block; padding: .42rem .9rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .9rem; background: transparent; }
.chip:hover { border-color: var(--orange); color: #fff; }
.chip[aria-current="true"] { background: var(--orange); border-color: var(--orange); color: #000; font-weight: 600; }
.topic-group { margin: 0 0 3.2rem; scroll-margin-top: 6rem; }
.topic-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 1.5rem; margin: 0 0 1.2rem; }
.topic-head h2 { margin: 0; }
.topic-head h2 a { color: inherit; text-decoration: none; }
.topic-head h2 a:hover { color: var(--orange); }
.topic-more { color: var(--orange); font-weight: 600; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.topic-more:hover { text-decoration: underline; }

/* CTA band */
.cta { background: linear-gradient(120deg, rgba(90, 50, 154, .55), rgba(10, 8, 18, .2) 60%, rgba(243, 149, 104, .3)); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); padding: clamp(2rem, 5vw, 3.5rem); display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.cta h2 { margin-bottom: .4rem; }
.cta p { margin: 0; color: var(--muted); }

/* forms */
.form { display: grid; gap: 1.05rem; }
.form label { display: grid; gap: .4rem; font-weight: 600; font-size: .95rem; }
.form .hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; font-weight: 400; color: var(--ink); background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line); border-radius: 12px; padding: .75rem .9rem;
}
.form textarea { min-height: 120px; resize: vertical; }
.form select option { background: var(--dark2); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--purple-hi); box-shadow: 0 0 0 3px rgba(138, 92, 246, .25); }
.form .check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.form .check input { width: auto; margin-top: .3rem; }
.hp { position: absolute; left: -9999px; }
.flash { margin: 1.25rem 0 0; padding: .9rem 1.1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.flash-ok { border-color: rgba(19, 165, 157, .6); }
.flash-error { border-color: rgba(255, 120, 120, .6); color: #ffd0d0; }
.flash-info { border-color: rgba(243, 149, 104, .6); }
.errors { margin: 0 0 1rem; padding: .9rem 1.1rem 0.9rem 2.2rem; border-radius: 12px; border: 1px solid rgba(255, 120, 120, .6); color: #ffd0d0; }

/* membership */
.join-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .join-grid { grid-template-columns: 1fr; } }
.gap-slot { display: inline-block; border: 1px dashed var(--orange); color: var(--orange); border-radius: 8px; padding: 0 .45rem; font-size: .92em; }

/* projects */
.pcard { display: flex; flex-direction: column; }
.pcard .tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: .2rem 0 1rem; }
.pcard .tag { font-size: .75rem; padding: .15rem .55rem; border-radius: 999px; background: rgba(138, 92, 246, .16); color: #d6c6ff; }
.pcard .by { font-size: .85rem; color: var(--muted); margin-top: auto; padding-top: .8rem; }
.pcard .links { display: flex; gap: 1rem; flex-wrap: wrap; font-weight: 600; font-size: .93rem; }
.cat-title { display: flex; align-items: baseline; gap: .7rem; margin: 2.5rem 0 1.1rem; }
.cat-title span { color: var(--muted); font-size: .9rem; font-weight: 500; }
details.submit { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.5rem; margin-bottom: 1.5rem; }
details.submit summary { cursor: pointer; font-weight: 700; color: #fff; }
details.submit[open] summary { margin-bottom: 1.2rem; }

/* tables (account/admin) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
tr:last-child td { border-bottom: 0; }
.status { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--panel); border: 1px solid var(--line); }
.status-active { border-color: var(--teal-hi); color: #9ff0e9; }
.status-past_due, .status-to_ship { border-color: var(--orange); color: var(--orange); }
.status-cancelled { border-color: rgba(255, 120, 120, .6); color: #ffb3b3; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1.5rem; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }

/* prose */
.prose h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.prose li { margin-bottom: .4rem; }

/* footer */
.ftr { border-top: 1px solid var(--line); margin-top: 4rem; background: #07060d; }
.ftr-in { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding: 2.5rem 0 1.5rem; }
.ftr-brand { display: flex; gap: .9rem; align-items: flex-start; max-width: 360px; }
.ftr-brand img { border-radius: 10px; }
.ftr-brand p { margin: 0; color: var(--muted); font-size: .95rem; }
.ftr-brand b { color: #fff; }
.ftr-nav { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; align-content: flex-start; max-width: 560px; }
.ftr-nav a { color: var(--ink); text-decoration: none; font-size: .95rem; padding: .2rem 0; }
.ftr-nav a:hover { color: var(--orange); }
.ftr-small { padding: 0 0 2rem; font-size: .82rem; color: var(--muted); }
.ftr-small a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Insights articles */
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--orange); }
.article-title { font-size: clamp(2rem, 4.6vw, 3.1rem); }
.article-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; color: var(--muted); font-size: .92rem; margin-bottom: 1.2rem; }
.article-meta span:first-child { color: var(--teal-hi); font-weight: 600; }
.article-body { font-size: 1.1rem; line-height: 1.75; }
.article-body h2 { margin-top: 2.4rem; }
.article-body h3 { margin-top: 1.8rem; }
.article-body blockquote { margin: 1.5rem 0; padding: .4rem 0 .4rem 1.2rem; border-left: 3px solid var(--purple-hi); color: var(--muted); }
.article-body code { background: rgba(255, 255, 255, .08); padding: .1rem .35rem; border-radius: 6px; font-size: .9em; }
.article-body pre { background: #07060d; border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; overflow-x: auto; font-size: .9rem; line-height: 1.55; }
.article-body pre code { background: none; padding: 0; }
.article-body .sources { font-size: .95rem; }
.article-body .sources a { word-break: break-word; }
.article-body code { overflow-wrap: anywhere; word-break: break-word; }
.article-body pre { max-width: 100%; }
.article-body pre code { overflow-wrap: normal; word-break: normal; white-space: pre; }
.article-body a { overflow-wrap: anywhere; }
