/* base.css: shared by every KORE page. Reset, type, controls, chrome, the crosshair frame. */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); background-image: var(--page-bg); background-attachment: fixed;
  color: var(--text); font: 400 var(--fs-md)/1.55 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11";
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.03em; line-height: 1.04; text-wrap: balance; overflow-wrap: break-word; min-width: 0; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
::selection { background: var(--mint); color: var(--ink); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: var(--r-sm); transition: none; }
.num, .tab { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--mint); color: var(--ink); padding: .5rem .875rem; border-radius: var(--r-sm); }
.skip:focus-visible { top: 1rem; }
.up { color: var(--up); } .dn { color: var(--down); }

/* container */
.wrap { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }

/* buttons */
.btn {
  --h: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: var(--h); padding: 0 1.125rem;
  border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; border: 1px solid var(--line-2); color: var(--text);
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:hover { border-color: var(--line-3); background: var(--mint-wash); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.solid { background: var(--chrome); color: var(--ink); border-color: transparent; font-weight: 600; }
.btn.solid:hover { background: var(--mint-hi); }
.btn.sm { --h: 34px; padding: 0 .875rem; font-size: var(--fs-xs); }
.btn .ic { width: 14px; height: 14px; flex: none; }
.mini { font-size: var(--fs-xs); padding: .25rem .625rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--text-2); transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.mini:hover { border-color: var(--line-3); color: var(--text); }
.mini:disabled { opacity: .5; cursor: progress; }

/* brand lockup */
.lock { display: inline-flex; align-items: center; gap: .75rem; }
.lock img { width: 26px; height: auto; }
.lock span { font-weight: 400; font-size: 1.0625rem; letter-spacing: .42em; margin-right: -.42em; color: var(--text); }

/* nav */
.nav { position: sticky; top: 0; z-index: 40; height: var(--nav-h); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid var(--line); }
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 2rem; }
.nav-links { display: flex; gap: 1.75rem; font-size: var(--fs-sm); color: var(--text-2); }
.nav-links a { padding: .375rem 0; transition: color var(--t-fast) var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-r { margin-left: auto; display: flex; gap: .5rem; align-items: center; }
.nav-menu { display: none; }
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-r .btn:not(.solid) { display: none; }
  .nav-menu { display: inline-flex; }
  .nav.open .nav-links { display: flex; position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0; padding: .5rem var(--gutter) 1rem; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open .nav-links a { padding: .875rem 0; border-bottom: 1px solid var(--line); font-size: var(--fs-md); }
}

/* the crosshair frame: hairline grid with a + at every intersection.
   The frame draws top, left and right; each block inside draws its own bottom line. */
.frame { position: relative; border: 1px solid var(--line); border-bottom: 0; }
.cross, .cell::after, .cells.c3 > .cell:nth-child(3n+1)::before, .cells.c2 > .cell:nth-child(2n+1)::before, .cells.c4 > .cell:nth-child(4n+1)::before { content: ""; position: absolute; width: 13px; height: 13px; pointer-events: none; z-index: 2;
  background: linear-gradient(var(--line-3), var(--line-3)) center / 1px 100% no-repeat, linear-gradient(var(--line-3), var(--line-3)) center / 100% 1px no-repeat; }
.frame > .cross.tl { left: -7px; top: -7px; } .frame > .cross.tr { right: -7px; top: -7px; }
.frame > .cross.ml { left: -7px; } .frame > .cross.mr { right: -7px; }
.cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cells.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cells.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cell { position: relative; padding: clamp(1.25rem, 1rem + 1vw, 2rem); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.cell::after { right: -7px; bottom: -7px; }
.cells > .cell::before { left: -7px; bottom: -7px; }
.cells.c3 > .cell:nth-child(3n), .cells.c2 > .cell:nth-child(2n), .cells.c4 > .cell:nth-child(4n), .cells > .cell.last { border-right: 0; }
.blk { position: relative; border-bottom: 1px solid var(--line); }
@media (max-width: 860px) {
  .cells, .cells.c2, .cells.c4 { grid-template-columns: minmax(0, 1fr); }
  .cells > .cell { border-right: 0; }
  .cell::before { content: ""; position: absolute; left: -7px; bottom: -7px; width: 13px; height: 13px; pointer-events: none; z-index: 2;
    background: linear-gradient(var(--line-3), var(--line-3)) center / 1px 100% no-repeat, linear-gradient(var(--line-3), var(--line-3)) center / 100% 1px no-repeat; }
}

/* section head */
.shead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: end; padding: clamp(2rem, 1.4rem + 2.4vw, 3.5rem) clamp(1.25rem, 1rem + 1vw, 2rem); border-bottom: 1px solid var(--line); }
.shead h2 { font-size: var(--fs-3xl); }
.shead p { color: var(--text-2); max-width: 46ch; justify-self: end; }
.step { display: block; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-3); margin-bottom: 1rem; }
@media (max-width: 860px) { .shead { grid-template-columns: minmax(0, 1fr); } .shead p { justify-self: start; } }

/* tags */
.tag { display: inline-flex; align-items: center; gap: .375rem; font-size: .75rem; line-height: 1; padding: .3125rem .5rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; }
.tag.sample { border-style: dashed; border-color: var(--line-3); color: var(--text-2); }

/* monogram coin avatar (no remote logos) */
.mono { --h: 160; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; flex: none; font: 600 9px/1 var(--font); letter-spacing: 0; font-style: normal;
  background: hsl(var(--h) 38% 22%); color: hsl(var(--h) 70% 82%); box-shadow: inset 0 0 0 1px hsl(var(--h) 50% 40% / .5); }
.mono.logo { background: #fff1; box-shadow: none; object-fit: contain; }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: clamp(3rem, 2rem + 4vw, 6rem); padding: 3rem 0 2.5rem; color: var(--text-2); font-size: var(--fs-sm); }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto; gap: 2.5rem; align-items: start; }
.foot .lock { margin-bottom: 1rem; }
.foot-links { display: grid; gap: .625rem; }
.foot-links a { transition: color var(--t-fast) var(--ease); } .foot-links a:hover { color: var(--text); }
.truth { font-size: var(--fs-xs); line-height: 1.6; color: var(--text-3); max-width: 72ch; }
.truth strong { color: var(--text-2); font-weight: 500; }
@media (max-width: 860px) { .foot .wrap { grid-template-columns: minmax(0, 1fr); } }

/* wallet modal (wallet.js) */
.modal { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; background: var(--scrim); backdrop-filter: blur(6px); padding: 1rem; }
.modal.on { display: grid; }
.mbox { width: min(420px, 100%); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 1.5rem; display: grid; gap: 1rem; }
.mbox h3 { font-size: var(--fs-xl); }
.mbox p { color: var(--text-2); font-size: var(--fs-sm); }
.wl { display: grid; gap: .5rem; }
.wl button { display: flex; align-items: center; gap: .75rem; padding: .75rem .875rem; border-radius: var(--r-md); border: 1px solid var(--line-2); text-align: left; transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.wl button:hover { border-color: var(--line-3); background: var(--mint-wash); }
.wl img { width: 24px; height: 24px; border-radius: 6px; }
.wl em { margin-left: auto; font-style: normal; font-size: var(--fs-xs); color: var(--text-3); }
.wl .wdot { width: 24px; height: 24px; border-radius: 6px; background: var(--surface-3); }
.wnone { color: var(--text-2); font-size: var(--fs-sm); }
.mx { justify-self: start; }

/* toasts */
.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 95; display: grid; gap: .5rem; max-width: min(420px, calc(100vw - 2rem)); }
.toast { background: var(--surface-3); border: 1px solid var(--line-2); border-left: 2px solid var(--mint); border-radius: var(--r-md); padding: .75rem 1rem; font-size: var(--fs-sm); animation: tin var(--t-med) var(--ease) both; }
.toast.bad { border-left-color: var(--down); }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
.tag { font-style: normal; }
.dim { color: var(--text-3); }
