/* Ultimate ICE license portal. The palette and type of the download page (web/index.css): deep navy glass,
   cyan-blue accents, soft glow; Inter for text, JetBrains Mono for keys. */

:root {
  --bg-0: #030a18;
  --bg-1: #061630;
  --bg-2: #0a2147;
  --panel: rgba(10, 32, 68, .62);
  --line: rgba(110, 180, 255, .16);
  --line-strong: rgba(90, 175, 255, .45);
  --ice: #3fb4ff;
  --ice-hi: #7fd3ff;
  --ice-deep: #1a7fe0;
  --text: #e8f3ff;
  --text-dim: #9fb9d8;
  --text-faint: #6a87ab;
  --good: #5ee0c0;
  --bad: #ff8a8a;
  --warn: #ffd27a;
  --glow: 0 0 24px rgba(63, 180, 255, .45);
  --radius: 22px;
  --gutter: clamp(16px, 4vw, 56px);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(120% 90% at 70% 10%, var(--bg-2) 0%, var(--bg-1) 40%, var(--bg-0) 100%) fixed;
  color: var(--text); font-family: var(--font); line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.bg-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(40% 35% at 50% 30%, rgba(40, 140, 255, .18), transparent 70%),
    radial-gradient(30% 30% at 85% 15%, rgba(80, 200, 255, .10), transparent 70%),
    radial-gradient(35% 30% at 10% 90%, rgba(30, 90, 220, .16), transparent 70%);
}
a { color: var(--ice-hi); }
.mono { font-family: var(--mono); white-space: nowrap; }

/* ---------- Frame and top bar ---------- */
.frame {
  position: relative; z-index: 1;
  width: min(1180px, calc(100% - 2 * clamp(10px, 2vw, 28px)));
  margin: clamp(10px, 2.4vh, 28px) auto; min-height: calc(100vh - 2 * clamp(10px, 2.4vh, 28px));
  display: flex; flex-direction: column;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(14, 44, 92, .38), rgba(4, 14, 34, .30));
  box-shadow: 0 40px 120px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(140, 200, 255, .10);
}
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  min-height: 96px; padding: 16px var(--gutter); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-size: 22px; font-weight: 600; letter-spacing: .01em; }
.brand img { width: 40px; height: 40px; filter: drop-shadow(0 0 10px rgba(63,180,255,.6)); }
.brand b { color: var(--ice); font-weight: 700; }
.brand small { font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); margin-left: 4px; }
.top-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.top-actions form { margin: 0; }
.who { color: var(--text-dim); font-size: 14px; margin-right: 6px; }

main { flex: 1; padding: 36px var(--gutter) 48px; }
footer {
  padding: 22px var(--gutter); border-top: 1px solid var(--line);
  font-size: 13px; letter-spacing: .04em; color: var(--text-faint); display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between;
}
footer a { color: var(--text-dim); }

/* ---------- Type ---------- */
.eyebrow { margin: 0 0 8px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ice-hi); }
h1 { margin: 0 0 12px; font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05;
  text-shadow: 0 6px 40px rgba(20, 90, 200, .45); }
h1 .ice {
  background: linear-gradient(100deg, var(--ice-hi) 0%, var(--ice) 40%, #ffffff 50%, var(--ice) 60%, var(--ice-deep) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
h2 { margin: 0 0 14px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.lead { font-size: 18px; color: var(--text-dim); max-width: 720px; margin: 0 0 28px; }
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); font-size: 13px; }

/* ---------- Panels ---------- */
.card {
  border-radius: 18px; border: 1px solid var(--line-strong); padding: 26px;
  background: linear-gradient(180deg, rgba(14, 44, 92, .55), rgba(6, 22, 50, .70));
  box-shadow: inset 0 1px 0 rgba(160, 215, 255, .14), 0 20px 60px rgba(0, 0, 0, .3);
}
.card + .card, .grid-2 + .card, .card + .grid-2 { margin-top: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
/* Cards side by side: as tall as each other (the grid's gap spaces them, not a margin), each a column whose last
   button sits at its foot, so the buttons line up whatever the text above them. */
.grid-2 > .card { margin-top: 0; display: flex; flex-direction: column; }
.grid-2 > .card > .btn:last-child { margin-top: auto; }
.narrow { max-width: 460px; margin: 0 auto; }

.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px;
  font-size: clamp(34px, 4vw, 44px); font-weight: 800; letter-spacing: -.02em; margin: 6px 0 2px; }
.price small { font-size: 16px; font-weight: 500; color: var(--text-dim); letter-spacing: 0; white-space: nowrap; }
.ticks { list-style: none; padding: 0; margin: 16px 0 22px; }
.ticks li { padding-left: 26px; position: relative; margin: 7px 0; color: var(--text-dim); }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 10px; height: 6px;
  border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn, .pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: rgba(10, 34, 72, .55); color: var(--text);
  text-decoration: none; font: 600 14px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  transition: background .25s, box-shadow .25s, transform .25s;
}
.btn:hover, .pill:hover { background: rgba(30, 90, 170, .55); box-shadow: var(--glow); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(180deg, #49b8ff, #1a7fe0); border-color: rgba(190, 230, 255, .6);
  box-shadow: 0 10px 36px rgba(30, 130, 240, .45), inset 0 1px 0 rgba(255,255,255,.35); color: #fff; }
.btn.primary:hover { box-shadow: 0 10px 44px rgba(30, 130, 240, .65), inset 0 1px 0 rgba(255,255,255,.35); }
.btn.danger { border-color: rgba(255, 130, 130, .5); color: var(--bad); }
.btn.danger:hover { background: rgba(140, 30, 40, .45); box-shadow: 0 0 24px rgba(255, 90, 90, .35); }
.btn.small { height: 34px; padding: 0 14px; font-size: 12px; }
.btn.wide { width: 100%; }
.pill-solid { background: var(--text); color: var(--bg-1); border-color: transparent; }
.pill-solid:hover { background: #fff; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.actions form { margin: 0; }

/* ---------- Forms ---------- */
label { display: block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); margin: 16px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number] {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid rgba(33, 100, 154, .9); background: linear-gradient(180deg, #021f41, #04284d);
  color: var(--text); font: 16px var(--font); outline: none; transition: border-color .2s, box-shadow .2s;
}
input:focus { border-color: var(--ice); box-shadow: 0 0 0 3px rgba(63, 180, 255, .18); }
input[type=checkbox] { accent-color: var(--ice); width: 18px; height: 18px; vertical-align: -3px; margin-right: 8px; }
.check { text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--text); }
.field-error, .validation-summary-errors { color: var(--bad); font-size: 14px; margin-top: 6px; }
.validation-summary-errors ul { margin: 8px 0 0; padding-left: 18px; }
.validation-summary-valid { display: none; }
.note { border-radius: 12px; padding: 12px 16px; margin: 0 0 20px; border: 1px solid var(--line-strong); background: rgba(10, 40, 80, .6); }
.note.good { border-color: rgba(94, 224, 192, .5); color: var(--good); }
.note.bad { border-color: rgba(255, 138, 138, .5); color: var(--bad); }
.note.warn { border-color: rgba(255, 210, 122, .5); color: var(--warn); }

/* ---------- License key with copy ---------- */
.key {
  display: flex; align-items: stretch; gap: 0; margin: 14px 0 6px;
  border-radius: 12px; border: 1px solid rgba(33, 100, 154, .9); background: linear-gradient(180deg, #021f41, #04284d);
}
.key code { flex: 1; padding: 12px 14px; font: 14px/1.6 var(--mono); color: var(--ice-hi); word-break: break-all; }
.copy {
  flex: none; width: 52px; border: 0; border-left: 1px solid rgba(33, 100, 154, .9); border-radius: 0 12px 12px 0;
  background: rgba(20, 70, 130, .45); color: var(--ice-hi); cursor: pointer; display: grid; place-items: center;
  transition: background .2s;
}
.copy:hover { background: rgba(40, 110, 190, .6); }
.copy svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.copy .done { display: none; }
.copy.copied .done { display: block; color: var(--good); }
.copy.copied .idle { display: none; }

/* ---------- License list ---------- */
.lic-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; border: 1px solid var(--line-strong); color: var(--ice-hi); margin-left: 8px; vertical-align: 3px; }
.badge.bad { color: var(--bad); border-color: rgba(255, 138, 138, .5); }
.badge.warn { color: var(--warn); border-color: rgba(255, 210, 122, .5); }
.stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 10px; color: var(--text-dim); font-size: 14px; }
.stats b { display: block; color: var(--text); font-size: 20px; }
.meter { height: 8px; border-radius: 99px; background: rgba(53, 92, 141, .5); margin-top: 8px; overflow: hidden; width: 220px; max-width: 100%; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--ice-deep), var(--ice-hi)); }
.meter.full span { background: linear-gradient(90deg, #c8463c, var(--bad)); }

details { margin-top: 16px; }
summary { cursor: pointer; color: var(--ice-hi); font-size: 14px; letter-spacing: .04em; }
table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 10px; }
th { text-align: left; font-weight: 600; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint);
  padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); color: var(--text-dim); vertical-align: middle; }
td.mono { font-size: 13px; }
.table-wrap { overflow-x: auto; }
tr.flag td { color: var(--warn); }

/* ---------- Admin ---------- */
.tabs { display: flex; gap: 6px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 16px; color: var(--text-dim); text-decoration: none; font-weight: 600; font-size: 14px;
  letter-spacing: .06em; text-transform: uppercase; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--ice-hi); border-bottom-color: var(--ice); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 0 0 20px; }
.tile { border-radius: 16px; border: 1px solid var(--line-strong); padding: 16px 18px;
  background: linear-gradient(180deg, rgba(14, 44, 92, .55), rgba(6, 22, 50, .70)); }
.tile span { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.tile b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 2px; }
.tile small { color: var(--text-dim); font-size: 13px; }
.tile.alert { border-color: rgba(255, 210, 122, .6); }
.tile.alert b { color: var(--warn); }
.select { height: 46px; border-radius: 12px; background: #04284d; color: var(--text); border: 1px solid rgba(33, 100, 154, .9);
  padding: 0 10px; font: 16px var(--font); }
.select.wide { width: 100%; }
.admin-actions { display: grid; gap: 18px; }
.admin-actions form { margin: 0; }
.admin-actions label { margin-top: 0; }
.grid-2.tables { align-items: start; }

/* ---------- Where the key goes (a screenshot of the app with its steps) ---------- */
.howto { margin: 18px 0 0; }
.howto img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line-strong);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .45); }
.howto figcaption { margin-top: 12px; color: var(--text-dim); }
.howto ol { margin: 0; padding-left: 22px; }
.howto li { margin: 4px 0; }
.howto b { color: var(--text); }


/* ---------- Access tiers ---------- */
.tier-rows { display: grid; gap: 8px; }
.tier-row { display: grid; grid-template-columns: 28px 1fr 110px 92px; gap: 10px; align-items: center; }
.tier-head span { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.tier-rank { color: var(--ice-hi); font-weight: 700; text-align: center; }
.tier-tools { display: flex; gap: 4px; }
.icon-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line-strong); background: rgba(10, 40, 80, .6);
  color: var(--text-dim); cursor: pointer; font: 15px var(--font); }
.icon-btn:hover { color: var(--text); background: rgba(30, 90, 170, .55); }
.help-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(10, 40, 80, .6);
  color: var(--ice-hi); font: 600 16px var(--font); cursor: pointer; vertical-align: middle; }
.help-btn:hover { box-shadow: var(--glow); }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.tier-table td:first-child { color: var(--ice-hi); font-weight: 700; width: 28px; }
.tier-table .key code { padding: 8px 10px; font-size: 12px; }
.dialog { max-width: 680px; width: calc(100% - 32px); border-radius: 18px; border: 1px solid var(--line-strong); padding: 26px;
  background: linear-gradient(180deg, #0c2a58, #061630); color: var(--text); box-shadow: 0 30px 90px rgba(0, 0, 0, .6); }
.dialog::backdrop { background: rgba(2, 8, 20, .7); }
.dialog-close { position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--text-dim); font-size: 22px; cursor: pointer; }
.dialog-close:hover { color: var(--text); }
.steps { margin: 0 0 18px; padding-left: 22px; color: var(--text-dim); }
.steps li { margin: 6px 0; }
.steps b { color: var(--text); }
.examples { display: grid; gap: 12px; }
.example { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(6, 22, 50, .5); }
.example > b { grid-column: 1 / -1; font-size: 14px; }
.ladder { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rung { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 13px; color: var(--text); }
.rung small { color: var(--text-faint); margin-left: 4px; }
.gt { color: var(--ice-hi); font-size: 18px; }

@media (max-width: 640px) {
  .topbar { min-height: 0; }
  .brand small { display: none; }
  .card { padding: 18px; }
  .stats { gap: 18px; }
  .tier-row { grid-template-columns: 22px 1fr 72px; }
  .tier-row .tier-tools { grid-column: 2 / -1; }
  .example { grid-template-columns: 1fr; }
}
