:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: #101010;
  --surface-2: #161616;
  --line: #292929;
  --line-strong: #3a3a3a;
  --text: #f5f5f5;
  --muted: #b0b0b0;
  --accent: #a78bfa;
  --accent-2: #8b5cf6;
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #fb7185;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Arial, Helvetica, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

button,
select,
textarea {
  font: inherit;
}

button,
summary,
label.check {
  touch-action: manipulation;
  cursor: pointer;
}

button:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.app {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 22px 18px calc(32px + env(safe-area-inset-bottom));
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #10091d;
  font-weight: 950;
  font-size: 21px;
  box-shadow: 0 0 26px #a78bfa30;
  flex-shrink: 0;
}

.brand-name {
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.brand-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.health {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: #b8b8b8;
  font-size: 11px;
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #666;
  flex-shrink: 0;
}

.dot.online {
  background: var(--green);
  box-shadow: 0 0 9px #4ade8080;
}

.dot.local {
  background: var(--accent);
  box-shadow: 0 0 9px #a78bfa80;
}

.intro {
  margin-bottom: 22px;
}

.kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.19em;
  color: var(--accent);
  text-transform: uppercase;
}

h1 {
  font-size: clamp(29px, 6.5vw, 43px);
  line-height: 1.08;
  letter-spacing: -0.055em;
  margin: 8px 0 8px;
}

.intro p {
  margin: 0;
  color: #c2c2c2;
  font-size: 13px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 16px;
  margin-bottom: 14px;
  min-width: 0;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.card-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.meta {
  font-size: 11px;
  color: #b8b8b8;
}

/* Tap-anywhere-in-panel editor wrapper */
.editor-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 255px;
  border: 1px solid #303030;
  border-radius: 12px;
  background: #090909;
  cursor: text;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.editor-panel:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #a78bfa18;
}

.editor {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 253px;
  resize: vertical;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #ededed;
  padding: 14px;
  outline: none;
  font: 13px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;
  tab-size: 2;
  touch-action: manipulation;
}

.editor::placeholder {
  color: #888;
}

.editor-output-panel {
  min-height: 185px;
}

.editor.output {
  min-height: 183px;
}

.preflight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #232323;
  background: #0b0b0b;
  font-size: 11px;
  color: #c7c7c7;
}

.preflight-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid #333;
  background: #171717;
  color: #e5e5e5;
}

.badge.ok {
  border-color: #166534;
  background: #052e16;
  color: var(--green);
}

.badge.warn {
  border-color: #92400e;
  background: #2b1803;
  color: var(--amber);
}

.badge.err {
  border-color: #9f1239;
  background: #2f0917;
  color: var(--red);
}

.actions,
.output-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  border: 1px solid #444;
  background: #181818;
  color: #f0f0f0;
  border-radius: 10px;
  padding: 10px 15px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  user-select: none;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}

.btn:hover {
  background: #242424;
  border-color: #5b5b5b;
}

.btn:active {
  transform: scale(0.98);
}

.btn.primary {
  min-height: 48px;
  background: var(--accent);
  border-color: var(--accent);
  color: #10091d;
  font-weight: 800;
  padding: 12px 18px;
  font-size: 13px;
}

.btn.primary:hover {
  background: #b69dff;
  border-color: #b69dff;
}

.btn.primary:disabled {
  opacity: 0.58;
  cursor: wait;
}

.btn.clear {
  background: transparent;
  color: #c8c8c8;
}

.hidden {
  display: none !important;
}

.options {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0c0c0c;
  overflow: hidden;
}

.options summary {
  min-height: 48px;
  padding: 13px 16px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 750;
  color: #e4e4e4;
  user-select: none;
}

.options summary::-webkit-details-marker {
  display: none;
}

.options summary:after {
  content: "＋";
  color: var(--accent);
  font-size: 17px;
  line-height: 1;
}

.options[open] summary:after {
  content: "−";
}

.options-body {
  padding: 0 16px 16px;
  border-top: 1px solid #242424;
}

.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 10px;
  color: #c0c0c0;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.field select {
  width: 100%;
  min-height: 44px;
  background: #151515;
  color: #eee;
  border: 1px solid #343434;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
}

.checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #232323;
  border-radius: 10px;
  background: #121212;
  color: #e2e2e2;
  font-size: 12px;
  user-select: none;
  transition: border-color 0.15s, background 0.15s;
}

.check:hover {
  border-color: #3a3a3a;
  background: #171717;
}

.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.runbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 0;
}

.runbar .primary {
  flex: 1;
}

.status {
  font-size: 12px;
  color: var(--muted);
  min-height: 20px;
  margin-top: 10px;
}

.status.error {
  color: var(--red);
}

.status.success {
  color: var(--green);
}

.stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
}

.stats b {
  color: #e5e5e5;
  font-weight: 750;
}

.audit-panel {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #242424;
  background: #0b0b0b;
  display: grid;
  gap: 10px;
}

.audit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pill {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #181426;
  border: 1px solid #352a59;
  color: #d7c9ff;
}

.notes-list {
  margin: 0;
  padding-left: 16px;
  font-size: 11px;
  color: #b5b5b5;
  display: grid;
  gap: 3px;
}

.exec-toolbar {
  display: grid;
  gap: 12px;
}

.exec-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.exec-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.console {
  margin-top: 10px;
  min-height: 128px;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #262626;
  border-radius: 11px;
  background: #080808;
  padding: 12px;
  font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  display: grid;
  gap: 4px;
  align-content: start;
}

.console-empty {
  color: #8b8b8b;
  font-style: italic;
}

.log-line {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 2px 6px;
  border-radius: 6px;
}

.log-line.print {
  color: #e6e6e6;
}

.log-line.warn {
  color: var(--amber);
  background: #231904;
}

.log-line.error {
  color: var(--red);
  background: #280a14;
}

.log-line.ret {
  color: #c4b5fd;
  background: #161029;
}

.log-line.hdr {
  color: #9ca3af;
  font-size: 11px;
  border-bottom: 1px solid #222;
  padding-bottom: 4px;
  margin-top: 4px;
}

.foot {
  text-align: center;
  color: #999;
  font-size: 10px;
  padding: 18px 0 4px;
  letter-spacing: 0.08em;
}

@media (min-width: 720px) {
  .app {
    padding-top: 30px;
  }
  .editor-panel {
    min-height: 275px;
  }
  .editor {
    min-height: 273px;
  }
  .card {
    padding: 18px;
  }
  .intro {
    margin-bottom: 24px;
  }
  .checks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .app {
    padding-left: 12px;
    padding-right: 12px;
  }
  header {
    margin-bottom: 26px;
  }
  .brand-sub {
    font-size: 10px;
  }
  .health {
    padding: 6px 10px;
    font-size: 10px;
  }
  .fields,
  .checks {
    grid-template-columns: 1fr;
  }
  .editor-panel {
    min-height: 225px;
  }
  .editor {
    min-height: 223px;
  }
  .actions .btn,
  .output-actions .btn {
    flex: 1 1 calc(50% - 5px);
  }
  .actions .btn.clear {
    flex: 1 1 100%;
  }
}


/* Trigo Hub landing-page refresh */
:root {
  color-scheme: light;
  --bg: #dff3ff;
  --surface: rgba(255,255,255,.76);
  --surface-2: #f4fbff;
  --line: #b8d9ec;
  --line-strong: #8bbbd7;
  --text: #102b42;
  --muted: #45647b;
  --accent: #087bb8;
  --accent-2: #075f91;
  --green: #087a53;
  --amber: #946000;
  --red: #b4233b;
}
html { background: #dff3ff; scroll-behavior: smooth; }
body {
  color: var(--text);
  background:
    radial-gradient(ellipse at 12% 10%, rgba(255,255,255,.95) 0, rgba(255,255,255,0) 36%),
    linear-gradient(145deg,#dff5ff 0%,#bde6fb 48%,#e8f7ff 100%);
  font-family: DM Sans, sans-serif;
  overflow-x: hidden;
}
body::before, body::after {
  content: ""; position: fixed; z-index: -1; pointer-events: none;
  width: 115vw; height: 42vh; left: -8vw; border-radius: 48% 52% 0 0;
  filter: blur(1px); opacity: .46;
}
body::before { top: 17vh; background: linear-gradient(100deg,rgba(111,199,239,.5),rgba(255,255,255,.48)); transform: rotate(-8deg); animation: waveDrift 17s ease-in-out infinite alternate; }
body::after { top: 57vh; background: linear-gradient(100deg,rgba(91,177,224,.24),rgba(255,255,255,.55)); transform: rotate(7deg); animation: waveDrift 22s ease-in-out infinite alternate-reverse; }
@keyframes waveDrift { from { translate: -2% 0; } to { translate: 3% 2%; } }
* { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }
.app { width: min(100%,1120px); padding: 22px 22px calc(48px + env(safe-area-inset-bottom)); }
.site-header { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:0; padding:8px 0 22px; }
.brand { display:flex; align-items:center; gap:11px; min-width:0; }
.mark { width:42px;height:42px;border-radius:0;display:grid;place-items:center;background:#087bb8;color:#fff;font-weight:800;font-size:21px;box-shadow:0 8px 22px #087bb82b; }
.brand-name { color:#102b42;font-size:14px;font-weight:800;letter-spacing:.11em; }
.brand-sub { color:#496a82;font-size:11px;margin-top:2px; }
.top-nav { display:flex; align-items:center; gap:28px; margin-left:auto; }
.top-nav a { color:#294c65;font-size:13px;font-weight:700;padding:10px 0;position:relative;transition:color .2s ease; }
.top-nav a::after { content:"";position:absolute;left:0;bottom:3px;width:0;height:2px;background:#087bb8;transition:width .25s ease; }
.top-nav a:hover { color:#056b9f; }
.top-nav a:hover::after { width:100%; }
.health { border:1px solid #b4d5e8;border-radius:0;background:#ffffff75;color:#35566d;padding:7px 10px;font-size:10px; }
.dot { background:#91a9b8; }
.dot.online { background:#0b9a69;box-shadow:0 0 8px #0b9a6944; }
.dot.local { background:#087bb8;box-shadow:0 0 8px #087bb844; }
.hero { padding:clamp(42px,8vw,90px) 0 55px; min-height:580px; display:flex;flex-direction:column;align-items:center;text-align:center; }
.hero-copy { max-width:760px; }
.kicker { color:#086da4;font-size:10px;font-weight:800;letter-spacing:.2em;text-transform:uppercase; }
.hero h1 { color:#0c2d46;font-size:clamp(48px,9vw,88px);line-height:1.02;letter-spacing:-.075em;margin:14px 0 12px;font-weight:800; }
.hero-lead { color:#365c75;font-size:clamp(15px,2vw,19px);margin:0 auto 22px;max-width:560px; }
.btn { border-radius:0; min-height:44px; border:1px solid #9fc8df;background:#f7fcff;color:#16415c;padding:11px 16px;font-family:inherit;font-size:12px;font-weight:700;transition:transform .2s ease,background .2s ease,border-color .2s ease,box-shadow .2s ease; }
.btn:hover { background:#eaf7ff;border-color:#68add2;transform:translateY(-2px); }
.btn:active { transform:translateY(0); }
.btn.primary { background:#087bb8;border-color:#087bb8;color:#fff;box-shadow:0 8px 20px #087bb82b; }
.btn.primary:hover { background:#06699f;border-color:#06699f; }
.hero-start { min-width:148px;min-height:48px;font-size:13px; }
.transform-stage { width:min(100%,820px);display:grid;grid-template-columns:1fr 90px 1fr;align-items:center;gap:14px;margin:46px auto 30px; }
.code-card { position:relative;overflow:hidden;text-align:left;min-height:146px;padding:15px 17px;background:rgba(255,255,255,.72);border:1px solid #a9d0e5;box-shadow:0 18px 50px rgba(45,113,151,.10); }
.code-card-label { display:flex;align-items:center;gap:10px;color:#52758c;font-size:9px;font-weight:800;letter-spacing:.13em;margin-bottom:20px; }
.window-dots { color:#4b9bc4;letter-spacing:3px; }
.code-lines { color:#294d65;font:12px/2 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:nowrap; }
.code-lines span { color:#087bb8;font-weight:700; }
.code-lines em { color:#16825e;font-style:normal; }
.obfuscated-lines { color:#17618b;filter:blur(.15px); }
.transform-arrow { display:flex;align-items:center;justify-content:center;gap:8px;color:#087bb8;font-size:25px; }
.transform-arrow span { height:1px;flex:1;background:linear-gradient(90deg,transparent,#087bb8); }
.transform-arrow b { font-weight:500;animation:arrowPulse 1.8s ease-in-out infinite; }
@keyframes arrowPulse { 0%,100%{transform:translateX(-3px);opacity:.55}50%{transform:translateX(4px);opacity:1} }
.code-protected::after { content:"";position:absolute;left:0;right:0;top:-20%;height:2px;background:#2a9bd0;box-shadow:0 0 14px #2a9bd0;animation:scan 3.8s linear infinite; }
@keyframes scan { to { top:120%; } }
.hero-explain { display:flex;align-items:flex-start;gap:16px;text-align:left;max-width:690px;padding:18px 22px;background:rgba(255,255,255,.55);border:1px solid #b7d9eb; }
.explain-mark { display:grid;place-items:center;flex:0 0 34px;height:34px;background:#d4effd;color:#087bb8;font-weight:800; }
.hero-explain h2 { color:#123650;font-size:15px;margin:0 0 5px;letter-spacing:-.02em; }
.hero-explain p { color:#47677d;font-size:12px;line-height:1.8;margin:0; }
.tool-section { scroll-margin-top:20px;padding:56px 0 36px;border-top:1px solid #afd2e5; }
.section-heading { max-width:680px;margin:0 auto 26px;text-align:center; }
.section-heading h2 { color:#102f48;font-size:clamp(27px,5vw,40px);letter-spacing:-.05em;margin:9px 0; }
.section-heading p { color:#486a80;font-size:13px;margin:0;line-height:1.7; }
.card,.options,.pricing-card { background:rgba(255,255,255,.82);border:1px solid #b8d9eb;border-radius:0;box-shadow:0 12px 34px rgba(38,100,135,.07); }
.card { padding:18px;margin-bottom:15px; }
.card-title { color:#183d56; }
.meta { color:#55758b; }
.editor-panel,.console { background:#f5fbff;border:1px solid #a9cce0;border-radius:0; }
.editor { color:#163a53; }
.editor::placeholder { color:#66869b; }
.preflight,.audit-panel { background:#edf8ff;border:1px solid #c3dfed;border-radius:0;color:#355970; }
.badge { border-radius:0;background:#edf6fb;color:#234a63;border-color:#b8d5e5; }
.badge.ok { background:#e3f7ef;color:#08764e;border-color:#8ed2b6; }
.badge.warn { background:#fff5dc;color:#865900;border-color:#e8c56c; }
.badge.err { background:#fff0f2;color:#a51f39;border-color:#e9a4b1; }
.actions,.output-actions,.exec-btns { gap:8px; }
.btn.clear { background:transparent;color:#42647a;border-color:#b3d2e3; }
.options { background:rgba(255,255,255,.8); }
.options summary { color:#173c55; }
.options summary:after { color:#087bb8; }
.options-body { border-top:1px solid #c6dfed; }
.field label { color:#42647a; }
.field select { background:#f5fbff;color:#153a54;border:1px solid #b5d4e5;border-radius:0; }
.check { background:#f4faff;border:1px solid #c7dfed;border-radius:0;color:#294d65; }
.check:hover { background:#e9f6fd;border-color:#8cbfd9; }
.check input { accent-color:#087bb8; }
.status { color:#45677e; }
.status.error { color:#ad233d; }
.status.success { color:#08764e; }
.stats { color:#56758a; }
.stats b { color:#173d57; }
.pill { border-radius:0;background:#e6f5fd;border:1px solid #b2d9ec;color:#145d84; }
.notes-list { color:#4c6a7f; }
.console-empty { color:#67869a; }
.log-line.print { color:#25465e; }
.log-line.warn { color:#805500;background:#fff5df; }
.log-line.error { color:#a51e38;background:#fff0f2; }
.log-line.ret { color:#075f91;background:#e6f5fd; }
.log-line.hdr { color:#55758b;border-bottom-color:#c7deeb; }
.pricing-section { scroll-margin-top:20px;padding:52px 0 30px;border-top:1px solid #afd2e5; }
.pricing-card { max-width:560px;margin:0 auto;padding:24px;text-align:left; }
.pricing-card-top { display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap; }
.pricing-label { color:#087bb8;font-size:10px;font-weight:800;letter-spacing:.15em; }
.pricing-status { color:#42647a;font-size:10px;border:1px solid #b9d8e8;padding:6px 9px; }
.pricing-card h3 { color:#143b55;font-size:23px;letter-spacing:-.04em;margin:22px 0 8px; }
.pricing-card p { color:#4c6d82;font-size:12px;line-height:1.8;margin:0 0 20px; }
.pricing-cta { display:inline-flex; }
.foot { color:#57788d;font-size:10px;letter-spacing:.12em;padding:30px 0 8px; }
@media (max-width:700px) {
 .app { padding:16px 14px calc(36px + env(safe-area-inset-bottom)); }
 .site-header { display:grid;grid-template-columns:1fr auto;gap:12px; }
 .top-nav { grid-column:1 / -1;grid-row:2;justify-content:flex-end;gap:24px;margin:0;padding:2px 0 0; }
 .health { grid-column:2;grid-row:1; }
 .hero { min-height:0;padding:52px 0 40px; }
 .transform-stage { grid-template-columns:1fr;gap:10px;margin:34px auto 22px;max-width:440px; }
 .code-card { min-height:120px;padding:13px; }
 .code-card-label { margin-bottom:10px; }
 .code-lines { font-size:11px; }
 .transform-arrow { height:32px;transform:rotate(90deg);width:100%; }
 .hero-explain { padding:15px;gap:12px; }
 .fields,.checks { grid-template-columns:1fr; }
 .card { padding:13px; }
 .pricing-card { padding:18px; }
}
@media (prefers-reduced-motion:reduce) {
 *,*::before,*::after { scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important; }
}


/* Navigation menu, looping hero demo, and settings dialog */
.site-header { position:relative; z-index:20; }
.header-actions { display:flex; align-items:center; gap:12px; margin-left:auto; }
.menu-toggle { width:44px;height:44px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;border:1px solid #9fc8df;background:#f7fcff;color:#16415c;padding:0;cursor:pointer; }
.menu-toggle span { width:19px;height:2px;background:#16415c;transition:transform .22s ease,opacity .18s ease; }
.menu-toggle[aria-expanded="true"] span:first-child { transform:translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity:0; }
.menu-toggle[aria-expanded="true"] span:last-child { transform:translateY(-8px) rotate(-45deg); }
.top-nav { position:absolute;right:0;top:calc(100% - 10px);display:flex;flex-direction:column;align-items:stretch;gap:0;width:190px;padding:8px;background:rgba(226,245,255,.42);-webkit-backdrop-filter:blur(24px) saturate(175%);backdrop-filter:blur(24px) saturate(175%);border:1px solid rgba(255,255,255,.72);box-shadow:0 18px 42px rgba(30,91,126,.20),inset 0 1px 0 rgba(255,255,255,.72);border-radius:18px;opacity:0;visibility:hidden;transform:translateY(-8px);transition:opacity .2s ease,transform .2s ease,visibility .2s; }
.top-nav[aria-hidden="false"] { opacity:1;visibility:visible;transform:translateY(0); }
.top-nav a { padding:12px 13px;border-bottom:0!important;color:#244c66;border-radius:10px; }
.top-nav a::after { display:none; }
.top-nav a:hover { background:rgba(255,255,255,.42); }
.transform-stage { width:min(100%,650px);display:block;margin:42px auto 24px; }
.transform-loop { min-height:190px;padding:20px 22px;background:rgba(255,255,255,.78);border:1px solid #a9d0e5;box-shadow:0 18px 50px rgba(45,113,151,.10); }
.code-card-label { min-height:14px; }
.demo-label-working,.demo-label-obf { display:none; }
.demo-code { color:#294d65;font:13px/2 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:nowrap; }
.demo-code span { color:#087bb8;font-weight:700; }
.demo-code em { color:#16825e;font-style:normal; }
.demo-working,.demo-obfuscated { position:absolute;left:22px;right:22px;top:62px;opacity:0; }
.demo-working { color:#52758c; }
.demo-obfuscated { color:#17618b; }
.demo-label-source,.demo-label-working,.demo-label-obf,.demo-source,.demo-working,.demo-obfuscated { animation-duration:8.4s;animation-timing-function:linear;animation-iteration-count:infinite; }
.demo-label-source,.demo-source { animation-name:showSource; }
.demo-label-working,.demo-working { animation-name:showWorking; }
.demo-label-obf,.demo-obfuscated { animation-name:showObfuscated; }
@keyframes showSource { 0%,28%{opacity:1} 34%,92%{opacity:0} 98%,100%{opacity:1} }
@keyframes showWorking { 0%,28%{opacity:0} 34%,43%{opacity:1} 49%,100%{opacity:0} }
@keyframes showObfuscated { 0%,43%{opacity:0} 49%,91%{opacity:1} 97%,100%{opacity:0} }
.demo-scan { position:absolute;left:0;right:0;top:-3px;height:2px;background:#2a9bd0;box-shadow:0 0 14px #2a9bd0;animation:demoScan 8.4s ease-in-out infinite;opacity:.8; }
@keyframes demoScan { 0%,30%{top:8%;opacity:0} 38%{top:35%;opacity:1} 56%{top:88%;opacity:1} 65%,100%{top:100%;opacity:0} }
.demo-progress { height:3px;margin-top:22px;background:#dceef8;overflow:hidden; }
.demo-progress span { display:block;width:36%;height:100%;background:#168bc2;animation:demoProgress 8.4s ease-in-out infinite; }
@keyframes demoProgress { 0%{transform:translateX(-110%)} 42%{transform:translateX(90%)} 65%{transform:translateX(280%)} 100%{transform:translateX(280%)} }
.transform-caption { color:#55758b;font-size:11px;margin:12px 0 0;letter-spacing:.04em; }
.configure-row { display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:14px 0 0; }
.configure-btn { min-height:46px; }
.configure-hint { color:#55758b;font-size:11px; }
.options-dialog { width:min(720px,calc(100% - 28px));max-height:min(86vh,780px);padding:22px;border:1px solid #a9d0e5;background:#f5fbff;color:#163a53;box-shadow:0 24px 80px rgba(12,45,70,.28); }
.options-dialog::backdrop { background:rgba(8,31,48,.58);backdrop-filter:blur(3px); }
.options-dialog-head { display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px; }
.options-dialog-head h2 { margin:5px 0 0;font-size:22px;letter-spacing:-.04em;color:#123650; }
.dialog-close { width:40px;height:40px;border:1px solid #b5d4e5;background:#fff;color:#16415c;font-size:26px;line-height:1;cursor:pointer; }
.options-dialog .options { margin:0; }
.options-dialog .options[open] { overflow:auto;max-height:calc(86vh - 105px); }
.options-dialog .options-body { padding-bottom:18px; }
@media (max-width:700px) {
 .site-header { display:flex; }
 .header-actions { gap:8px; }
 .health { max-width:142px;overflow:hidden; }
 .top-nav { top:calc(100% - 8px); }
 .transform-stage { max-width:100%;margin:30px auto 22px; }
 .transform-loop { min-height:178px;padding:16px; }
 .demo-working,.demo-obfuscated { left:16px;right:16px;top:58px;font-size:11px; }
 .demo-source { font-size:11px; }
 .configure-row { align-items:stretch; }
 .configure-btn { width:100%; }
 .options-dialog { padding:16px; }
}
@media (prefers-reduced-motion:reduce) {
 .demo-label-source,.demo-label-working,.demo-label-obf,.demo-source,.demo-working,.demo-obfuscated,.demo-scan,.demo-progress span { animation:none!important; }
 .demo-source { opacity:1!important; }
 .demo-working,.demo-obfuscated,.demo-label-working,.demo-label-obf { opacity:0!important; }
}


/* Original Trigo Hub purple home direction */
.home-page {
  --home-ink: #fff;
  --home-muted: #e4d8fa;
  --home-violet: #a85be8;
  background: #321c63;
  color: var(--home-ink);
}
.home-page::before,.home-page::after { display:none; }
.home-page .app { width:100%;max-width:none;padding:0 0 calc(34px + env(safe-area-inset-bottom)); }
.home-page .site-header {
  width:min(100%,1180px);margin:0 auto;padding:24px 30px 20px;
  color:#fff;
}
.home-page .brand { color:#fff; }
.home-page .mark { width:48px;height:48px;background:transparent;border:1px solid #ffffff9c;color:#fff;box-shadow:none;font-size:24px; }
.home-page .brand-name { color:#fff;font-size:16px;letter-spacing:.12em; }
.home-page .brand-sub { color:#e0d3f5;font-size:11px; }
.home-page .header-actions { margin-left:auto; }
.home-page .menu-toggle { border:0;background:transparent;width:48px;height:48px; }
.home-page .menu-toggle span { background:#fff;width:26px;height:2px; }
.home-page .top-nav { background:#2e185b;border:1px solid #ffffff38;box-shadow:0 18px 50px #160c35a8; }
.home-page .top-nav a { color:#fff;border-color:#ffffff20; }
.home-page .top-nav a:hover { background:#ffffff12; }
.home-page .hero {
  position:relative;isolation:isolate;overflow:hidden;
  width:100%;min-height:calc(100svh - 92px);margin:0;
  padding:clamp(66px,10vw,116px) max(7vw,24px) 70px;
  display:grid;grid-template-columns:minmax(0,1.04fr) minmax(280px,.96fr);
  align-content:center;align-items:center;gap:38px;
  text-align:left;color:#fff;
  background:
    radial-gradient(ellipse at 80% 78%,rgba(195,83,236,.62),transparent 38%),
    radial-gradient(ellipse at 8% 5%,rgba(111,76,183,.7),transparent 48%),
    linear-gradient(132deg,#39216e 0%,#57338e 48%,#8c4cae 100%);
}
.home-page .hero::before {
  content:"";position:absolute;z-index:-1;right:-12%;top:12%;width:min(66vw,720px);aspect-ratio:1;border-radius:50%;
  background:
   radial-gradient(circle at 50% 50%,transparent 0 38%,rgba(239,174,255,.22) 39%,transparent 40% 47%,rgba(221,150,255,.2) 48%,transparent 49%),
   repeating-radial-gradient(circle at 50% 50%,rgba(255,255,255,.22) 0 1px,transparent 1px 7px);
  mask-image:radial-gradient(circle,black 0 54%,transparent 73%);
  opacity:.75;animation:homeOrb 24s linear infinite;
}
.home-page .hero::after {
  content:"";position:absolute;z-index:-1;right:5%;top:22%;width:min(48vw,530px);aspect-ratio:1;border-radius:50%;
  background:radial-gradient(circle at 35% 32%,rgba(255,255,255,.24),rgba(218,121,255,.15) 35%,rgba(159,65,205,.06) 65%,transparent 70%);
  filter:blur(2px);
}
@keyframes homeOrb { to { transform:rotate(360deg); } }
.home-page .hero-orbit { display:none; }
.home-page .hero-copy { position:relative;z-index:1;max-width:650px; }
.home-page .kicker { color:#e7b9ff;font-size:11px;letter-spacing:.2em; }
.home-page .hero h1 {
  max-width:690px;color:#fff;font-size:clamp(48px,7.8vw,94px);
  line-height:1.03;letter-spacing:-.075em;margin:18px 0 20px;font-weight:800;
}
.home-page .hero-lead { color:#f0e8fb;font-size:clamp(16px,2vw,21px);line-height:1.7;margin:0 0 30px;max-width:510px; }
.home-page .hero-start { min-width:168px;min-height:58px;background:#fff;border:1px solid #fff;color:#3b216c;font-size:15px;box-shadow:0 12px 30px #21104455; }
.home-page .hero-start:hover { background:#f0e2ff;border-color:#f0e2ff;transform:translateY(-2px); }
.home-page .hero-note { display:flex;align-items:center;gap:11px;margin-top:32px;color:#d7c4ee;font-size:9px;font-weight:800;letter-spacing:.15em; }
.home-page .hero-note span { width:4px;height:4px;border-radius:50%;background:#e9b8ff; }
.home-page .transform-stage { position:relative;z-index:1;width:100%;max-width:570px;margin:30px auto; }
.home-page .transform-loop {
  min-height:220px;padding:23px 24px;background:rgba(27,15,54,.72);
  border:1px solid rgba(255,255,255,.24);box-shadow:0 25px 80px rgba(20,8,43,.3);
  backdrop-filter:blur(12px);
}
.home-page .code-card-label { color:#d9c5f1; }
.home-page .window-dots { color:#d39cf2; }
.home-page .demo-code { color:#f0e5fc;font-size:13px; }
.home-page .demo-code span { color:#d7a2ff; }
.home-page .demo-code em { color:#8ee2c4; }
.home-page .demo-working { color:#e1c9f6; }
.home-page .demo-obfuscated { color:#d8b0ff; }
.home-page .demo-scan { background:#d9a0ff;box-shadow:0 0 16px #d9a0ff; }
.home-page .demo-progress { background:#ffffff25; }
.home-page .demo-progress span { background:#d89cff; }
.home-page .transform-caption { color:#e0d2f1; }
.home-page .hero-explain {
  position:relative;z-index:1;grid-column:1 / -1;width:min(100%,820px);margin:12px auto 0;
  background:rgba(30,15,60,.42);border:1px solid #ffffff38;padding:22px 24px;
  color:#fff;backdrop-filter:blur(10px);
}
.home-page .explain-mark { background:#ffffff20;color:#fff; }
.home-page .hero-explain h2 { color:#fff;font-size:17px; }
.home-page .hero-explain p { color:#e5d8f5;font-size:13px; }
.home-page .foot { color:#ddc9f1;background:#321c63;padding:25px 16px 8px; }
@media (max-width:760px) {
 .home-page .site-header { padding:18px 18px 14px; }
 .home-page .hero {
   min-height:0;grid-template-columns:1fr;gap:22px;
   padding:66px 25px 42px;align-content:start;
 }
 .home-page .hero::before { width:105vw;right:-42%;top:10%;opacity:.56; }
 .home-page .hero::after { width:75vw;right:-20%;top:18%; }
 .home-page .hero h1 { font-size:clamp(48px,12vw,76px);max-width:560px; }
 .home-page .hero-lead { max-width:520px;font-size:17px;line-height:1.65; }
 .home-page .hero-note { flex-wrap:wrap;font-size:8px; }
 .home-page .transform-stage { margin:24px auto 8px;max-width:560px; }
 .home-page .transform-loop { min-height:178px;padding:16px; }
 .home-page .demo-working,.home-page .demo-obfuscated { left:16px;right:16px;top:58px;font-size:11px; }
 .home-page .demo-source { font-size:11px; }
 .home-page .hero-explain { grid-column:auto;margin-top:14px;padding:17px; }
}
@media (prefers-reduced-motion:reduce) {
 .home-page .hero::before { animation:none; }
}


/* Keep the original Trigo sky-blue background on the home page */
html:has(body.home-page) { background:#dff3ff; }
body.home-page {
  color:#102b42;
  background:
    radial-gradient(ellipse at 12% 10%,rgba(255,255,255,.95) 0,rgba(255,255,255,0) 36%),
    linear-gradient(145deg,#dff5ff 0%,#bde6fb 48%,#e8f7ff 100%);
  font-family:DM Sans,sans-serif;
}
body.home-page::before,body.home-page::after {
  display:block;content:"";position:fixed;z-index:-1;pointer-events:none;
  width:115vw;height:42vh;left:-8vw;border-radius:48% 52% 0 0;
  filter:blur(1px);opacity:.46;
}
body.home-page::before {
  top:17vh;background:linear-gradient(100deg,rgba(111,199,239,.5),rgba(255,255,255,.48));
  transform:rotate(-8deg);animation:waveDrift 17s ease-in-out infinite alternate;
}
body.home-page::after {
  top:57vh;background:linear-gradient(100deg,rgba(91,177,224,.24),rgba(255,255,255,.55));
  transform:rotate(7deg);animation:waveDrift 22s ease-in-out infinite alternate-reverse;
}
.home-page .site-header { color:#102b42; }
.home-page .brand { color:#102b42; }
.home-page .mark { background:#087bb8;color:#fff;border:0; }
.home-page .brand-name { color:#102b42; }
.home-page .brand-sub { color:#496a82; }
.home-page .menu-toggle { border:1px solid #9fc8df;background:#f7fcff; }
.home-page .menu-toggle span { background:#16415c; }
.home-page .top-nav { background:#f8fcff;border:1px solid #a9d0e5;box-shadow:0 18px 40px rgba(30,91,126,.18); }
.home-page .top-nav a { color:#294c65;border-color:#d5e8f3; }
.home-page .top-nav a:hover { background:#eaf7ff;color:#056b9f; }
.home-page .hero {
  color:#102b42;
  background:transparent;
}
.home-page .hero::before,.home-page .hero::after { display:none; }
.home-page .kicker { color:#086da4; }
.home-page .hero h1 { color:#0c2d46; }
.home-page .hero-lead { color:#365c75; }
.home-page .hero-start { background:#087bb8;border-color:#087bb8;color:#fff;box-shadow:0 8px 20px #087bb82b; }
.home-page .hero-start:hover { background:#06699f;border-color:#06699f; }
.home-page .hero-note { color:#496a82; }
.home-page .hero-note span { background:#087bb8; }
.home-page .transform-loop {
  background:rgba(255,255,255,.82);border:1px solid #a9d0e5;
  box-shadow:0 18px 50px rgba(45,113,151,.12);backdrop-filter:blur(8px);
}
.home-page .code-card-label { color:#52758c; }
.home-page .window-dots { color:#4b9bc4; }
.home-page .demo-code { color:#294d65; }
.home-page .demo-code span { color:#087bb8; }
.home-page .demo-code em { color:#16825e; }
.home-page .demo-working { color:#52758c; }
.home-page .demo-obfuscated { color:#17618b; }
.home-page .demo-scan { background:#2a9bd0;box-shadow:0 0 14px #2a9bd0; }
.home-page .demo-progress { background:#dceef8; }
.home-page .demo-progress span { background:#168bc2; }
.home-page .transform-caption { color:#55758b; }
.home-page .hero-explain { background:rgba(255,255,255,.55);border:1px solid #b7d9eb;color:#102b42;backdrop-filter:blur(8px); }
.home-page .explain-mark { background:#d4effd;color:#087bb8; }
.home-page .hero-explain h2 { color:#123650; }
.home-page .hero-explain p { color:#47677d; }
.home-page .foot { color:#57788d;background:transparent; }

/* More readable, deliberate source -> processing -> protected animation */
.home-page .transform-loop { min-height:214px; }
.home-page .code-card-label { position:relative;min-height:17px;margin-bottom:17px; }
.home-page .code-card-label::after {
  content:"";position:absolute;right:0;top:5px;width:7px;height:7px;border-radius:50%;
  background:#16a36b;box-shadow:0 0 0 4px rgba(22,163,107,.12);
  animation:enginePulse 1.6s ease-in-out infinite;
}
@keyframes enginePulse { 50% { opacity:.35;box-shadow:0 0 0 7px rgba(22,163,107,0); } }
.home-page .demo-label-source,.home-page .demo-label-working,.home-page .demo-label-obf,
.home-page .demo-source,.home-page .demo-working,.home-page .demo-obfuscated {
  animation-duration:10s;animation-timing-function:cubic-bezier(.4,0,.2,1);animation-iteration-count:infinite;
}
.home-page .demo-label-source,.home-page .demo-source { animation-name:homeShowSource; }
.home-page .demo-label-working,.home-page .demo-working { animation-name:homeShowWorking; }
.home-page .demo-label-obf,.home-page .demo-obfuscated { animation-name:homeShowObf; }
@keyframes homeShowSource {
  0%,23% { opacity:1;transform:translateY(0);filter:blur(0); }
  29%,91% { opacity:0;transform:translateY(-7px);filter:blur(2px); }
  97%,100% { opacity:1;transform:translateY(0);filter:blur(0); }
}
@keyframes homeShowWorking {
  0%,25% { opacity:0;transform:translateY(8px); }
  32%,47% { opacity:1;transform:translateY(0); }
  54%,100% { opacity:0;transform:translateY(-6px); }
}
@keyframes homeShowObf {
  0%,48% { opacity:0;transform:translateY(8px);filter:blur(2px); }
  56%,86% { opacity:1;transform:translateY(0);filter:blur(0); }
  93%,100% { opacity:0;transform:translateY(-5px);filter:blur(1px); }
}
.home-page .demo-scan {
  height:2px;top:0;animation:homeScan 10s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes homeScan {
  0%,25% { top:12%;opacity:0; }
  31% { top:22%;opacity:1; }
  52% { top:83%;opacity:1; }
  58%,100% { top:100%;opacity:0; }
}
.home-page .demo-progress span {
  animation:homeProgress 10s cubic-bezier(.65,0,.35,1) infinite;
}
@keyframes homeProgress {
  0%,24% { transform:translateX(-110%); }
  53% { transform:translateX(175%); }
  59%,100% { transform:translateX(280%); }
}
@media (max-width:760px) {
  .home-page .transform-loop { min-height:190px; }
  .home-page .demo-working,.home-page .demo-obfuscated { left:16px;right:16px;top:58px; }
}
@media (prefers-reduced-motion:reduce) {
  body.home-page::before,body.home-page::after { animation:none; }
  .home-page .demo-label-source,.home-page .demo-source { animation:none!important;opacity:1!important;transform:none!important; }
  .home-page .demo-label-working,.home-page .demo-working,.home-page .demo-label-obf,.home-page .demo-obfuscated { animation:none!important;opacity:0!important; }
  .home-page .demo-scan,.home-page .demo-progress span,.home-page .code-card-label::after { animation:none!important; }
}


/* Clean borderless surfaces and smooth page navigation */
.card,.options,.pricing-card,.editor-panel,.console,.preflight,.audit-panel,
.transform-loop,.hero-explain,.options-dialog,.field select,.check,.pill,
.pricing-status,.menu-toggle,.top-nav,.home-page .mark,.dialog-close {
  border:0 !important;
  outline:0 !important;
}
.btn,.hero-start,.configure-btn,.runbar .btn,.actions .btn,.output-actions .btn {
  border:0 !important;
  outline:0 !important;
}
.top-nav a { border:0 !important; }
.pricing-section { border-top:0 !important; }
.options-dialog { box-shadow:0 22px 70px rgba(12,45,70,.18); }
.options-dialog .options-dialog-content { overflow:auto;max-height:calc(86vh - 100px); }
.options-dialog .options-body { padding-top:0; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {
  outline:2px solid #168bc2 !important;
  outline-offset:3px;
  box-shadow:none;
}
body.page-entering .app { animation:trigoPageIn .32s ease both; }
body.page-leaving .app { animation:trigoPageOut .19s ease both; pointer-events:none; }
@keyframes trigoPageIn {
  from { opacity:0;transform:translateY(9px); }
  to { opacity:1;transform:translateY(0); }
}
@keyframes trigoPageOut {
  from { opacity:1;transform:translateY(0); }
  to { opacity:0;transform:translateY(-5px); }
}
@media (prefers-reduced-motion:reduce) {
  body.page-entering .app,body.page-leaving .app { animation:none; }
}


/* Transparent surfaces with the original black outlines restored */
.card,.pricing-card,.editor-panel,.console,.preflight,.audit-panel,
.transform-loop,.hero-explain,.options-dialog,.field select,.check,.pill,
.pricing-status,.menu-toggle,.top-nav,.dialog-close,.top-nav a {
  border:1px solid #111 !important;
  outline:0;
  box-shadow:none;
}
.card,.pricing-card,.preflight,.audit-panel,.transform-loop,.hero-explain,
.options-dialog,.check,.pill,.pricing-status,.top-nav,.menu-toggle,
.dialog-close,.field select {
  background:transparent !important;
}
.btn,.hero-start,.configure-btn,.runbar .btn,.actions .btn,.output-actions .btn {
  border:1px solid #111 !important;
  background:transparent;
  color:inherit;
  box-shadow:none;
}
.btn.primary,.hero-start,.btn.primary:hover {
  background:#087bb8 !important;
  border-color:#111 !important;
  color:#fff !important;
}
.home-page .transform-loop,.home-page .hero-explain {
  background:transparent !important;
  border:1px solid #111 !important;
  box-shadow:none !important;
}
.home-page .menu-toggle,.home-page .top-nav {
  background:transparent !important;
  border:1px solid #111 !important;
}
.home-page .top-nav a { border:1px solid #111 !important; }
.options-dialog { background:transparent !important; }


/* Trigo Hub UI refinement — preserve the existing sky-blue page background */
:root {
  --text:#102f45;
  --muted:#4b6c81;
  --accent:#087bb8;
  --accent-2:#06699f;
  --line:#16394d;
  --line-soft:rgba(22,57,77,.28);
  --surface:rgba(187,225,245,.34);
  --surface-2:rgba(174,218,241,.42);
}
html,body { background-color:#dff3ff; }
body {
  color:#102f45;
  font-family:DM Sans,system-ui,-apple-system,"Segoe UI",sans-serif;
  line-height:1.6;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}
.app { width:min(100%,1040px);padding:26px 22px calc(48px + env(safe-area-inset-bottom)); }
.site-header { min-height:68px;gap:16px;padding-bottom:22px; }
.brand { gap:13px; }
.mark { width:44px;height:44px;font-size:20px;box-shadow:0 5px 16px rgba(8,123,184,.16); }
.brand-name { font-size:14px;letter-spacing:.12em; }
.brand-sub { font-size:11px;color:#4c6d82; }
.menu-toggle {
  width:44px;height:44px;gap:5px;border:1px solid #16394d !important;
  border-radius:8px;background:rgba(190,228,247,.45) !important;
  transition:background .2s ease,transform .2s ease;
}
.menu-toggle:hover { background:rgba(165,215,240,.7) !important;transform:translateY(-1px); }
.menu-toggle span { width:19px;height:2px;background:#16394d; }
.top-nav {
  padding:8px;border:1px solid #16394d !important;border-radius:10px;
  background:rgba(190,228,247,.94) !important;
  box-shadow:0 16px 36px rgba(27,80,111,.14);
  backdrop-filter:blur(14px);
}
.top-nav a {
  padding:10px 13px;border:0 !important;border-radius:6px;
  color:#173d55;font-size:12px;transition:background .18s ease,color .18s ease;
}
.top-nav a:hover { background:rgba(8,123,184,.12);color:#075f91; }
.top-nav a::after { display:none; }
.kicker { color:#086da4;letter-spacing:.16em; }
.section-heading { max-width:700px;margin:0 auto 24px; }
.section-heading h2 { color:#102f48;line-height:1.12; }
.section-heading p { max-width:620px;margin:0 auto;color:#496b81;line-height:1.75; }
.tool-section,.pricing-section { border-top:1px solid rgba(22,57,77,.2);padding-top:42px; }
.tool-section .section-heading { text-align:left;margin:0 0 24px; }
.tool-section .section-heading p { margin:0; }
.card,.pricing-card,.options,.audit-panel,.preflight,.hero-explain,.transform-loop {
  border:1px solid #16394d !important;
  border-radius:10px !important;
  background:rgba(185,224,244,.36) !important;
  box-shadow:0 8px 24px rgba(32,94,128,.07) !important;
}
.card { padding:20px;margin-bottom:16px; }
.card-head { margin-bottom:13px; }
.card-title { color:#14384f;font-size:11px;letter-spacing:.12em; }
.meta { color:#52738a;font-size:11px; }
.editor-panel,.console {
  border:1px solid #16394d !important;border-radius:8px !important;
  background:#102b40 !important;box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
  overflow:hidden;
}
.editor-panel:focus-within { border-color:#087bb8 !important;box-shadow:0 0 0 3px rgba(8,123,184,.15); }
.editor { color:#e7f5fd !important;background:transparent !important;font-size:13px;line-height:1.7;padding:16px; }
.editor::placeholder { color:#9ab6c8 !important; }
.console { color:#e7f5fd; }
.console-empty { color:#9ab6c8; }
.log-line.print { color:#e7f5fd; }
.log-line.hdr { color:#8fc9e8;border-bottom-color:rgba(220,243,255,.18); }
.log-line.warn { color:#ffd98a;background:rgba(148,96,0,.18); }
.log-line.error { color:#ffabb8;background:rgba(180,35,59,.18); }
.log-line.ret { color:#9ddcff;background:rgba(8,123,184,.16); }
.preflight,.audit-panel { background:rgba(171,216,239,.42) !important;color:#355970; }
.badge { border-radius:5px;background:rgba(207,236,250,.72);border:1px solid #16394d;color:#234a63; }
.badge.ok { background:rgba(190,239,220,.72);border-color:#176c50;color:#075c40; }
.badge.warn { background:rgba(255,229,174,.7);border-color:#946000;color:#754900; }
.badge.err { background:rgba(255,211,219,.72);border-color:#a51f39;color:#8f1830; }
.btn,.dialog-close,.field select,.check,.pill,.pricing-status {
  border:1px solid #16394d !important;
  border-radius:7px !important;
  box-shadow:none !important;
}
.btn {
  min-height:43px;padding:10px 15px;
  background:rgba(183,222,242,.48) !important;color:#173b52 !important;
  font-family:inherit;font-size:12px;font-weight:700;
  transition:transform .18s ease,background .18s ease,box-shadow .18s ease;
}
.btn:hover {
  background:rgba(155,210,237,.72) !important;
  transform:translateY(-1px);
  box-shadow:0 5px 14px rgba(26,91,128,.1) !important;
}
.btn:active { transform:translateY(0) scale(.985); }
.btn.primary,.btn.primary:hover,.hero-start {
  background:#087bb8 !important;border-color:#16394d !important;color:#fff !important;
  box-shadow:0 6px 16px rgba(8,123,184,.2) !important;
}
.btn.primary:hover,.hero-start:hover { background:#06699f !important; }
.btn.clear { background:transparent !important;color:#355970 !important; }
.configure-row { margin:18px 0 12px;gap:12px; }
.configure-btn { min-height:46px; }
.configure-hint { color:#52738a;font-size:11px; }
.options-dialog {
  border:1px solid #16394d !important;border-radius:12px !important;
  background:#c7e8f8 !important;color:#14384f;
  box-shadow:0 24px 70px rgba(17,62,89,.24) !important;
}
.options-dialog::backdrop { background:rgba(12,43,64,.48);backdrop-filter:blur(5px); }
.options-dialog-head { margin-bottom:18px; }
.options-dialog-head h2 { color:#102f48;letter-spacing:-.04em; }
.dialog-close { background:rgba(183,222,242,.6) !important;color:#173b52; }
.options-dialog .options { background:rgba(176,218,241,.38) !important; }
.options-body { border-top:1px solid rgba(22,57,77,.22); }
.field { gap:7px; }
.field label { color:#3f637a;font-size:10px;letter-spacing:.1em; }
.field select {
  min-height:46px;padding:11px 12px;
  background:rgba(211,237,249,.78) !important;color:#14384f !important;
  font-family:inherit;font-size:12px;
}
.check {
  min-height:46px;padding:10px 12px;
  background:rgba(190,226,244,.42) !important;color:#23485f;
  font-size:11px;line-height:1.45;
  transition:background .18s ease,transform .18s ease;
}
.check:hover { background:rgba(163,214,239,.7) !important;transform:translateY(-1px); }
.check input { accent-color:#087bb8; }
.runbar { margin-top:16px; }
.runbar .primary { min-height:50px;font-size:13px;letter-spacing:.01em; }
.status { min-height:22px;color:#496b81;line-height:1.6; }
.stats { gap:9px; }
.stats span { padding:8px 11px;border:1px solid rgba(22,57,77,.25);border-radius:7px;background:rgba(187,225,245,.34); }
.stats b { color:#123a54; }
.pill { background:rgba(180,222,242,.55) !important;color:#145d84; }
.notes-list { color:#496b81;line-height:1.65; }
.pricing-card { max-width:620px;padding:28px; }
.pricing-card h3 { color:#123650;font-size:clamp(22px,4vw,30px);line-height:1.2;letter-spacing:-.04em; }
.pricing-card p { color:#496b81;line-height:1.75; }
.pricing-status { background:rgba(184,226,245,.45) !important;color:#355970; }
.pricing-cta { margin-top:8px; }
.hero-explain { padding:22px 24px; }
.foot { color:#52738a;padding-top:28px; }
.home-page .hero-start { min-height:52px;border-radius:7px !important; }
.home-page .transform-loop { border-radius:10px !important; }
.home-page .hero-explain { border-radius:10px !important; }
.page-entering .app { animation:trigoPageIn .34s cubic-bezier(.2,.7,.2,1) both; }
.page-leaving .app { animation:trigoPageOut .2s ease both; }
@media (max-width:760px) {
  .app { padding:18px 15px calc(34px + env(safe-area-inset-bottom)); }
  .site-header { padding-bottom:18px; }
  .tool-section,.pricing-section { padding-top:30px; }
  .card { padding:15px; }
  .options-dialog { width:calc(100% - 22px);max-height:88dvh;padding:17px; }
  .options-dialog .options-dialog-content { max-height:calc(88dvh - 110px); }
  .pricing-card { padding:20px; }
  .section-heading h2 { font-size:30px; }
  .actions,.output-actions,.exec-btns { gap:8px; }
  .actions .btn,.output-actions .btn,.exec-btns .btn { flex:1 1 calc(50% - 6px); }
}
@media (max-width:420px) {
  .brand-name { font-size:12px; }
  .brand-sub { font-size:10px; }
  .card { padding:13px; }
  .btn { padding:10px 12px; }
  .hero-explain { gap:12px;padding:16px; }
}
@media (prefers-reduced-motion:reduce) {
  .btn,.check,.menu-toggle { transition:none !important; }
  .btn:hover,.check:hover { transform:none; }
}


/* Navigation menu: clearly filled selection states */
.home-page .top-nav a {
  display:flex;align-items:center;min-height:42px;padding:10px 15px;
  border:1px solid transparent !important;border-radius:7px;
  background:rgba(8,123,184,.055);color:#173d55;
}
.home-page .top-nav a:hover,
.home-page .top-nav a:focus-visible {
  background:#b6e3f8 !important;border-color:#087bb8 !important;
  color:#064f78 !important;outline:none;
}
.home-page .top-nav a:active { background:#91d1f1 !important; }

/* DM Sansactive before/after code reveal inspired by Luraph's clear product presentation,
   with Trigo's own colors and a draggable comparison handle. */
.home-page .transform-stage { max-width:620px;margin:28px auto 18px; }
.home-page .compare-heading {
  display:flex;justify-content:space-between;align-items:center;gap:12px;
  margin:0 2px 11px;color:#24536e;font-size:10px;font-weight:800;letter-spacing:.14em;
}
.home-page .compare-hint { color:#087bb8;font-size:9px; }
.home-page .compare-panel {
  --split:50%;position:relative;width:100%;height:286px;overflow:hidden;
  border:1px solid #16394d;border-radius:10px;
  background:#102b40;box-shadow:0 18px 42px rgba(28,83,116,.18);
  isolation:isolate;touch-action:pan-y;
}
.home-page .compare-pane { position:absolute;inset:0;padding:17px 18px 22px;overflow:hidden; }
.home-page .compare-protected { background:#102b40;color:#d4edfb; }
.home-page .compare-original {
  z-index:2;background:#eaf7ff;color:#183c53;
  clip-path:inset(0 calc(100% - var(--split)) 0 0);
}
.home-page .compare-pane-head {
  display:flex;align-items:center;gap:8px;height:26px;margin-bottom:16px;
  font-size:9px;font-weight:800;letter-spacing:.14em;white-space:nowrap;
}
.home-page .compare-original .compare-pane-head { color:#315b74; }
.home-page .compare-protected .compare-pane-head { color:#a8d8f0; }
.home-page .compare-indicator { width:7px;height:7px;border-radius:50%;background:#27a878;box-shadow:0 0 0 4px rgba(39,168,120,.13); }
.home-page .compare-pane pre {
  margin:0;white-space:pre;overflow:visible;font:500 11px/1.95 ui-monospace,SFMono-Regular,Consolas,monospace;
}
.home-page .compare-original code { color:#244c65; }
.home-page .compare-protected code { color:#d1eafa; }
.home-page .compare-divider {
  position:absolute;z-index:4;top:0;bottom:0;left:var(--split);width:2px;
  transform:translateX(-1px);background:#087bb8;pointer-events:none;
  box-shadow:0 0 0 1px rgba(255,255,255,.7),0 0 18px rgba(8,123,184,.4);
}
.home-page .compare-divider span {
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  display:flex;align-items:center;justify-content:center;gap:3px;
  width:34px;height:48px;border:1px solid #16394d;border-radius:8px;
  background:#f4fbff;box-shadow:0 3px 12px rgba(13,57,82,.22);
}
.home-page .compare-divider i { display:block;width:3px;height:12px;border-radius:3px;background:#087bb8; }
.home-page .compare-range {
  position:absolute;z-index:5;inset:0;width:100%;height:100%;margin:0;
  opacity:0;cursor:ew-resize;touch-action:pan-y;
}
.home-page .compare-range::-webkit-slider-thumb { appearance:none;width:40px;height:100%; }
.home-page .compare-range::-moz-range-thumb { width:40px;height:100%;border:0;background:transparent; }
.home-page .compare-legend {
  display:flex;justify-content:center;gap:22px;margin:13px 0 0;
  color:#496b81;font-size:10px;font-weight:700;
}
.home-page .compare-legend span { display:flex;align-items:center;gap:7px; }
.home-page .compare-legend i { display:inline-block;width:7px;height:7px;border-radius:50%; }
.home-page .legend-source { background:#087bb8; }
.home-page .legend-protected { background:#102b40; }
.home-page .transform-caption { margin-top:8px;text-align:center;color:#55758b;font-size:11px; }
@media(max-width:760px) {
 .home-page .compare-panel { height:260px; }
 .home-page .compare-pane { padding:15px 12px; }
 .home-page .compare-pane pre { font-size:9px;line-height:1.9; }
 .home-page .compare-heading { font-size:9px; }
 .home-page .compare-divider span { width:30px;height:42px; }
}
@media(prefers-reduced-motion:reduce) {
 .home-page .compare-divider { transition:none; }
}

.home-page .top-nav a[aria-current="page"] {
  background:#b6e3f8 !important;border-color:#087bb8 !important;
  color:#064f78 !important;font-weight:800;
}
.home-page .compare-protected .compare-pane-head {
  justify-content:flex-end;padding-right:2px;
}
.home-page .compare-protected pre { padding-left:52%; }

/* Readability pass: larger type across the site, including small screens */
body { font-size:16px; }
.brand-name { font-size:15px; }
.brand-sub { font-size:12px; }
.kicker { font-size:12px; }
.hero h1 { font-size:clamp(36px,7vw,54px); }
.hero-lead { font-size:17px;line-height:1.75; }
.hero-note { font-size:11px; }
.section-heading p,.hero-explain p { font-size:15px;line-height:1.8; }
.hero-explain h2 { font-size:clamp(19px,3vw,23px);line-height:1.35; }
.compare-heading { font-size:12px !important; }
.compare-hint { font-size:11px !important; }
.compare-pane-head { font-size:11px !important; }
.compare-pane pre { font-size:13px !important;line-height:1.85 !important; }
.compare-legend { font-size:12px !important; }
.transform-caption { font-size:13px !important; }
.card-title { font-size:13px; }
.meta,.status,.stats,.preflight,.badge,.field label,.check,.notes-list,.pill,
.pricing-status,.configure-hint { font-size:12px; }
.field select { font-size:14px; }
.btn { font-size:14px; }
.btn.primary,.runbar .primary { font-size:15px; }
.editor { font-size:15px !important;line-height:1.75; }
.console { font-size:13px;line-height:1.75; }
@media (max-width:760px) {
  body { font-size:16px; }
  .brand-name { font-size:14px; }
  .brand-sub { font-size:11px; }
  .hero h1 { font-size:clamp(34px,9vw,44px); }
  .hero-lead { font-size:16px; }
  .hero-explain p,.section-heading p { font-size:14px; }
  .home-page .compare-panel { height:300px; }
  .home-page .compare-pane { padding:17px 13px; }
  .home-page .compare-pane-head { font-size:10px !important; }
  .home-page .compare-pane pre { font-size:11px !important;line-height:1.95 !important; }
  .home-page .compare-protected pre {
    width:48%;margin-left:52%;padding-left:0;
    overflow:visible;white-space:pre;
  }
  .home-page .compare-original pre { width:100%; }
  .home-page .compare-heading { font-size:10px !important; }
  .home-page .compare-hint { font-size:10px !important; }
  .home-page .compare-legend { font-size:11px !important; }
  .home-page .transform-caption { font-size:12px !important; }
  .card-title { font-size:12px; }
  .field label,.meta,.status,.stats,.check,.badge { font-size:12px; }
  .field select,.editor { font-size:14px !important; }
  .btn { font-size:13px; }
}
@media (max-width:380px) {
  .home-page .compare-panel { height:280px; }
  .home-page .compare-pane { padding-left:9px;padding-right:9px; }
  .home-page .compare-pane pre { font-size:10px !important; }
}


/* Final consistency pass: shared typography, navigation, glass controls and workspace divider */
body {
  font-family:DM Sans,system-ui,-apple-system,"Segoe UI",sans-serif !important;
}
.top-nav a {
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 15px;
  border:1px solid transparent !important;
  border-radius:7px;
  background:rgba(8,123,184,.07) !important;
  color:#173d55 !important;
  font-size:13px;
  font-weight:650;
  transition:background .18s ease,border-color .18s ease,color .18s ease;
}
.top-nav a:hover,
.top-nav a:focus-visible {
  background:rgba(8,123,184,.16) !important;
  border-color:#087bb8 !important;
  color:#064f78 !important;
}
.top-nav a[aria-current="page"] {
  background:#087bb8 !important;
  border-color:#075f91 !important;
  color:#fff !important;
  font-weight:800;
  box-shadow:0 4px 12px rgba(8,123,184,.2);
}
.btn,.dialog-close {
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.btn {
  background:rgba(232,247,255,.62) !important;
  border:1px solid #16394d !important;
  color:#173b52 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.58),0 3px 10px rgba(24,82,113,.06) !important;
}
.btn:hover {
  background:rgba(211,238,251,.9) !important;
  border-color:#087bb8 !important;
  box-shadow:0 6px 16px rgba(24,82,113,.12) !important;
}
.btn.primary,.btn.primary:hover,.hero-start {
  background:linear-gradient(135deg,#087bb8,#0b91c9) !important;
  border:1px solid #075f91 !important;
  color:#fff !important;
  box-shadow:0 7px 18px rgba(8,123,184,.24),inset 0 1px 0 rgba(255,255,255,.22) !important;
}
.btn.primary:hover,.hero-start:hover {
  background:linear-gradient(135deg,#06699f,#087bb8) !important;
}
.btn.clear {
  background:rgba(232,247,255,.28) !important;
  color:#355970 !important;
}
.home-page .top-nav a[aria-current="page"] {
  background:#087bb8 !important;
  border-color:#075f91 !important;
  color:#fff !important;
}
.workspace-divider {
  display:flex;
  align-items:center;
  gap:14px;
  margin:24px 2px 18px;
  color:#0872a9;
  font-size:11px;
  font-weight:800;
  letter-spacing:.15em;
}
.workspace-divider::before,
.workspace-divider::after {
  content:"";
  height:1px;
  flex:1;
  background:linear-gradient(90deg,rgba(22,57,77,.12),rgba(8,123,184,.62),rgba(22,57,77,.12));
}
.workspace-divider span {
  white-space:nowrap;
  padding:7px 12px;
  border:1px solid rgba(22,57,77,.35);
  border-radius:6px;
  background:rgba(226,244,253,.72);
}
@media(max-width:760px) {
  .workspace-divider { margin:19px 0 14px; }
}


/* Compact, accessible icon actions */
.actions,.output-actions {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:9px;
}
.btn.icon-action {
  position:relative;
  display:inline-grid;
  place-items:center;
  width:42px;
  min-width:42px;
  height:42px;
  min-height:42px;
  padding:0 !important;
  border-radius:9px;
  cursor:pointer;
}
.action-icon {
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
  pointer-events:none;
}
.btn.icon-action::after {
  content:attr(title);
  position:absolute;
  z-index:20;
  left:50%;
  bottom:calc(100% + 9px);
  transform:translate(-50%,4px);
  padding:6px 9px;
  border:1px solid rgba(22,57,77,.35);
  border-radius:6px;
  background:#123b54;
  color:#fff;
  font-size:11px;
  font-weight:600;
  line-height:1.2;
  white-space:nowrap;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .15s ease,transform .15s ease;
}
.btn.icon-action:hover::after,
.btn.icon-action:focus-visible::after {
  opacity:1;
  visibility:visible;
  transform:translate(-50%,0);
}
@media(max-width:480px) {
  .actions,.output-actions { gap:8px; }
  .btn.icon-action { width:40px;min-width:40px;height:40px;min-height:40px; }
}


/* Tighter action toolbars: keep related controls together in their own row */
.actions,.output-actions {
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:7px;
}
.actions .btn,.output-actions .btn {
  flex:0 0 auto;
}
.btn.icon-action {
  width:36px;
  min-width:36px;
  height:36px;
  min-height:36px;
  border-radius:7px !important;
}
.btn.icon-action .action-icon {
  width:16px;
  height:16px;
}
.actions .run-icon-action {
  background:#087bb8 !important;
  border-color:#075f91 !important;
  color:#fff !important;
  box-shadow:0 4px 12px rgba(8,123,184,.18) !important;
}
.actions .run-icon-action:hover {
  background:#06699f !important;
  color:#fff !important;
}
@media(max-width:760px) {
  .actions,.output-actions {
    gap:6px;
  }
  .actions .btn,.output-actions .btn {
    flex:0 0 auto;
  }
  .btn.icon-action {
    width:34px;
    min-width:34px;
    height:34px;
    min-height:34px;
  }
}


/* Keep every secondary workspace action as a compact icon control */
.configure-row .configure-btn.icon-action {
  flex:0 0 36px;
  width:36px;
  min-width:36px;
  height:36px;
  min-height:36px;
  padding:0 !important;
}
.exec-btns {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
}
.exec-btns .btn.icon-action {
  flex:0 0 36px !important;
  width:36px;
  min-width:36px;
  height:36px;
  min-height:36px;
  padding:0 !important;
}
@media(max-width:760px) {
  .exec-btns { gap:6px; }
  .exec-btns .btn.icon-action {
    flex:0 0 34px !important;
    width:34px;
    min-width:34px;
    height:34px;
    min-height:34px;
  }
}


/* Restore a clearly labeled Configure control beside the workspace settings. */
.configure-row .configure-btn {
  display:inline-flex !important;align-items:center;justify-content:center;gap:9px;
  width:auto !important;min-width:132px !important;min-height:40px !important;
  padding:9px 14px !important;flex:0 0 auto !important;
  border:1px solid #16394d !important;border-radius:7px !important;
  background:rgba(232,247,255,.72) !important;color:#173b52 !important;
  font-size:13px;font-weight:700;
}
.configure-row .configure-btn .action-icon { width:17px;height:17px; }
.configure-row .configure-btn:hover { background:#d3eefb !important;border-color:#087bb8 !important; }
.output-actions #runOutputBtn {
  background:#7c3aed !important;border-color:#5b21b6 !important;color:#fff !important;
  box-shadow:0 4px 13px rgba(124,58,237,.25) !important;
}
.output-actions #runOutputBtn:hover {
  background:#6d28d9 !important;border-color:#4c1d95 !important;color:#fff !important;
}
@media(max-width:760px) {
  .configure-row { align-items:center !important; }
  .configure-row .configure-btn { width:auto !important;min-width:132px !important;flex:0 0 auto !important; }
}


/* Minimal workspace controls and a crisp settings glyph. */
.compact-heading { margin-bottom:18px !important; }
.compact-heading h2 { margin:0 !important; }
.configure-row { margin:12px 0 10px !important; }
.configure-row .configure-btn {
  display:inline-grid !important;place-items:center;
  width:38px !important;min-width:38px !important;height:38px !important;min-height:38px !important;
  padding:0 !important;border-radius:7px !important;
  background:rgba(232,247,255,.72) !important;color:#173b52 !important;
}
.configure-row .configure-btn .action-icon { width:20px;height:20px; }
.configure-hint { display:none !important; }
.card-title { letter-spacing:.1em; }
.options-dialog-head { margin-bottom:13px !important; }
.options-dialog-head .kicker { display:none; }
.options-dialog-head h2 { margin:0 !important;font-size:21px; }
.options-dialog .field label { font-size:10px; }
.options-dialog .check { min-height:40px;padding:8px 10px;font-size:12px; }
.exec-card .console-empty { font-size:12px; }


/* Restore workspace copy while keeping the compact icon toolbars. */
.section-heading.compact-heading { margin:0 auto 26px !important; }
.section-heading h2 { margin:9px 0 !important; }
.section-heading p { display:block !important; }
.configure-row { margin:18px 0 12px !important; }
.configure-row .configure-btn {
  display:inline-flex !important;align-items:center;justify-content:center;gap:9px;
  width:auto !important;min-width:132px !important;height:auto !important;min-height:40px !important;
  padding:9px 14px !important;flex:0 0 auto !important;
}
.configure-row .configure-btn .action-icon { width:17px;height:17px; }
.configure-hint { display:inline !important;color:#52738a;font-size:12px; }
.options-dialog-head { margin-bottom:18px !important; }
.options-dialog-head .kicker { display:inline !important; }
.options-dialog-head h2 { margin:9px 0 !important; }


/* Settings controls: consistent native dropdown behavior and clear disabled states. */
.options-dialog .field select {
  display:block;
  width:100%;
  min-width:0;
  color-scheme:light;
  cursor:pointer;
  appearance:auto;
  -webkit-appearance:menulist;
  border:1px solid #16394d !important;
  border-radius:6px !important;
  outline:none;
}
.options-dialog .field select:focus-visible {
  border-color:#087bb8 !important;
  box-shadow:0 0 0 3px rgba(8,123,184,.16) !important;
}
.options-dialog .field select:disabled {
  opacity:.48;
  cursor:not-allowed;
}
.options-dialog .field.is-disabled label,
.options-dialog .check.is-disabled {
  opacity:.48;
}
.options-dialog .check input:disabled {
  cursor:not-allowed;
}
.options-dialog .check.is-disabled {
  cursor:not-allowed;
  transform:none !important;
}
.options-dialog .field select option {
  background:#eaf7ff;
  color:#14384f;
}


/* Animated, touch-friendly custom selection menus */
.trigo-select { position:relative;width:100%;min-width:0; }
.trigo-native-select {
  position:absolute !important;width:1px !important;height:1px !important;
  padding:0 !important;margin:-1px !important;overflow:hidden !important;
  clip:rect(0,0,0,0) !important;white-space:nowrap !important;border:0 !important;
}
.trigo-select-trigger {
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  width:100%;min-height:46px;padding:11px 13px;text-align:left;
  color:#14384f;background:#f5fbff;border:1px solid #16394d;
  border-radius:6px;font:inherit;font-size:13px;cursor:pointer;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.trigo-select-trigger:hover,.trigo-select.is-open .trigo-select-trigger {
  border-color:#087bb8;background:#fff;box-shadow:0 0 0 3px rgba(8,123,184,.12);
}
.trigo-select-trigger:focus-visible { outline:2px solid #087bb8;outline-offset:2px; }
.trigo-select-value { min-width:0;overflow-wrap:anywhere; }
.trigo-select-chevron {
  flex:0 0 auto;width:9px;height:9px;margin:0 3px 4px 0;
  border-right:2px solid #087bb8;border-bottom:2px solid #087bb8;
  transform:rotate(45deg);transition:transform .2s ease;
}
.trigo-select.is-open .trigo-select-chevron { transform:rotate(225deg); }
.trigo-select-menu {
  position:fixed;z-index:10020;top:calc(100% + 7px);left:0;right:0;
  max-height:min(260px,42dvh);overflow:auto;padding:5px;
  background:#f5fbff;border:1px solid #16394d;border-radius:7px;
  box-shadow:0 14px 32px rgba(9,39,57,.22);
  transform-origin:top center;animation:trigoSelectIn .18s cubic-bezier(.2,.7,.2,1) both;
}
.trigo-select-menu[hidden] { display:none; }
.trigo-select-option {
  display:block;width:100%;padding:11px 12px;text-align:left;
  color:#173d55;background:transparent;border:0;border-radius:4px;
  font:inherit;font-size:13px;line-height:1.4;cursor:pointer;
  transition:background .15s ease,color .15s ease,transform .15s ease;
}
.trigo-select-option:hover,.trigo-select-option:focus-visible {
  color:#064f78;background:#d9f0fc;outline:none;
}
.trigo-select-option:active { transform:scale(.985); }
.trigo-select-option.is-selected { color:#064f78;background:#c5eafa;font-weight:700; }
.options-dialog .field select.trigo-native-select { appearance:none !important;-webkit-appearance:none !important; }
@keyframes trigoSelectIn {
  from { opacity:0;transform:translateY(-7px) scale(.985); }
  to { opacity:1;transform:translateY(0) scale(1); }
}
@media (prefers-reduced-motion:reduce) {
  .trigo-select-menu { animation:none; }
  .trigo-select-trigger,.trigo-select-chevron,.trigo-select-option { transition:none; }
}
@media (max-width:760px) {
  .trigo-select-trigger { min-height:48px;font-size:12px; }
  .trigo-select-menu { max-height:36dvh; }
}

/* Rounded information footer shared by every page */
.site-footer-box { width:min(100%,920px);margin:56px auto 22px;padding:24px 26px 18px;border:1px solid #16394d;border-radius:20px;background:rgba(190,226,245,.48);color:#14384f;box-shadow:0 12px 34px rgba(22,75,105,.08); }
.site-footer-brand { display:flex;align-items:baseline;gap:10px;flex-wrap:wrap; }
.site-footer-brand strong { font-size:13px;letter-spacing:.12em; }
.site-footer-brand span,.site-footer-bottom { color:#52738a;font-size:11px; }
.site-footer-links { display:flex;flex-wrap:wrap;gap:10px 22px;margin:18px 0 20px; }
.site-footer-links a { color:#12577d;font-size:12px;font-weight:650;text-decoration:none; }
.site-footer-links a:hover { color:#087bb8;text-decoration:underline;text-underline-offset:4px; }
.site-footer-bottom { display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;padding-top:14px;border-top:1px solid rgba(22,57,77,.2); }
.legal-page { max-width:850px;margin:0 auto; }
.legal-card { margin:16px 0;padding:22px;border:1px solid #16394d;border-radius:14px;background:rgba(190,226,245,.35);color:#173b52;scroll-margin-top:24px; }
.legal-card h2 { margin:0 0 12px;font-size:19px; }
.legal-card p { color:#355c73;font-size:13px;line-height:1.75; }
@media(max-width:600px) { .site-footer-box { margin:38px 0 14px;padding:20px 17px 16px;border-radius:17px; } .site-footer-links { gap:13px 18px; } .site-footer-bottom { flex-direction:column;gap:6px; } }


/* Site-wide readable typography */
html,body,button,input,select,textarea { font-family:"DM Sans",system-ui,-apple-system,"Segoe UI",sans-serif !important; }
body { font-optical-sizing:auto;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale; }


/* Liquid-glass navigation: final override for legacy theme rules */
body .top-nav,
body.home-page .top-nav {
  background:rgba(224,244,255,.34) !important;
  -webkit-backdrop-filter:blur(28px) saturate(190%) !important;
  backdrop-filter:blur(28px) saturate(190%) !important;
  border:1px solid rgba(255,255,255,.78) !important;
  border-radius:18px !important;
  box-shadow:0 18px 44px rgba(19,67,99,.20),inset 0 1px 0 rgba(255,255,255,.78) !important;
}
body .top-nav a,
body.home-page .top-nav a {
  background:rgba(255,255,255,.12) !important;
  border:1px solid rgba(255,255,255,.26) !important;
  border-radius:11px !important;
  color:#173d55 !important;
}
body .top-nav a:hover,
body.home-page .top-nav a:hover,
body .top-nav a:focus-visible,
body.home-page .top-nav a:focus-visible {
  background:rgba(255,255,255,.42) !important;
  border-color:rgba(255,255,255,.72) !important;
}


/* Official Trigo Hub clover logo */
.brand-logo {
  display:block;
  width:clamp(48px, 12vw, 84px);
  height:clamp(48px, 12vw, 84px);
  object-fit:contain;
  flex:0 0 auto;
}
.site-header .brand { align-items:center; }


/* Expanded Trigo Engine home-page information */
.home-details,.home-workflow { padding-top:58px; }
.home-feature-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  max-width:820px;
  margin:0 auto;
}
.home-feature-card {
  position:relative;
  min-width:0;
  padding:22px;
  background:rgba(255,255,255,.58);
  border:1px solid rgba(133,185,213,.72);
  box-shadow:0 10px 28px rgba(38,100,135,.055);
}
.home-feature-number {
  display:inline-block;
  margin-bottom:18px;
  color:#087bb8;
  font-size:11px;
  font-weight:800;
  letter-spacing:.14em;
}
.home-feature-card h3,.home-steps h3 {
  margin:0 0 8px;
  color:#123650;
  font-size:16px;
  letter-spacing:-.025em;
}
.home-feature-card p,.home-steps p {
  margin:0;
  color:#47677d;
  font-size:13px;
  line-height:1.75;
}
.home-steps {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  max-width:820px;
  margin:0 auto;
  padding:0;
  list-style:none;
}
.home-steps li {
  display:flex;
  align-items:flex-start;
  gap:13px;
  padding:18px;
  background:rgba(255,255,255,.5);
  border:1px solid rgba(133,185,213,.65);
}
.home-steps li>span {
  display:grid;
  place-items:center;
  flex:0 0 30px;
  width:30px;
  height:30px;
  background:#d4effd;
  color:#087bb8;
  font-weight:800;
}
.home-cta {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  max-width:820px;
  margin:26px auto 0;
  padding:24px;
  background:rgba(255,255,255,.58);
  border:1px solid #a9d0e5;
}
.home-cta h2 { margin:7px 0;color:#123650;font-size:22px;letter-spacing:-.04em; }
.home-cta p { margin:0;color:#47677d;font-size:13px;line-height:1.6; }
.home-cta .btn { flex:0 0 auto;text-decoration:none; }
.home-disclaimer {
  max-width:820px;
  margin:18px auto 0;
  color:#58768a;
  font-size:11px;
  line-height:1.7;
}
@media(max-width:620px) {
  .home-feature-grid,.home-steps { grid-template-columns:1fr;gap:10px; }
  .home-feature-card { padding:19px; }
  .home-feature-number { margin-bottom:12px; }
  .home-cta { align-items:stretch;flex-direction:column;padding:20px; }
  .home-cta .btn { width:100%; }
}


/* Script page: multi-color Luau syntax presentation */
.script-intro { max-width:760px;margin:10px auto 26px;text-align:left; }
.script-intro h1 { margin:8px 0 10px;color:#123650; }
.script-intro p { max-width:620px;margin:0;color:#47677d;font-size:14px;line-height:1.75; }
.script-viewer-card { width:100%;max-width:860px;margin:0 auto;border:1px solid #16394d;border-radius:14px;overflow:hidden;background:#0c1420;box-shadow:0 18px 45px rgba(24,73,105,.14); }
.script-viewer-head { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 17px;background:#122235;border-bottom:1px solid #263c51;color:#e6f3ff; }
.script-file-label { display:flex;align-items:center;gap:9px;font-size:12px;font-weight:700; }
.script-file-dot { width:9px;height:9px;border-radius:50%;background:#38bdf8;box-shadow:0 0 10px #38bdf866; }
.script-language { color:#8aa6bf;font-size:10px;font-weight:800;letter-spacing:.14em; }
.script-code-wrap { display:grid;grid-template-columns:42px minmax(0,1fr);overflow:auto;padding:18px 0 20px; }
.script-line-numbers,.script-code { margin:0;font:13px/1.9 ui-monospace,SFMono-Regular,Consolas,monospace;tab-size:2; }
.script-line-numbers { padding:0 10px 0 0;text-align:right;color:#61778e;user-select:none;border-right:1px solid #26384b; }
.script-code { min-width:max-content;padding:0 20px;color:#d9e8f6; }
.tok-comment { color:#7f9b8d;font-style:italic; }
.tok-keyword { color:#c792ea; }
.tok-function { color:#82aaff; }
.tok-string { color:#c3e88d; }
.tok-number { color:#f78c6c; }
.tok-variable { color:#e3edf7; }
.tok-property { color:#80cbc4; }
.tok-service { color:#ffcb6b; }
.script-legend { display:flex;flex-wrap:wrap;gap:12px 19px;padding:14px 17px;border-top:1px solid #263c51;background:#101e2d; }
.script-legend span { display:inline-flex;align-items:center;gap:7px;color:#b8cadd;font-size:10px; }
.script-legend i { width:8px;height:8px;border-radius:50%;display:inline-block; }
.legend-keyword { background:#c792ea; }.legend-function { background:#82aaff; }.legend-string { background:#c3e88d; }.legend-number { background:#f78c6c; }.legend-comment { background:#7f9b8d; }.legend-property { background:#80cbc4; }
.script-page-cta { max-width:860px;margin:22px auto 0;padding:22px 24px;display:flex;align-items:center;justify-content:space-between;gap:18px;background:rgba(255,255,255,.58);border:1px solid #a9d0e5; }
.script-page-cta h2 { margin:7px 0;color:#123650;font-size:21px;letter-spacing:-.035em; }
.script-page-cta p { margin:0;color:#47677d;font-size:13px;line-height:1.6; }
.script-page-cta .btn { flex:0 0 auto;text-decoration:none; }
@media(max-width:620px) {
 .script-intro { margin-bottom:20px; }
 .script-code-wrap { grid-template-columns:34px minmax(0,1fr);padding:14px 0; }
 .script-line-numbers,.script-code { font-size:11px;line-height:1.85; }
 .script-code { padding:0 13px; }
 .script-legend { gap:10px 13px; }
 .script-page-cta { align-items:stretch;flex-direction:column;padding:19px; }
 .script-page-cta .btn { width:100%; }
}

/* Give the home information sections comfortable horizontal gutters. */
.home-page .home-details,
.home-page .home-workflow {
  padding-left: clamp(20px, 4.5vw, 44px);
  padding-right: clamp(20px, 4.5vw, 44px);
}
.home-page .home-feature-grid,
.home-page .home-cta,
.home-page .home-disclaimer {
  width: 100%;
}


/* Compact shared footer, especially on narrow screens. */
.site-footer-box {
  margin-top: 30px;
  margin-bottom: 14px;
  padding: 16px 20px 12px;
}
.site-footer-links {
  gap: 9px 20px;
  margin: 12px 0 13px;
}
.site-footer-bottom {
  padding-top: 10px;
}
@media (max-width: 600px) {
  .site-footer-box {
    margin: 26px 0 12px;
    padding: 14px 15px 11px;
    border-radius: 14px;
  }
  .site-footer-brand strong { font-size: 12px; }
  .site-footer-brand span,.site-footer-bottom { font-size: 10px; }
  .site-footer-links {
    gap: 9px 15px;
    margin: 11px 0 12px;
  }
  .site-footer-links a { font-size: 11px; }
  .site-footer-bottom {
    padding-top: 9px;
    gap: 4px;
  }
}

/* Fixed engine/output labels in the cloud-only settings panel. */
.options-dialog .setting-value { padding: 12px 13px; border: 1px solid #b5d4e5; border-radius: 12px; background: #f5fbff; color: #153a54; font-size: 13px; font-weight: 600; }


/* Keep the active page visibly selected on every Trigo page. */
body .top-nav a[aria-current="page"] {
  background:#087bb8 !important;
  border-color:#075f91 !important;
  color:#fff !important;
  font-weight:800;
}


/* Sun and moon controls in the navigation menu. */
.theme-controls{display:flex;justify-content:flex-end;gap:8px;padding:9px 10px 5px;margin-top:5px;border-top:1px solid rgba(22,57,77,.24)}
.theme-choice{width:38px;height:38px;display:grid;place-items:center;padding:0;border:1px solid #16394d;border-radius:9px;background:rgba(255,255,255,.28);color:#173d55;transition:background .18s,transform .18s}
.theme-choice svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.theme-choice:hover{transform:translateY(-1px);background:rgba(8,123,184,.12)}
.theme-choice[aria-pressed="true"]{background:#087bb8;color:white;border-color:#075f91}

/* Global dark appearance; light mode remains the original sky-blue design. */
html[data-theme="dark"]{color-scheme:dark;background:#0b1420}
html[data-theme="dark"] body,html[data-theme="dark"] body.home-page{color:#e5eff8;background:radial-gradient(ellipse at 12% 8%,rgba(42,82,112,.34),transparent 38%),linear-gradient(145deg,#0b1420,#132638 52%,#101b2a)}
html[data-theme="dark"] body::before{background:linear-gradient(100deg,rgba(42,105,145,.22),rgba(30,62,88,.1));opacity:.5}
html[data-theme="dark"] body::after{background:linear-gradient(100deg,rgba(29,83,120,.16),rgba(24,51,74,.18));opacity:.5}
html[data-theme="dark"] body,html[data-theme="dark"] .site-header,html[data-theme="dark"] .brand,html[data-theme="dark"] .hero,html[data-theme="dark"] .tool-section,html[data-theme="dark"] .pricing-section,html[data-theme="dark"] .legal-page{color:#e5eff8}
html[data-theme="dark"] .brand-name,html[data-theme="dark"] .brand-sub,html[data-theme="dark"] .hero h1,html[data-theme="dark"] .section-heading h2,html[data-theme="dark"] .home-feature-card h3,html[data-theme="dark"] .hero-explain h2,html[data-theme="dark"] .pricing-card h3,html[data-theme="dark"] .options-dialog-head h2,html[data-theme="dark"] .legal-card h2{color:#edf6ff!important}
html[data-theme="dark"] .kicker,html[data-theme="dark"] .home-feature-number,html[data-theme="dark"] .pricing-label{color:#78c9f2!important}
html[data-theme="dark"] .hero-lead,html[data-theme="dark"] .section-heading p,html[data-theme="dark"] .home-feature-card p,html[data-theme="dark"] .hero-explain p,html[data-theme="dark"] .pricing-card p,html[data-theme="dark"] .legal-card p,html[data-theme="dark"] .hero-note,html[data-theme="dark"] .transform-caption,html[data-theme="dark"] .compare-legend,html[data-theme="dark"] .configure-hint,html[data-theme="dark"] .meta,html[data-theme="dark"] .notes-list,html[data-theme="dark"] .foot{color:#a9bfd0!important}
html[data-theme="dark"] .tool-section,html[data-theme="dark"] .pricing-section{border-color:rgba(154,190,215,.2)!important}
html[data-theme="dark"] .card,html[data-theme="dark"] .pricing-card,html[data-theme="dark"] .options,html[data-theme="dark"] .preflight,html[data-theme="dark"] .audit-panel,html[data-theme="dark"] .hero-explain,html[data-theme="dark"] .transform-loop,html[data-theme="dark"] .home-feature-card,html[data-theme="dark"] .site-footer-box,html[data-theme="dark"] .legal-card,html[data-theme="dark"] .stats span{background:rgba(18,34,50,.88)!important;color:#e5eff8!important;border-color:#496276!important;box-shadow:0 12px 32px rgba(0,0,0,.16)!important}
html[data-theme="dark"] .editor-panel,html[data-theme="dark"] .console,html[data-theme="dark"] .home-page .compare-panel,html[data-theme="dark"] .home-page .compare-protected{background:#08131e!important;border-color:#496276!important;color:#e5eff8!important}
html[data-theme="dark"] .editor{color:#e5eff8!important}html[data-theme="dark"] .editor::placeholder,html[data-theme="dark"] .console-empty{color:#819bad!important}
html[data-theme="dark"] .log-line.print{color:#e5eff8!important}html[data-theme="dark"] .log-line.hdr{color:#8fc9e8!important}
html[data-theme="dark"] .log-line.warn{color:#ffd98a!important;background:rgba(148,96,0,.18)!important}html[data-theme="dark"] .log-line.error{color:#ffabb8!important;background:rgba(180,35,59,.18)!important}html[data-theme="dark"] .log-line.ret{color:#9ddcff!important;background:rgba(8,123,184,.16)!important}
html[data-theme="dark"] .preflight,html[data-theme="dark"] .audit-panel{color:#c4d7e5!important;background:rgba(28,52,72,.8)!important}
html[data-theme="dark"] .badge{background:#263d51!important;color:#d9eaf5!important;border-color:#526b80!important}
html[data-theme="dark"] .badge.ok{background:#123d32!important;color:#9ce2c6!important;border-color:#26785c!important}
html[data-theme="dark"] .badge.warn{background:#493719!important;color:#ffdc91!important;border-color:#89651e!important}
html[data-theme="dark"] .badge.err{background:#4b202b!important;color:#ffb4c0!important;border-color:#944252!important}
html[data-theme="dark"] .btn,html[data-theme="dark"] .dialog-close,html[data-theme="dark"] .field select,html[data-theme="dark"] .check,html[data-theme="dark"] .pill,html[data-theme="dark"] .pricing-status{background:rgba(35,58,77,.92)!important;color:#e5eff8!important;border-color:#60788b!important}
html[data-theme="dark"] .btn:hover,html[data-theme="dark"] .check:hover{background:rgba(54,88,114,.95)!important}
html[data-theme="dark"] .btn.primary,html[data-theme="dark"] .btn.primary:hover,html[data-theme="dark"] .hero-start,html[data-theme="dark"] .theme-choice[aria-pressed="true"]{background:#087bb8!important;color:#fff!important;border-color:#78c9f2!important}
html[data-theme="dark"] .btn.clear{color:#c1d4e2!important}
html[data-theme="dark"] .options-dialog{background:#142638!important;color:#e5eff8!important;border-color:#60788b!important;box-shadow:0 24px 70px rgba(0,0,0,.5)!important}
html[data-theme="dark"] .options-dialog .options{background:rgba(25,46,65,.9)!important}
html[data-theme="dark"] .field label,html[data-theme="dark"] .options summary,html[data-theme="dark"] .status,html[data-theme="dark"] .stats{color:#b4c9d8!important}
html[data-theme="dark"] .field select,html[data-theme="dark"] .options-dialog .setting-value{background:#0d1b29!important;color:#e5eff8!important;border-color:#526b80!important}
html[data-theme="dark"] .options-body{border-color:rgba(174,204,224,.2)!important}
html[data-theme="dark"] .home-page .compare-original{background:#20384c!important;color:#e5eff8!important}
html[data-theme="dark"] .home-page .compare-original code{color:#d6e8f4!important}
html[data-theme="dark"] .home-page .compare-original .compare-pane-head{color:#b3ccdc!important}
html[data-theme="dark"] .home-page .compare-legend,html[data-theme="dark"] .home-page .compare-heading{color:#b7ccdb!important}
html[data-theme="dark"] .site-footer-links a{color:#8ed3f5!important}
html[data-theme="dark"] .site-footer-bottom{color:#9fb5c6!important;border-color:rgba(174,204,224,.2)!important}
html[data-theme="dark"] .top-nav{background:rgba(14,29,43,.96)!important;border-color:#526b80!important;box-shadow:0 18px 44px rgba(0,0,0,.42)!important}
html[data-theme="dark"] .top-nav a,html[data-theme="dark"] body.home-page .top-nav a{background:transparent!important;color:#dceaf4!important;border-color:rgba(150,180,202,.18)!important}
html[data-theme="dark"] .top-nav a:hover,html[data-theme="dark"] .top-nav a:focus-visible{background:rgba(83,157,198,.18)!important;color:#fff!important}
html[data-theme="dark"] .top-nav a[aria-current="page"],html[data-theme="dark"] body.home-page .top-nav a[aria-current="page"]{background:#087bb8!important;border-color:#78c9f2!important;color:#fff!important}
html[data-theme="dark"] .theme-controls{border-color:rgba(174,204,224,.22)!important}
html[data-theme="dark"] .menu-toggle{background:rgba(35,58,77,.8)!important;border-color:#60788b!important}
html[data-theme="dark"] .menu-toggle span{background:#e5eff8!important}
html[data-theme="dark"] .home-page .menu-toggle{background:rgba(35,58,77,.8)!important}

/* Keep the shooting-star mark black in light mode and white in dark mode. */
html[data-theme="dark"] .brand-logo{filter:brightness(0) invert(1)}
html[data-theme="light"] .brand-logo,html:not([data-theme="dark"]) .brand-logo{filter:none}

/* Home feature spotlight */
.home-page .home-feature-grid{max-width:980px}
.home-page .home-feature-card{border-radius:18px;transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}
.home-page .home-feature-card:hover{transform:translateY(-3px);border-color:#42a6d5;box-shadow:0 14px 34px rgba(38,100,135,.12)}
.home-page .home-feature-callout{max-width:980px;margin:22px auto 0;padding:22px 24px;display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;border:1px solid rgba(75,161,203,.48);border-radius:18px;background:linear-gradient(120deg,rgba(220,244,255,.82),rgba(255,255,255,.68))}
.home-page .home-feature-callout strong{display:block;width:100%;color:#123650;font-size:17px}
.home-page .home-feature-callout span{flex:1 1 300px;color:#47677d;font-size:13px;line-height:1.65}
.home-page .home-feature-callout .btn{flex:0 0 auto}
html[data-theme="dark"] .home-page .home-feature-callout{background:linear-gradient(120deg,rgba(20,49,70,.94),rgba(15,31,46,.94));border-color:#496b82}
html[data-theme="dark"] .home-page .home-feature-callout strong{color:#e5eff8}
html[data-theme="dark"] .home-page .home-feature-callout span{color:#afc5d5}
@media(max-width:600px){.home-page .home-feature-callout{padding:18px}.home-page .home-feature-callout .btn{width:100%}}


/* Replace numeric feature labels with consistent illustrated feature icons. */
.home-page .home-feature-icon{
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  margin:0 0 18px;
  border:1px solid rgba(8,123,184,.24);
  border-radius:13px;
  background:linear-gradient(145deg,rgba(207,239,255,.95),rgba(255,255,255,.78));
  color:#087bb8;
  box-shadow:0 5px 14px rgba(8,123,184,.09);
}
.home-page .home-feature-icon svg{
  display:block;
  width:23px;
  height:23px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}
html[data-theme="dark"] .home-page .home-feature-icon{
  background:linear-gradient(145deg,rgba(25,76,105,.9),rgba(20,43,62,.95));
  border-color:rgba(120,201,242,.35);
  color:#8ed8ff;
  box-shadow:0 5px 16px rgba(0,0,0,.18);
}
@media(max-width:600px){.home-page .home-feature-icon{margin-bottom:13px}}


/* Medium-sized home hero action button. */
.home-page .hero-start{min-width:140px;min-height:46px;padding:11px 17px;font-size:13px}


/* Keep the navigation control as three lines when the menu is open. */
.menu-toggle[aria-expanded="true"] span,
.menu-toggle[aria-expanded="true"] span:first-child,
.menu-toggle[aria-expanded="true"] span:nth-child(2),
.menu-toggle[aria-expanded="true"] span:last-child {
  transform: none !important;
  opacity: 1 !important;
}

/* Independent, line-by-line live transformation demo on the home page. */
.home-transform{padding-top:54px}.home-transform .section-heading{margin-bottom:22px}
.transform-demo{max-width:980px;margin:0 auto;overflow:hidden;border:1px solid rgba(65,145,184,.55);border-radius:19px;background:rgba(255,255,255,.68);box-shadow:0 18px 48px rgba(28,91,126,.11)}
.transform-demo-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 17px;border-bottom:1px solid rgba(65,145,184,.22);background:rgba(222,244,255,.72)}
.transform-demo-title,.transform-demo-foot,.transform-code-label{display:flex;align-items:center;gap:9px}
.transform-demo-title{color:#173d55;font-size:10px;letter-spacing:.13em}
.transform-live-dot,.transform-file-dot{width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#18a66a;box-shadow:0 0 10px #18a66a66}
.transform-replay{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border:1px solid #a7cfe3;border-radius:9px;background:rgba(255,255,255,.65);color:#17435e;font:700 11px "DM Sans",sans-serif}
.transform-replay svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.transform-replay:active{transform:scale(.97)}
.transform-demo-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:14px}
.transform-code-card{min-width:0;overflow:hidden;border:1px solid #263d50;border-radius:12px;background:#0c1723}
.transform-code-label{min-height:39px;padding:0 12px;border-bottom:1px solid #263d50;background:#142638;color:#d6e8f5;font:700 10px "DM Sans",sans-serif}
.transform-code-label .transform-file-dot{background:#8aa6bf;box-shadow:none}
.transform-code-card.protected .transform-file-dot{background:#38c9a0;box-shadow:0 0 9px #38c9a066}
.transform-language{margin-left:auto;color:#8ca8bc;font-size:9px;letter-spacing:.1em}
.transform-code{min-height:188px;margin:0;padding:14px 12px;overflow-x:auto;color:#c9d8e5;font:11px/1.95 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre}
.transform-code code{font:inherit}.transform-line{display:inline-block;min-height:1.95em;white-space:pre}
.transform-line.is-transforming{color:#8ed8ff;text-shadow:0 0 12px rgba(69,188,245,.32)}
.transform-line.is-done{color:#a9e7c9;animation:transform-settle .32s ease-out}
@keyframes transform-settle{from{opacity:.55}to{opacity:1}}
.transform-demo-foot{justify-content:space-between;gap:10px;flex-wrap:wrap;padding:11px 16px;border-top:1px solid rgba(65,145,184,.2);color:#55748a;font-size:10px}
.transform-demo-foot>span:first-child{display:flex;align-items:center;gap:7px}.transform-demo-foot i{width:7px;height:7px;border-radius:50%;background:#18a66a}
#transformStatus{font-weight:700;color:#087bb8}
html[data-theme="dark"] .transform-demo{background:rgba(18,34,50,.88);border-color:#496276;box-shadow:0 18px 48px rgba(0,0,0,.2)}
html[data-theme="dark"] .transform-demo-head{background:rgba(24,48,68,.9);border-color:#40596d}
html[data-theme="dark"] .transform-demo-title,html[data-theme="dark"] .transform-demo-foot{color:#b2c9d9}
html[data-theme="dark"] .transform-replay{background:#20384c;border-color:#60788b;color:#e5eff8}
html[data-theme="dark"] #transformStatus{color:#8ed8ff}
@media(max-width:620px){.home-transform{padding-top:40px}.transform-demo-grid{grid-template-columns:1fr;gap:10px;padding:10px}.transform-code{min-height:0;padding:12px 10px;font-size:10px}.transform-demo-foot{font-size:9px}}
@media(prefers-reduced-motion:reduce){.transform-line.is-done{animation:none}.transform-replay:active{transform:none}}

/* Single shared source/protected code panel with a continuous transformation loop. */
.transform-demo-grid{display:block;padding:14px}
.transform-single-panel{max-width:100%;overflow:hidden;border:1px solid #263d50;border-radius:12px;background:#0c1723}
.transform-single-panel .transform-code{min-height:188px}
.transform-single-panel .transform-code-label{justify-content:flex-start}
.transform-single-panel .transform-language{margin-left:auto}
html[data-theme="dark"] .transform-single-panel{border-color:#496276}
@media(max-width:620px){.transform-demo-grid{padding:10px}.transform-single-panel .transform-code{font-size:10px}}


/* Give the homepage preview comfortable breathing room and readable code. */
.home-transform{
  padding:58px clamp(20px,6vw,88px) 46px;
}
.home-transform .section-heading{
  max-width:760px;
  margin:0 auto 30px;
}
.home-transform .section-heading p{
  font-size:15px;
  line-height:1.75;
}
.home-transform .transform-demo{
  width:100%;
  max-width:1080px;
  margin:0 auto;
  overflow:visible;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.home-transform .transform-single-panel{
  width:100%;
  border:1px solid #263d50;
  border-radius:16px;
  box-shadow:0 18px 48px rgba(28,91,126,.14);
}
.home-transform .transform-single-panel .transform-code-label{
  min-height:48px;
  padding:0 18px;
  font-size:12px;
}
.home-transform .transform-single-panel .transform-code{
  min-height:230px;
  padding:22px 20px;
  font-size:clamp(14px,1.45vw,16px);
  line-height:2.05;
}
.home-transform .transform-line{
  min-height:2.05em;
}
html[data-theme="dark"] .home-transform .transform-single-panel{
  box-shadow:0 18px 48px rgba(0,0,0,.25);
}
@media(max-width:620px){
  .home-transform{padding:42px 18px 34px}
  .home-transform .section-heading{margin-bottom:22px}
  .home-transform .section-heading p{font-size:14px}
  .home-transform .transform-single-panel .transform-code-label{padding:0 13px}
  .home-transform .transform-single-panel .transform-code{
    min-height:210px;
    padding:18px 14px;
    font-size:13px;
    line-height:2;
  }
}


/* Improve readability of the homepage footer and supporting text. */
.home-page .home-disclaimer {
  font-size: 14px;
  line-height: 1.8;
}
.home-page .site-footer-box {
  padding: 22px 24px 18px;
}
.home-page .site-footer-brand strong {
  font-size: 16px;
}
.home-page .site-footer-brand span,
.home-page .site-footer-bottom {
  font-size: 14px;
  line-height: 1.6;
}
.home-page .site-footer-links {
  gap: 14px 24px;
  margin: 18px 0 20px;
}
.home-page .site-footer-links a {
  font-size: 16px;
  line-height: 1.5;
}
.home-page .site-footer-bottom {
  padding-top: 14px;
}
@media (max-width: 600px) {
  .home-page .home-disclaimer {
    font-size: 14px;
    line-height: 1.8;
  }
  .home-page .site-footer-box {
    padding: 20px 18px 16px;
  }
  .home-page .site-footer-brand strong {
    font-size: 16px;
  }
  .home-page .site-footer-brand span,
  .home-page .site-footer-bottom {
    font-size: 14px;
  }
  .home-page .site-footer-links {
    gap: 12px 18px;
    margin: 16px 0 18px;
  }
  .home-page .site-footer-links a {
    font-size: 16px;
  }
}


/* Shared footer: larger readable text and a square-cornered panel on every page. */
.site-footer-box {
  border-radius: 0 !important;
  padding: 22px 24px 18px;
}
.site-footer-brand strong {
  font-size: 16px;
}
.site-footer-brand span,
.site-footer-bottom {
  font-size: 14px;
  line-height: 1.6;
}
.site-footer-links {
  gap: 14px 24px;
  margin: 18px 0 20px;
}
.site-footer-links a {
  font-size: 16px;
  line-height: 1.5;
}
.site-footer-bottom {
  padding-top: 14px;
}
@media (max-width: 600px) {
  .site-footer-box {
    padding: 20px 18px 16px;
    border-radius: 0 !important;
  }
  .site-footer-brand strong {
    font-size: 16px;
  }
  .site-footer-brand span,
  .site-footer-bottom {
    font-size: 14px;
  }
  .site-footer-links {
    gap: 12px 18px;
    margin: 16px 0 18px;
  }
  .site-footer-links a {
    font-size: 16px;
  }
}


/* Compact shared footer, synchronized across every page. */
.site-footer-box{width:min(100%,760px);margin:24px auto 12px;padding:12px 18px 10px;border-radius:0!important}
.site-footer-brand{gap:0}
.site-footer-brand strong{font-size:14px}
.site-footer-links{gap:8px 16px;margin:9px 0 10px}
.site-footer-links a{font-size:13px;line-height:1.4}
.site-footer-bottom{padding-top:8px;font-size:11px;line-height:1.4}
@media(max-width:600px){.site-footer-box{width:100%;margin:20px 0 10px;padding:11px 13px 9px;border-radius:0!important}.site-footer-brand strong{font-size:13px}.site-footer-links{gap:8px 13px;margin:8px 0 9px}.site-footer-links a{font-size:12px}.site-footer-bottom{font-size:10px;gap:4px}}


/* Three clear, preset-based protection levels replace the old Configure panel. */
.protection-picker{margin:18px 0 0;padding:18px;border:1px solid #111;background:rgba(255,255,255,.46)}
.protection-picker-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:13px}
.protection-picker-head h3{margin:4px 0 0;color:#123650;font-size:17px;letter-spacing:-.025em}
.protection-levels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.protection-level{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:0;min-height:88px;padding:12px;border:1px solid #111;background:rgba(255,255,255,.7);color:#173d55;text-align:left;transition:background .16s,border-color .16s,transform .16s}
.protection-level strong{font-size:14px}
.protection-level span{font-size:11px;line-height:1.45;color:#55748a}
.protection-level:hover{transform:translateY(-1px);background:#fff}
.protection-level.is-selected{background:#087bb8;color:#fff;border-color:#075f91;box-shadow:inset 0 0 0 1px #075f91}
.protection-level.is-selected span{color:#e7f6ff}
.protection-description{margin:11px 1px 0;color:#47677d;font-size:12px;line-height:1.6}
html[data-theme="dark"] .protection-picker{background:rgba(18,34,50,.88);border-color:#60788b}
html[data-theme="dark"] .protection-picker-head h3{color:#edf6ff}
html[data-theme="dark"] .protection-level{background:rgba(35,58,77,.92);color:#e5eff8;border-color:#60788b}
html[data-theme="dark"] .protection-level span,html[data-theme="dark"] .protection-description{color:#a9bfd0}
html[data-theme="dark"] .protection-level.is-selected{background:#087bb8;color:#fff;border-color:#78c9f2}
html[data-theme="dark"] .protection-level.is-selected span{color:#e7f6ff}
@media(max-width:600px){.protection-picker{padding:13px}.protection-levels{grid-template-columns:1fr;gap:7px}.protection-level{min-height:0;padding:11px 12px}.protection-level span{font-size:11px}}


/* Circular warning symbol for the homepage security disclaimer. */
.home-disclaimer{display:flex;align-items:flex-start;gap:8px;text-align:left}
.home-disclaimer-icon{width:15px;height:15px;flex:0 0 15px;margin-top:2px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}


/* Syntax colors appear only after each line finishes transforming. */
.home-transform .transform-line.is-done{color:#c9d8e5;text-shadow:none}
.home-transform .transform-line .syntax-keyword{color:#c792ea}
.home-transform .transform-line .syntax-string{color:#c3e88d}
.home-transform .transform-line .syntax-number{color:#f78c6c}
.home-transform .transform-line .syntax-variable{color:#82aaff}
.home-transform .transform-line .syntax-builtin{color:#89ddff}
html[data-theme="dark"] .home-transform .transform-line.is-done{color:#c9d8e5}


/* Obfuscation stays visibly disabled until a protection preset is selected. */
#runBtn:disabled,
#runBtn:disabled:hover,
html[data-theme="dark"] #runBtn:disabled,
html[data-theme="dark"] #runBtn:disabled:hover {
  background:#aeb8bf !important;
  background-image:none !important;
  border:1px solid #7f8b92 !important;
  color:#f5f7f8 !important;
  box-shadow:none !important;
  opacity:1 !important;
  cursor:not-allowed !important;
  transform:none !important;
  pointer-events:none !important;
}


/* Smooth, consistent page and component motion. */
body.page-entering .app{
  animation:trigoPageArrive .42s cubic-bezier(.2,.72,.25,1) both;
  will-change:opacity,transform;
}
body.page-leaving .app{
  animation:trigoPageDepart .19s cubic-bezier(.4,0,1,1) both;
  pointer-events:none;
}
@keyframes trigoPageArrive{
  from{opacity:0;transform:translate3d(0,14px,0);filter:blur(2px)}
  to{opacity:1;transform:translate3d(0,0,0);filter:blur(0)}
}
@keyframes trigoPageDepart{
  from{opacity:1;transform:translate3d(0,0,0);filter:blur(0)}
  to{opacity:0;transform:translate3d(0,-6px,0);filter:blur(1px)}
}
.card,.pricing-card,.legal-card,.protection-picker,.site-footer-box{
  transition:transform .24s cubic-bezier(.2,.7,.2,1),box-shadow .24s ease,border-color .24s ease;
}
.card:hover,.pricing-card:hover,.legal-card:hover{
  transform:translateY(-2px);
}
.top-nav a,.btn,.icon-action,.protection-level,.theme-choice,.menu-toggle{
  transition-property:background-color,color,border-color,box-shadow,transform,opacity;
  transition-duration:.22s;
  transition-timing-function:cubic-bezier(.2,.7,.2,1);
}
.editor-panel,.preflight,.audit-panel,.console{
  transition:border-color .22s ease,box-shadow .22s ease,background-color .22s ease;
}
.brand-logo{transition:transform .3s cubic-bezier(.2,.7,.2,1)}
.brand:hover .brand-logo{transform:rotate(-7deg) scale(1.045)}
@media(prefers-reduced-motion:reduce){
  body.page-entering .app,body.page-leaving .app{animation:none!important;filter:none!important}
  .card,.pricing-card,.legal-card,.site-footer-box,.top-nav a,.btn,.icon-action,
  .protection-level,.theme-choice,.menu-toggle,.editor-panel,.preflight,.audit-panel,
  .console,.brand-logo{transition:none!important;transform:none!important}
}


/* Engine mode selector sits above the protection presets. */
.engine-mode-picker{display:grid;gap:7px;margin:18px 0 0;padding:14px 16px;border:1px solid #111;background:rgba(255,255,255,.46)}
.engine-mode-picker label{font-size:10px;font-weight:800;letter-spacing:.09em;color:#31536b}
.engine-mode-picker select{width:100%;min-height:44px;padding:10px 12px;border:1px solid #111;border-radius:0;background:#fff;color:#173b55;font:600 13px "DM Sans",system-ui,sans-serif}
.engine-mode-picker select:focus-visible{outline:2px solid #087bb8;outline-offset:2px}
html[data-theme="dark"] .engine-mode-picker{background:rgba(18,34,50,.88);border-color:#60788b}
html[data-theme="dark"] .engine-mode-picker label{color:#dcecf8}
html[data-theme="dark"] .engine-mode-picker select{background:#0d1b29;color:#e5eff8;border-color:#60788b}
@media(max-width:600px){.engine-mode-picker{padding:12px}}


/* Focused processing screen for long-running protection jobs. */
.processing-overlay{
  position:fixed;inset:0;z-index:9999;display:grid;place-items:center;
  padding:22px;background:rgba(8,22,34,.66);backdrop-filter:blur(9px);
  opacity:0;visibility:hidden;transition:opacity .24s ease,visibility .24s ease;
}
.processing-overlay[hidden]{display:none}
.processing-overlay.is-visible{opacity:1;visibility:visible}
.processing-panel{
  width:min(100%,430px);padding:30px 25px 22px;border:1px solid #111;
  border-radius:0;background:#eaf7ff;color:#173b55;text-align:center;
  box-shadow:0 24px 80px rgba(0,0,0,.28);transform:translateY(10px) scale(.985);
  transition:transform .24s cubic-bezier(.2,.7,.2,1);
}
.processing-overlay.is-visible .processing-panel{transform:translateY(0) scale(1)}
.processing-brand{display:flex;align-items:center;justify-content:center;gap:9px;font-size:11px;font-weight:800;letter-spacing:.16em}
.processing-logo{width:28px;height:28px;object-fit:contain}
.processing-spinner{width:54px;height:54px;margin:30px auto 20px;border:3px solid rgba(8,123,184,.18);border-top-color:#087bb8;border-right-color:#087bb8;border-radius:50%;animation:trigoProcessingSpin .85s linear infinite}
.processing-spinner span{display:block;width:7px;height:7px;margin:6px;border-radius:50%;background:#087bb8}
@keyframes trigoProcessingSpin{to{transform:rotate(360deg)}}
.processing-panel h2{margin:0;color:#123a55;font-size:21px;line-height:1.3;font-weight:800}
.processing-panel>p{min-height:42px;margin:9px auto 22px;max-width:330px;color:#4c6b80;font-size:13px;line-height:1.6}
.processing-track{height:5px;overflow:hidden;background:#c9e5f4}
.processing-track span{display:block;width:38%;height:100%;background:#087bb8;animation:trigoProcessingSweep 1.35s ease-in-out infinite}
@keyframes trigoProcessingSweep{0%{transform:translateX(-110%)}100%{transform:translateX(275%)}}
.processing-footer{display:flex;align-items:center;gap:8px;margin-top:17px;color:#547287;font-size:11px;font-weight:600}
.processing-live-dot{width:7px;height:7px;border-radius:50%;background:#18a66a;box-shadow:0 0 0 4px rgba(24,166,106,.12)}
.processing-no-percent{margin-left:auto;color:#087bb8}
html[data-theme="dark"] .processing-panel{background:#142b3e;color:#e5eff8;border-color:#60788b}
html[data-theme="dark"] .processing-panel h2{color:#f0f7fc}
html[data-theme="dark"] .processing-panel>p,html[data-theme="dark"] .processing-footer{color:#aec5d6}
html[data-theme="dark"] .processing-track{background:#29475e}
html[data-theme="dark"] .processing-no-percent{color:#8ed8ff}
@media(max-width:480px){.processing-panel{padding:27px 19px 20px}.processing-panel h2{font-size:19px}}
@media(prefers-reduced-motion:reduce){
  .processing-spinner,.processing-track span{animation:none!important}
  .processing-track span{width:100%}
  .processing-overlay,.processing-panel{transition:none!important}
}


/* Daily usage system */
.usage-mini-card{margin:0 0 20px;padding:15px 17px;border:1px solid #111;background:rgba(255,255,255,.72);color:#183d56}
.usage-mini-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.usage-mini-top>div{display:flex;align-items:center;gap:12px}
.usage-mini-top strong{font-size:19px;font-weight:800}
.usage-mini-top a,.usage-link{color:#087bb8;font-size:12px;font-weight:800;text-decoration:none}
.usage-meter{height:7px;margin-top:12px;overflow:hidden;background:#c8e3f2}
.usage-meter span{display:block;height:100%;background:#087bb8;transition:width .35s ease}
.usage-mini-card p{margin:8px 0 0;color:#56758a;font-size:11px}
.usage-page{max-width:900px;margin:0 auto}
.usage-overview{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:16px}
.usage-balance-card,.usage-detail-card,.usage-history-card{border:1px solid #111;background:rgba(255,255,255,.78);padding:22px;color:#183d56}
.usage-balance-top{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.usage-balance-label,.usage-small-label{font-size:10px;font-weight:800;letter-spacing:.13em;color:#66869a}
.usage-percent{display:block;margin-top:8px;font-size:clamp(42px,8vw,64px);font-weight:800;line-height:1;letter-spacing:-.06em;color:#087bb8}
.usage-balance-sub{margin:10px 0 0;color:#55758a;font-size:13px;line-height:1.6}
.usage-ring{position:relative;width:92px;height:92px;flex:0 0 auto;overflow:hidden;border:2px solid #087bb8;border-radius:50%;background:linear-gradient(145deg,#eaf8ff,#cceeff);box-shadow:inset 0 0 0 3px rgba(255,255,255,.48),0 5px 15px rgba(8,123,184,.12)}
.usage-water{position:absolute;left:-28%;bottom:0;width:156%;height:var(--water-level,100%);background:linear-gradient(180deg,#43c4f2 0%,#159bd6 55%,#087bb8 100%);transition:height .8s cubic-bezier(.2,.7,.2,1)}
.usage-water::before,.usage-water::after{content:"";position:absolute;left:-10%;top:-8px;width:120%;height:17px;border-radius:42%;background:rgba(128,225,255,.82);animation:usageWave 4s ease-in-out infinite alternate}
.usage-water::after{top:-5px;left:-18%;width:136%;height:14px;background:rgba(218,249,255,.52);animation-duration:5.5s;animation-direction:alternate-reverse}
@keyframes usageWave{from{transform:translateX(-5%) rotate(-4deg)}to{transform:translateX(7%) rotate(5deg)}}
@media(prefers-reduced-motion:reduce){.usage-water,.usage-water::before,.usage-water::after{transition:none;animation:none}}
.usage-progress{height:10px;margin-top:22px;overflow:hidden;background:#c8e3f2}
.usage-progress span{display:block;height:100%;background:#087bb8;transition:width .4s ease}
.usage-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}
.usage-detail-card strong{display:block;margin-top:8px;font-size:21px;font-weight:800;overflow-wrap:anywhere}
.usage-reset{margin-top:15px;padding-top:13px;border-top:1px solid rgba(23,61,86,.14);font-size:12px;color:#58778b}
.usage-history-card{margin-top:16px}
.usage-history-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.usage-history-head h3{margin:0;font-size:16px}
.usage-history-list{display:grid;gap:0}
.usage-history-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 0;border-top:1px solid rgba(23,61,86,.12)}
.usage-history-row:first-child{border-top:0}
.usage-history-row strong{display:block;font-size:13px}
.usage-history-row small{display:block;margin-top:4px;color:#66869a;font-size:11px}
.usage-history-size{font-size:13px;font-weight:800;white-space:nowrap}
.usage-empty{padding:24px 8px;text-align:center;color:#66869a;font-size:13px}
.usage-note{margin-top:14px;color:#66869a;font-size:11px;line-height:1.6}
.usage-refresh{border:1px solid #111;background:transparent;padding:8px 12px;color:inherit;font:inherit;font-size:11px;font-weight:800;cursor:pointer}
html[data-theme="dark"] .usage-mini-card,html[data-theme="dark"] .usage-balance-card,html[data-theme="dark"] .usage-detail-card,html[data-theme="dark"] .usage-history-card{background:#132a3c;color:#e6f1f8;border-color:#60788b}
html[data-theme="dark"] .usage-mini-card p,html[data-theme="dark"] .usage-balance-sub,html[data-theme="dark"] .usage-reset,html[data-theme="dark"] .usage-note,html[data-theme="dark"] .usage-history-row small{color:#a9c1d1}
html[data-theme="dark"] .usage-small-label,html[data-theme="dark"] .usage-balance-label{color:#9bb8ca}
html[data-theme="dark"] .usage-percent,html[data-theme="dark"] .usage-mini-top a,html[data-theme="dark"] .usage-link{color:#8ed8ff}
html[data-theme="dark"] .usage-meter,html[data-theme="dark"] .usage-progress{background:#29475e}
html[data-theme="dark"] .usage-meter span,html[data-theme="dark"] .usage-progress span{background:#48b8f2}
html[data-theme="dark"] .usage-ring{border-color:#52758d;background:linear-gradient(145deg,#1c3c52,#102b40);box-shadow:inset 0 0 0 3px rgba(255,255,255,.06),0 5px 18px rgba(0,0,0,.2)}html[data-theme="dark"] .usage-water{background:linear-gradient(180deg,#69d9ff 0%,#269ed7 55%,#087bb8 100%)}html[data-theme="dark"] .usage-water::before{background:rgba(139,232,255,.78)}html[data-theme="dark"] .usage-water::after{background:rgba(225,250,255,.4)}
html[data-theme="dark"] .usage-refresh{border-color:#60788b;color:#e6f1f8}
@media(max-width:620px){.usage-overview{grid-template-columns:1fr}.usage-balance-card,.usage-detail-card,.usage-history-card{padding:18px}.usage-mini-card{padding:13px 14px}}


/* Login and account styles */
.login-page{min-height:100vh}
.login-shell{width:min(100%,560px);margin:clamp(36px,8vh,84px) auto;padding:0 4px}
.login-shell .section-heading{text-align:center;margin-bottom:28px}
.login-card{padding:clamp(16px,4vw,28px);border:1.5px solid var(--line,#222);border-radius:22px;background:var(--card-bg,rgba(255,255,255,.7));box-shadow:0 18px 50px rgba(20,40,60,.08);min-height:360px;display:flex;justify-content:center;align-items:flex-start}
.login-error{color:#c62828;text-align:center;font-size:.9rem}
.login-footnote{text-align:center;opacity:.7;font-size:.88rem;margin-top:18px}
@media(max-width:600px){.login-shell{margin-top:28px}.login-card{padding:12px;border-radius:18px}}

/* Discord account UI */
.trigo-account{display:flex;align-items:center;gap:9px;min-height:36px;margin-left:4px;flex-wrap:wrap}.trigo-account>span{font-weight:700;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trigo-signout{border:1.5px solid currentColor;border-radius:10px;padding:7px 11px;background:transparent;color:inherit;font:inherit;font-weight:700;cursor:pointer}.discord-login-content{width:100%;display:flex;flex-direction:column;align-items:center;gap:14px}.discord-login-button{width:min(100%,340px);min-height:52px;font-size:1rem}.login-card .login-error{width:100%}

/* Trigo account and refreshed Discord sign-in experience */
.login-shell{position:relative;max-width:540px;margin:clamp(30px,7vh,72px) auto 54px;padding:0 10px}
.login-eyebrow{display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:20px;color:#087bb8;font-size:10px;font-weight:800;letter-spacing:.18em}
.login-orbit{display:grid;place-items:center;width:30px;height:30px;border:1px solid #111;border-radius:50%;background:rgba(255,255,255,.62);font-size:15px}
.login-shell .section-heading h1{font-size:clamp(32px,7vw,48px);letter-spacing:-.055em}
.login-shell .section-heading p{max-width:390px;margin:12px auto 0;line-height:1.7}
.login-card{position:relative;min-height:0;overflow:hidden;padding:0;border-radius:24px;background:linear-gradient(145deg,rgba(255,255,255,.94),rgba(222,243,255,.82));box-shadow:0 22px 70px rgba(22,75,112,.13)}
.login-card-glow{position:absolute;width:230px;height:230px;right:-95px;top:-130px;border-radius:50%;background:radial-gradient(circle,rgba(67,181,240,.25),transparent 68%);pointer-events:none}
.login-card-content{position:relative;width:100%;padding:34px 28px 28px;display:flex;flex-direction:column;align-items:center;text-align:center}
.login-discord-icon{display:grid;place-items:center;width:58px;height:58px;margin-bottom:16px;border:1px solid #111;border-radius:18px;background:#fff;color:#111;box-shadow:0 8px 22px rgba(22,35,45,.12)}
.login-card-label{font-size:9px;font-weight:800;letter-spacing:.17em;color:#66869a}
.login-card-content h2{margin:8px 0 7px;color:#173b55;font-size:22px;font-weight:800}
.login-card-content>p:not(.login-error){max-width:330px;margin:0 auto 22px;color:#58758a;font-size:13px;line-height:1.65}
.discord-login-button{display:flex;align-items:center;justify-content:space-between;gap:18px;width:min(100%,360px);min-height:54px;padding:0 20px;border:1px solid #111;border-radius:13px;background:#5865f2;color:#fff;text-decoration:none;font-size:14px;font-weight:800;box-shadow:0 9px 22px rgba(88,101,242,.2);transition:transform .2s ease,box-shadow .2s ease}
.discord-login-button:hover{transform:translateY(-2px);box-shadow:0 13px 28px rgba(88,101,242,.27)}
.login-security-note{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:19px;color:#66869a;font-size:10px;font-weight:700}
.login-security-note span{display:grid;place-items:center;width:17px;height:17px;border-radius:50%;background:#dff5e9;color:#168650}
.login-footnote{max-width:400px;margin:18px auto 0;font-size:11px;line-height:1.6;color:#66869a}
.login-footnote a{color:#087bb8;font-weight:800}
html[data-theme="dark"] .login-card{background:linear-gradient(145deg,#142b3e,#102234)}
html[data-theme="dark"] .login-card-content h2{color:#f1f7fb}
html[data-theme="dark"] .login-card-content>p:not(.login-error),html[data-theme="dark"] .login-security-note{color:#aac2d3}
html[data-theme="dark"] .login-eyebrow{color:#8ed8ff}
html[data-theme="dark"] .login-orbit{background:#18364d;border-color:#7892a4}
.account-page{max-width:900px;margin:0 auto}
.account-hero-card,.account-info-card,.account-logout-card{border:1px solid #111;background:rgba(255,255,255,.78);color:#183d56;box-shadow:0 12px 35px rgba(22,75,112,.06)}
.account-hero-card{display:flex;align-items:center;gap:18px;padding:22px;margin-bottom:15px}
.account-avatar{display:grid;place-items:center;width:70px;height:70px;flex:0 0 auto;border:1px solid #111;border-radius:22px;background:linear-gradient(145deg,#b8e8ff,#e9f8ff);color:#087bb8;font-size:28px;font-weight:800}
.account-identity{min-width:0;flex:1}
.account-status{display:flex;align-items:center;gap:7px;color:#168650;font-size:9px;font-weight:800;letter-spacing:.12em}
.account-status i{width:7px;height:7px;border-radius:50%;background:#20b36c;box-shadow:0 0 0 4px rgba(32,179,108,.12)}
.account-identity h2{margin:7px 0 2px;font-size:23px;line-height:1.2;overflow-wrap:anywhere}
.account-identity p{margin:0;color:#66869a;font-size:13px}
.account-provider-mark{padding:8px 11px;border:1px solid rgba(88,101,242,.3);border-radius:10px;background:rgba(88,101,242,.08);color:#5865f2;font-size:11px;font-weight:800}
.account-info-card{padding:22px;margin-bottom:15px}
.account-card-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.account-card-heading h3,.account-logout-card h3{margin:5px 0 0;font-size:18px}
.account-lock,.account-secure-pill{padding:6px 9px;border:1px solid rgba(22,134,80,.25);border-radius:20px;color:#168650;font-size:9px;font-weight:800;letter-spacing:.08em}
.account-info-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}
.account-info-item{min-width:0;padding:14px 0;border-top:1px solid rgba(23,61,86,.12)}
.account-info-item>span{display:block;margin-bottom:6px;color:#66869a;font-size:11px;font-weight:600}
.account-info-item strong{display:block;overflow-wrap:anywhere;font-size:13px;font-weight:800}
.account-id-item>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.account-copy{border:1px solid #111;border-radius:8px;background:transparent;padding:5px 8px;color:inherit;font:inherit;font-size:10px;font-weight:800;cursor:pointer}
.account-security-row{display:flex;align-items:flex-start;gap:13px;padding:13px 0;border-top:1px solid rgba(23,61,86,.12)}
.account-security-icon{display:grid;place-items:center;width:28px;height:28px;flex:0 0 auto;border:1px solid rgba(8,123,184,.25);border-radius:9px;background:rgba(8,123,184,.08);color:#087bb8;font-weight:800}
.account-security-row strong{display:block;font-size:13px}
.account-security-row p{margin:4px 0 0;color:#66869a;font-size:11px;line-height:1.6}
.account-security-row a{display:inline-block;margin-top:6px;color:#087bb8;font-size:11px;font-weight:800;text-decoration:none}
.account-logout-card{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px}
.account-logout-card p{margin:6px 0 0;color:#66869a;font-size:12px}
.account-logout-button{min-width:110px;border:1px solid #b72f3d!important;background:#fff!important;color:#b72f3d!important}
.account-logout-button:hover{background:#fff0f1!important}
.account-logout-button:disabled{opacity:.6;cursor:wait}
.account-feedback{min-height:20px;margin:10px 2px;color:#b72f3d;font-size:12px}
html[data-theme="dark"] .account-hero-card,html[data-theme="dark"] .account-info-card,html[data-theme="dark"] .account-logout-card{background:#132a3c;color:#e6f1f8;border-color:#60788b}
html[data-theme="dark"] .account-identity p,html[data-theme="dark"] .account-info-item>span,html[data-theme="dark"] .account-security-row p,html[data-theme="dark"] .account-logout-card p{color:#a9c1d1}
html[data-theme="dark"] .account-info-item,html[data-theme="dark"] .account-security-row{border-color:rgba(210,232,246,.14)}
html[data-theme="dark"] .account-avatar{background:linear-gradient(145deg,#204a66,#17364c);color:#8ed8ff;border-color:#60788b}
html[data-theme="dark"] .account-copy{border-color:#7892a4;color:#e6f1f8}
html[data-theme="dark"] .account-logout-button{background:#321c25!important;color:#ffb6bf!important;border-color:#b75c69!important}
.trigo-account{gap:10px}
.trigo-account-link{max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:inherit;font-size:12px;font-weight:800;text-decoration:none}
@media(max-width:620px){.login-card-content{padding:28px 18px 23px}.account-hero-card{padding:16px;gap:12px}.account-avatar{width:58px;height:58px;border-radius:18px}.account-identity h2{font-size:19px}.account-provider-mark{font-size:9px;padding:6px 8px}.account-info-card{padding:17px}.account-info-grid{grid-template-columns:1fr}.account-logout-card{align-items:flex-start;flex-direction:column}.account-logout-button{width:100%}}

.account-avatar{overflow:hidden}
.account-avatar-image{display:block;width:100%;height:100%;object-fit:cover}

/* Clean compact navigation: no divider lines between menu items. */
.top-nav a { border-bottom:0!important; }


/* Trigo Hub latest-update dropdown */
.hub-updates-section{max-width:900px;margin:0 auto 34px;padding-top:8px}
.hub-updates-wrap{width:100%}
.hub-updates-dropdown{border:1.5px solid var(--line,#222);border-radius:16px;background:rgba(255,255,255,.72);color:var(--text,#183d56);overflow:hidden}
.hub-updates-dropdown summary{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:17px 19px;cursor:pointer;list-style:none;font-size:14px;font-weight:800}
.hub-updates-dropdown summary::-webkit-details-marker{display:none}
.hub-updates-chevron{font-size:22px;line-height:1;transition:transform .2s ease}
.hub-updates-dropdown[open] .hub-updates-chevron{transform:rotate(180deg)}
.hub-update-entry{padding:0 19px 19px;border-top:1px solid rgba(23,61,86,.12)}
.hub-update-entry time{display:inline-block;margin-top:16px;color:#087bb8;font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
.hub-update-entry h3{margin:7px 0 6px;font-size:16px;font-weight:800}
.hub-update-entry p{margin:0;color:#58758a;font-size:13px;line-height:1.7}
html[data-theme="dark"] .hub-updates-dropdown{background:#132a3c;color:#e6f1f8;border-color:#60788b}
html[data-theme="dark"] .hub-update-entry{border-color:rgba(210,232,246,.14)}
html[data-theme="dark"] .hub-update-entry time{color:#8ed8ff}
html[data-theme="dark"] .hub-update-entry p{color:#a9c1d1}
.account-workspace-cta{margin:0 auto 16px}
@media(max-width:620px){.hub-updates-dropdown summary{padding:15px}.hub-update-entry{padding:0 15px 16px}}


/* Main hub spacing and latest-update card refinement */
body:not(.home-page) .hero-note{
  margin-top:68px;
  justify-content:center;
  line-height:1.7;
}
body:not(.home-page) .hero{
  padding-bottom:68px;
}
.hub-updates-section{
  width:min(100%,760px);
  margin:0 auto 48px;
  padding:24px;
  border:1px solid rgba(112,166,197,.48);
  background:rgba(255,255,255,.34);
  box-shadow:0 18px 48px rgba(40,105,140,.08);
  backdrop-filter:blur(10px);
}
.hub-updates-wrap{
  display:grid;
  gap:18px;
}
.hub-updates-section .section-heading{
  margin:0;
  text-align:left;
}
.hub-updates-section .section-heading h2{
  margin:7px 0 5px;
  color:#123a55;
  font-size:clamp(23px,4vw,30px);
  letter-spacing:-.045em;
}
.hub-updates-section .section-heading p{
  max-width:520px;
  margin:0;
  color:#55758b;
  font-size:13px;
  line-height:1.65;
}
.hub-updates-dropdown{
  border:1px solid #a8cfe4;
  border-radius:12px;
  background:rgba(255,255,255,.82);
  box-shadow:0 10px 28px rgba(38,104,139,.08);
}
.hub-updates-dropdown summary{
  min-height:62px;
  padding:17px 19px;
  color:#173d57;
}
.hub-updates-dropdown summary>span:first-child{
  display:flex;
  align-items:center;
  gap:10px;
}
.hub-updates-dropdown summary>span:first-child::before{
  content:"NEW";
  display:inline-grid;
  place-items:center;
  min-height:22px;
  padding:0 8px;
  border-radius:4px;
  background:#d9f1ff;
  color:#087bb8;
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
}
.hub-update-entry{
  padding:2px 19px 19px;
  border-top:1px solid rgba(23,61,86,.12);
}
.hub-update-entry time{
  margin-top:15px;
  padding:5px 9px;
  border-radius:5px;
  background:#e4f5ff;
  color:#0872a9;
  font-size:9px;
}
.hub-update-entry h3{
  margin:11px 0 6px;
  color:#173d57;
  font-size:17px;
}
.hub-update-entry p{
  max-width:590px;
  color:#58758a;
  font-size:13px;
  line-height:1.75;
}
html[data-theme="dark"] .hub-updates-section{
  border-color:#496276;
  background:rgba(13,29,43,.58);
  box-shadow:0 18px 48px rgba(0,0,0,.16);
}
html[data-theme="dark"] .hub-updates-section .section-heading h2,
html[data-theme="dark"] .hub-updates-dropdown summary,
html[data-theme="dark"] .hub-update-entry h3{
  color:#edf6ff;
}
html[data-theme="dark"] .hub-updates-section .section-heading p,
html[data-theme="dark"] .hub-update-entry p{
  color:#a9bfd0;
}
html[data-theme="dark"] .hub-updates-dropdown{
  border-color:#60788b;
  background:#132a3c;
}
html[data-theme="dark"] .hub-updates-dropdown summary>span:first-child::before{
  background:#173d55;
  color:#8ed8ff;
}
html[data-theme="dark"] .hub-update-entry time{
  background:#173d55;
  color:#8ed8ff;
}
@media(max-width:620px){
  body:not(.home-page) .hero-note{margin-top:56px;padding:0 8px;flex-wrap:wrap}
  body:not(.home-page) .hero{padding-bottom:48px}
  .hub-updates-section{padding:17px;margin-bottom:34px}
  .hub-updates-wrap{gap:15px}
  .hub-updates-section .section-heading h2{font-size:24px}
  .hub-updates-dropdown summary{padding:15px}
  .hub-update-entry{padding:2px 15px 16px}
}


/* Latest updates: always-visible vertical feed */
.hub-updates-column{display:flex;flex-direction:column;gap:14px;width:100%}
.hub-updates-column .hub-update-entry{padding:20px 22px 22px;border:1px solid #a8cfe4;border-radius:12px;background:rgba(255,255,255,.82);box-shadow:0 10px 28px rgba(38,104,139,.08)}
.hub-update-topline{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.hub-update-tag{display:inline-flex;align-items:center;min-height:22px;padding:0 9px;border-radius:4px;background:#d9f1ff;color:#087bb8;font-size:9px;font-weight:900;letter-spacing:.08em}
.hub-updates-column .hub-update-entry time{margin:0;padding:0;background:transparent;color:#55758b;font-size:10px}
.hub-updates-column .hub-update-entry h3{margin:14px 0 7px}
html[data-theme="dark"] .hub-updates-column .hub-update-entry{border-color:#60788b;background:#132a3c}
html[data-theme="dark"] .hub-update-tag{background:#173d55;color:#8ed8ff}
html[data-theme="dark"] .hub-updates-column .hub-update-entry time{color:#a9bfd0}


/* Update card polish */
.hub-updates-column .hub-update-entry{
  position:relative;
  overflow:hidden;
  border-color:#a8d9b7;
  background:linear-gradient(135deg,rgba(241,252,244,.98),rgba(255,255,255,.94));
}
.hub-updates-column .hub-update-entry::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:#22a447;
}
.hub-update-tag{
  background:#dcfce5;
  color:#15803d;
  letter-spacing:.07em;
}
.hub-updates-column .hub-update-entry time{
  color:#16803d;
  font-size:11px;
  font-weight:750;
}
html[data-theme="dark"] .hub-updates-column .hub-update-entry{
  border-color:#286b43;
  background:linear-gradient(135deg,#142d22,#132a3c);
}
html[data-theme="dark"] .hub-update-tag{
  background:#17452b;
  color:#86efac;
}
html[data-theme="dark"] .hub-updates-column .hub-update-entry time{
  color:#86efac;
}

/* Shared right-side navigation drawer for every page */
.site-header { position:relative; z-index:1000; }
body > .top-nav {
  position:fixed !important;
  right:12px !important;
  left:auto !important;
  margin:0 !important;
  top:72px !important;
  bottom:12px !important;
  width:min(320px, calc(100vw - 24px)) !important;
  max-width:calc(100vw - 24px) !important;
  height:auto !important;
  max-height:calc(100dvh - 84px);
  box-sizing:border-box;
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  justify-content:flex-start;
  gap:5px !important;
  margin:0 !important;
  padding:72px 14px 18px !important;
  overflow-x:hidden !important;
  overflow-y:auto;
  overscroll-behavior:contain;
  background:rgba(231,246,255,.97) !important;
  -webkit-backdrop-filter:blur(24px) saturate(165%);
  backdrop-filter:blur(24px) saturate(165%);
  border:1px solid #111 !important;
  border-radius:18px !important;
  box-shadow:-12px 0 38px rgba(19,66,93,.18) !important;
  opacity:1 !important;
  visibility:hidden !important;
  pointer-events:none;
  transform:translate3d(calc(100% + 24px),0,0) !important;
  transition:transform .32s cubic-bezier(.2,.8,.2,1), visibility .32s !important;
  z-index:1001;
}
body > .top-nav[aria-hidden="false"] {
  visibility:visible !important;
  pointer-events:auto;
  transform:translate3d(0,0,0) !important;
}
body > .top-nav a {
  display:flex;
  align-items:center;
  min-height:46px;
  box-sizing:border-box;
  width:100%;
  min-width:0;
  white-space:normal;
  overflow-wrap:anywhere;
  padding:12px 14px !important;
  border:0 !important;
  border-radius:11px;
  color:#244c66 !important;
  font-size:14px;
  font-weight:700;
  text-decoration:none;
  transition:background .18s ease, transform .18s ease;
}
body > .top-nav a:hover,
body > .top-nav a[aria-current="page"] {
  background:rgba(104,177,215,.20);
}
body > .top-nav a:hover { transform:translateX(3px); }
body > .top-nav a::after { display:none !important; }
body > .top-nav .theme-controls {
  display:flex;
  gap:10px;
  margin:14px 8px 0;
  padding-top:14px;
  border-top:1px solid rgba(35,78,103,.18);
}
body > .top-nav .theme-choice {
  width:42px;
  height:42px;
}
.menu-toggle { position:relative; z-index:1002; }
html[data-theme="dark"] body > .top-nav {
  background:rgba(22,35,48,.97) !important;
  border-color:#111 !important;
  box-shadow:-12px 0 38px rgba(0,0,0,.38) !important;
}
html[data-theme="dark"] body > .top-nav a { color:#e5eff8 !important; }
html[data-theme="dark"] body > .top-nav a:hover,
html[data-theme="dark"] body > .top-nav a[aria-current="page"] {
  background:rgba(113,174,211,.18);
}
html[data-theme="dark"] body > .top-nav .theme-controls {
  border-top-color:rgba(220,235,247,.18);
}
@media (prefers-reduced-motion:reduce) {
  body > .top-nav { transition:none !important; }
}



/* Polished navigation drawer visuals */
body > .top-nav {
  padding:88px 16px 20px !important;
  background:
    radial-gradient(ellipse at 100% 0%,rgba(61,169,226,.20),transparent 42%),
    linear-gradient(155deg,rgba(246,252,255,.99),rgba(222,242,253,.97)) !important;
  border:1px solid rgba(66,139,178,.42) !important;
  border-radius:24px !important;
  box-shadow:-18px 18px 54px rgba(20,73,105,.20),inset 0 1px 0 rgba(255,255,255,.9) !important;
}
body > .top-nav::before {
  content:"TRIGO ENGINE  /  MENU";
  position:absolute;
  top:25px;
  left:22px;
  right:22px;
  padding:0 0 17px;
  color:#1681b7;
  font-size:11px;
  font-weight:900;
  letter-spacing:2px;
  border-bottom:1px solid rgba(54,126,164,.18);
}
body > .top-nav::after {
  content:"BUILT FOR SCRIPT CREATORS";
  display:block;
  margin: auto 8px 0;
  padding:18px 4px 0;
  color:#6c8ca1;
  font-size:9px;
  font-weight:800;
  letter-spacing:1.45px;
  text-align:center;
  border-top:1px solid rgba(54,126,164,.16);
}
body > .top-nav a {
  position:relative;
  gap:13px;
  min-height:52px;
  padding:12px 14px !important;
  color:#284c63 !important;
  border:1px solid transparent !important;
  border-radius:14px !important;
  font-size:14px;
  letter-spacing:.1px;
}
body > .top-nav a::before {
  display:grid;
  place-items:center;
  flex:0 0 30px;
  width:30px;
  height:30px;
  border-radius:10px;
  background:rgba(69,157,202,.12);
  color:#147eaf;
  font-size:16px;
  font-weight:900;
}
body > .top-nav a[href*="main.html"]::before { content:"⌂"; }
body > .top-nav a[href*="script.html"]::before { content:"⌘"; }
body > .top-nav a[href*="pricing.html"]::before { content:"◇"; }
body > .top-nav a[href*="usage.html"]::before { content:"▥"; }
body > .top-nav a[href*="account.html"]::before,
body > .top-nav a[href*="login.html"]::before { content:"◉"; }
body > .top-nav a:hover {
  transform:translateX(-3px);
  background:rgba(89,174,216,.13);
  border-color:rgba(59,144,188,.18) !important;
}
body > .top-nav a[aria-current="page"] {
  color:#075f91 !important;
  background:linear-gradient(100deg,rgba(70,169,218,.22),rgba(70,169,218,.07)) !important;
  border-color:rgba(42,137,185,.22) !important;
  box-shadow:inset 3px 0 0 #168bc3,0 5px 14px rgba(41,123,165,.07);
}
body > .top-nav a[aria-current="page"]::before {
  color:#fff;
  background:linear-gradient(145deg,#24a4dc,#0877ad);
  box-shadow:0 4px 10px rgba(8,119,173,.2);
}
body > .top-nav .theme-controls {
  position:relative;
  gap:10px;
  margin:16px 4px 0;
  padding:34px 10px 4px;
  border-top:1px solid rgba(54,126,164,.16);
}
body > .top-nav .theme-controls::before {
  content:"APPEARANCE";
  position:absolute;
  top:13px;
  left:10px;
  color:#6c8ca1;
  font-size:9px;
  font-weight:900;
  letter-spacing:1.5px;
}
body > .top-nav .theme-choice {
  width:44px;
  height:44px;
  border:1px solid rgba(52,130,171,.24) !important;
  border-radius:13px !important;
  background:rgba(255,255,255,.68) !important;
  box-shadow:0 4px 12px rgba(29,91,125,.07);
}
body > .top-nav .theme-choice[aria-pressed="true"] {
  color:#fff !important;
  background:linear-gradient(145deg,#168fc5,#086b9e) !important;
  border-color:#0877ad !important;
}
html[data-theme="dark"] body > .top-nav {
  background:
    radial-gradient(ellipse at 100% 0%,rgba(37,129,178,.22),transparent 42%),
    linear-gradient(155deg,rgba(25,43,58,.99),rgba(13,27,40,.98)) !important;
  border-color:rgba(105,157,187,.34) !important;
  box-shadow:-18px 18px 54px rgba(0,0,0,.42),inset 0 1px 0 rgba(255,255,255,.06) !important;
}
html[data-theme="dark"] body > .top-nav::before { color:#70c8f2;border-color:rgba(174,209,229,.14); }
html[data-theme="dark"] body > .top-nav::after { color:#829bad;border-color:rgba(174,209,229,.14); }
html[data-theme="dark"] body > .top-nav a { color:#e1edf5 !important; }
html[data-theme="dark"] body > .top-nav a::before { color:#91d9fa;background:rgba(73,154,197,.16); }
html[data-theme="dark"] body > .top-nav a:hover { background:rgba(73,154,197,.13);border-color:rgba(111,187,226,.16) !important; }
html[data-theme="dark"] body > .top-nav a[aria-current="page"] {
  color:#fff !important;
  background:linear-gradient(100deg,rgba(24,139,195,.32),rgba(24,139,195,.10)) !important;
  border-color:rgba(103,194,237,.24) !important;
  box-shadow:inset 3px 0 0 #4bb9ed,0 5px 14px rgba(0,0,0,.12);
}
html[data-theme="dark"] body > .top-nav .theme-controls { border-top-color:rgba(174,209,229,.14); }
html[data-theme="dark"] body > .top-nav .theme-controls::before { color:#829bad; }
html[data-theme="dark"] body > .top-nav .theme-choice {
  background:rgba(34,57,74,.85) !important;
  border-color:rgba(135,181,208,.24) !important;
}
html[data-theme="dark"] body > .top-nav .theme-choice[aria-pressed="true"] {
  background:linear-gradient(145deg,#168fc5,#086b9e) !important;
  border-color:#4bb9ed !important;
}


/* Clean navigation labels and dark-theme shooting-star sky */
body > .top-nav a::before {
  display:none !important;
  content:none !important;
}
body > .top-nav a {
  gap:0 !important;
}
body > .top-nav::before {
  content:"TRIGO ENGINE MENU";
}
html[data-theme="dark"] body::before {
  inset:0 !important;
  top:0 !important;
  left:0 !important;
  width:100% !important;
  height:100% !important;
  border-radius:0 !important;
  filter:none !important;
  opacity:.9 !important;
  background:
    radial-gradient(1px 1px at 7% 16%,rgba(255,255,255,.95) 98%,transparent),
    radial-gradient(1.5px 1.5px at 18% 72%,rgba(178,224,255,.9) 98%,transparent),
    radial-gradient(1px 1px at 31% 34%,rgba(255,255,255,.85) 98%,transparent),
    radial-gradient(1.5px 1.5px at 43% 84%,rgba(190,229,255,.8) 98%,transparent),
    radial-gradient(1px 1px at 57% 19%,rgba(255,255,255,.9) 98%,transparent),
    radial-gradient(1px 1px at 69% 61%,rgba(255,255,255,.8) 98%,transparent),
    radial-gradient(1.5px 1.5px at 82% 29%,rgba(181,222,255,.9) 98%,transparent),
    radial-gradient(1px 1px at 94% 78%,rgba(255,255,255,.9) 98%,transparent),
    radial-gradient(1px 1px at 89% 9%,rgba(255,255,255,.8) 98%,transparent);
  background-repeat:repeat;
  background-size:100% 100%;
  animation:trigoStarTwinkle 5s ease-in-out infinite alternate;
}
html[data-theme="dark"] body::after {
  top:8vh !important;
  left:-260px !important;
  right:auto !important;
  bottom:auto !important;
  width:230px !important;
  height:2px !important;
  border-radius:999px !important;
  filter:none !important;
  opacity:0 !important;
  background:linear-gradient(90deg,transparent,rgba(174,225,255,.25),#fff,rgba(116,202,255,.8),transparent) !important;
  box-shadow:0 0 8px rgba(121,202,255,.9),0 0 20px rgba(74,164,230,.55) !important;
  transform:rotate(28deg);
  transform-origin:center;
  animation:trigoShootingStar 9s ease-in-out infinite;
  animation-delay:1.5s;
}
@keyframes trigoStarTwinkle {
  from { opacity:.58; }
  to { opacity:1; }
}
@keyframes trigoShootingStar {
  0%, 8% { opacity:0; transform:translate3d(0,0,0) rotate(28deg); }
  10% { opacity:1; }
  23% { opacity:0; transform:translate3d(145vw,62vh,0) rotate(28deg); }
  100% { opacity:0; transform:translate3d(145vw,62vh,0) rotate(28deg); }
}
@media (prefers-reduced-motion:reduce) {
  html[data-theme="dark"] body::before,
  html[data-theme="dark"] body::after {
    animation:none !important;
  }
}


/* Keep decorative sky layers from intercepting navigation clicks */
body::before,body::after{pointer-events:none !important}
.site-header,.site-header .brand{position:relative;z-index:1003;pointer-events:auto}
.site-header .brand{display:flex;cursor:pointer}
.site-header .brand-logo{pointer-events:none}



/* Trigo Vault and loader result */
.script-name-field { margin-bottom:16px; }
.field input { width:100%;min-height:44px;padding:10px 12px;background:var(--surface-2);color:var(--text);border:1px solid var(--line-strong);border-radius:0;font:inherit;font-size:13px; }
.field input::placeholder { color:var(--muted);opacity:.8; }
.workspace-divider,#legacyOutputCard,.exec-card { display:none !important; }
.vault-result-card { margin-top:18px; }
.vault-result-head { display:flex;align-items:center;gap:12px;flex-wrap:wrap; }
.vault-result-message { color:var(--muted);font-size:13px;line-height:1.65; }
.vault-loader-label { display:block;font-size:10px;font-weight:800;letter-spacing:.09em;margin:12px 0 7px;color:var(--muted); }
.vault-loader-code { width:100%;min-height:82px;resize:vertical;padding:12px;background:var(--surface-2);color:var(--text);border:1px solid var(--line-strong);font:12px/1.6 ui-monospace,monospace;overflow-wrap:anywhere; }
.vault-result-actions { display:flex;gap:8px;flex-wrap:wrap;margin-top:12px; }
.vault-page { max-width:980px; }
.vault-summary { display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:18px;border:1px solid var(--line);background:var(--surface);margin-bottom:16px; }
.vault-meter { display:flex;gap:5px;width:150px; }
.vault-meter span { height:8px;flex:1;background:var(--surface-2);border:1px solid var(--line); }
.vault-meter span.filled { background:var(--accent);border-color:var(--accent); }
.vault-entry { border:1px solid var(--line);background:var(--surface);padding:16px;margin-bottom:12px; }
.vault-entry-head { display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap; }
.vault-entry-name { font-weight:800;font-size:15px;overflow-wrap:anywhere; }
.vault-entry-meta { color:var(--muted);font-size:11px;margin-top:4px; }
.vault-entry-actions { display:flex;gap:8px;flex-wrap:wrap;margin-top:14px; }
.vault-entry-actions .btn { min-height:40px; }
.vault-search { width:100%;max-width:360px;min-height:44px;padding:10px 12px;background:var(--surface);color:var(--text);border:1px solid var(--line-strong);font:inherit; }
.vault-empty { padding:28px 18px;text-align:center;border:1px dashed var(--line-strong);color:var(--muted);background:var(--surface); }
.vault-status { min-height:22px;color:var(--muted);font-size:12px;margin-top:10px; }
.vault-status.error { color:var(--red); }
.vault-status.success { color:var(--green); }

.vault-code-view { display:grid;gap:8px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line); }
.vault-code-view .vault-loader-code { min-height:180px;max-height:420px; }

/* Clearer dark theme editor and input surfaces */
html[data-theme="dark"] .editor-panel,
html[data-theme="dark"] .editor-panel .editor,
html[data-theme="dark"] .script-name-field input,
html[data-theme="dark"] .vault-loader-code,
html[data-theme="dark"] .vault-search {
  background-color:#ffffff !important;
  color:#17212b !important;
}
html[data-theme="dark"] .editor::placeholder,
html[data-theme="dark"] .script-name-field input::placeholder,
html[data-theme="dark"] .vault-loader-code::placeholder,
html[data-theme="dark"] .vault-search::placeholder {
  color:#65717d !important;
}
html[data-theme="dark"] .editor-panel {
  border-color:#ffffff !important;
}
html[data-theme="dark"] .script-name-field input,
html[data-theme="dark"] .vault-loader-code,
html[data-theme="dark"] .vault-search {
  border-color:#cbd5df !important;
}

/* Centered completion window with a blurred page behind it */
body.vault-modal-open { overflow:hidden !important; }
.vault-result-overlay {
  position:fixed;
  inset:0;
  z-index:10050;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(5,13,22,.42);
  -webkit-backdrop-filter:blur(11px);
  backdrop-filter:blur(11px);
  overflow-y:auto;
  animation:vaultOverlayIn .18s ease-out;
}
.vault-result-overlay.hidden { display:none !important; }
.vault-result-dialog {
  position:relative;
  width:min(100%,520px);
  max-height:min(88vh,760px);
  overflow-y:auto;
  padding:26px;
  border:1px solid var(--line-strong);
  border-radius:18px;
  background:var(--surface);
  color:var(--text);
  box-shadow:0 24px 90px rgba(0,0,0,.32);
  animation:vaultDialogIn .2s ease-out;
}
.vault-result-close {
  position:absolute;
  top:10px;
  right:12px;
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:50%;
  background:var(--surface-2);
  color:var(--text);
  font-size:25px;
  line-height:1;
}
.vault-result-head { padding-right:34px; }
.vault-result-dialog .vault-loader-code {
  min-height:104px;
  background:var(--surface-2);
  color:var(--text);
  border:1px solid var(--line-strong);
  border-radius:10px;
}
html[data-theme="dark"] .vault-result-dialog .vault-loader-code {
  background:#ffffff !important;
  color:#17212b !important;
}
.vault-result-actions { gap:10px; }
.vault-result-actions > * { flex:1 1 auto; text-align:center; }
@keyframes vaultOverlayIn { from { opacity:0; } to { opacity:1; } }
@keyframes vaultDialogIn { from { opacity:0; transform:translateY(12px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }
@media(max-width:520px) {
  .vault-result-overlay { padding:12px; }
  .vault-result-dialog { padding:22px 17px; border-radius:15px; }
  .vault-result-actions { flex-direction:column; }
  .vault-result-actions > * { width:100%; }
}
@media(prefers-reduced-motion:reduce) {
  .vault-result-overlay,.vault-result-dialog { animation:none; }
}


/* Consistent page surfaces and form contrast in both themes. */
html[data-theme="dark"] .vault-summary,
html[data-theme="dark"] .vault-entry,
html[data-theme="dark"] .vault-empty {
  background:#132a3c !important;
  color:#e6f1f8 !important;
  border-color:#60788b !important;
}
html[data-theme="dark"] .vault-entry-name,
html[data-theme="dark"] #vaultCount,
html[data-theme="dark"] .vault-summary .card-title {
  color:#edf6ff !important;
}
html[data-theme="dark"] .vault-entry-meta,
html[data-theme="dark"] #vaultRemaining,
html[data-theme="dark"] .vault-status {
  color:#a9c1d1 !important;
}
html[data-theme="dark"] .vault-code-view {
  border-color:rgba(210,232,246,.18) !important;
}
html[data-theme="dark"] .vault-search,
html[data-theme="dark"] .vault-loader-code,
html[data-theme="dark"] .script-name-field input {
  background:#ffffff !important;
  color:#17212b !important;
  border-color:#cbd5df !important;
}
html[data-theme="dark"] .vault-search::placeholder,
html[data-theme="dark"] .script-name-field input::placeholder {
  color:#65717d !important;
}
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not(.vault-search):not(.script-name-field input),
html[data-theme="dark"] textarea:not(.editor):not(.vault-loader-code),
html[data-theme="dark"] select {
  background:#0d1b29;
  color:#e5eff8;
  border-color:#526b80;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color:#819bad;
}
html[data-theme="light"] .vault-summary,
html[data-theme="light"] .vault-entry,
html[data-theme="light"] .vault-empty {
  color:#102b42;
}


/* Glowing saved script names and clearer loader management controls. */
.vault-entry-name {
  display:inline-block;
  color:#087bb8;
  text-shadow:0 0 8px rgba(8,123,184,.24),0 0 18px rgba(8,123,184,.12);
  transition:text-shadow .2s ease, color .2s ease;
}
.vault-entry:hover .vault-entry-name {
  color:#0797df;
  text-shadow:0 0 9px rgba(8,151,223,.48),0 0 22px rgba(8,151,223,.24);
}
html[data-theme="dark"] .vault-entry-name {
  color:#8ed8ff !important;
  text-shadow:0 0 8px rgba(72,190,255,.45),0 0 20px rgba(35,151,219,.28);
}
html[data-theme="dark"] .vault-entry:hover .vault-entry-name {
  color:#c2edff !important;
  text-shadow:0 0 10px rgba(105,211,255,.72),0 0 26px rgba(35,151,219,.42);
}
.vault-entry-actions {
  display:flex;
  align-items:stretch;
  gap:9px;
  flex-wrap:wrap;
}
.vault-entry-actions .btn {
  min-height:42px;
  flex:0 1 auto;
  white-space:normal;
}
.vault-entry-actions .btn:not(.clear) {
  border-color:rgba(8,123,184,.45);
  background:rgba(8,123,184,.10);
  color:var(--text);
}
.vault-entry-actions .btn.clear {
  border-color:var(--line-strong);
  background:var(--surface-2);
  color:var(--text);
}
html[data-theme="dark"] .vault-entry-actions .btn:not(.clear) {
  background:rgba(35,129,178,.2) !important;
  border-color:#4b91b5 !important;
  color:#e8f6ff !important;
}
html[data-theme="dark"] .vault-entry-actions .btn.clear {
  background:#20384c !important;
  border-color:#60788b !important;
  color:#e5eff8 !important;
}
.vault-entry-actions .btn:hover {
  filter:brightness(1.08);
}
@media(max-width:600px) {
  .vault-entry-actions .btn { flex:1 1 calc(50% - 9px); }
}


/* Trigo themed Vault action dialogs */
.vault-action-overlay {
  position:fixed;inset:0;z-index:10060;display:flex;align-items:center;justify-content:center;
  padding:18px;background:rgba(5,13,22,.48);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
}
.vault-action-dialog {
  width:min(100%,440px);padding:24px;border:1px solid var(--line-strong);border-radius:18px;
  background:var(--surface);color:var(--text);box-shadow:0 24px 80px rgba(0,0,0,.35);
  animation:vaultDialogIn .18s ease-out;
}
.vault-action-dialog h3 { margin:0 32px 8px 0;font-size:19px;line-height:1.25; }
.vault-action-message { margin:0;color:var(--muted);font-size:13px;line-height:1.6;overflow-wrap:anywhere; }
.vault-action-input {
  display:block;width:100%;min-height:46px;margin-top:16px;padding:11px 13px;
  border:1px solid var(--line-strong);border-radius:10px;background:var(--surface-2);color:var(--text);font:inherit;
}
.vault-action-buttons { display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap;margin-top:20px; }
.vault-action-buttons .btn { min-width:104px; }
.vault-action-buttons .btn.danger { background:#b4233d;border-color:#b4233d;color:#fff; }
.vault-action-buttons .btn.danger:hover { background:#d12d4b;border-color:#d12d4b; }
html[data-theme="dark"] .vault-action-dialog { background:#132a3c;border-color:#60788b;color:#edf6ff; }
html[data-theme="dark"] .vault-action-message { color:#b7cad8; }
html[data-theme="dark"] .vault-action-input { background:#fff;color:#17212b;border-color:#cbd5df; }
html[data-theme="dark"] .vault-action-input::placeholder { color:#65717d; }

/* Restore the earlier Vault button appearance while keeping name glow. */
.vault-entry-actions { display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:14px; }
.vault-entry-actions .btn { min-height:40px;flex:0 0 auto;white-space:nowrap; }
.vault-entry-actions .btn:not(.clear) { border-color:#444;background:#181818;color:#f0f0f0; }
.vault-entry-actions .btn.clear { border-color:transparent;background:transparent;color:#c8c8c8; }
.vault-entry-actions .btn:hover { filter:none;background:#242424;border-color:#5b5b5b; }
html[data-theme="dark"] .vault-entry-actions .btn:not(.clear) { background:#181818 !important;border-color:#444 !important;color:#f0f0f0 !important; }
html[data-theme="dark"] .vault-entry-actions .btn.clear { background:transparent !important;border-color:transparent !important;color:#d5e5ef !important; }
@media(max-width:600px) {
  .vault-entry-actions .btn { flex:0 1 auto; }
  .vault-action-dialog { padding:21px 18px; }
  .vault-action-buttons { flex-direction:column-reverse; }
  .vault-action-buttons .btn { width:100%; }
}


/* Theme aware dark form surfaces. Keep all editable fields integrated with dark mode. */
html[data-theme="dark"] .editor-panel,
html[data-theme="dark"] .editor-panel .editor,
html[data-theme="dark"] .script-name-field input,
html[data-theme="dark"] .vault-loader-code,
html[data-theme="dark"] .vault-search,
html[data-theme="dark"] .vault-result-dialog .vault-loader-code,
html[data-theme="dark"] .vault-action-input,
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background-color:#10283a !important;
  color:#e8f4fc !important;
  border-color:#45677f !important;
  caret-color:#8ed8ff;
}
html[data-theme="dark"] .editor-panel {
  background-color:#0d2232 !important;
  border-color:#45677f !important;
}
html[data-theme="dark"] .editor::placeholder,
html[data-theme="dark"] .script-name-field input::placeholder,
html[data-theme="dark"] .vault-loader-code::placeholder,
html[data-theme="dark"] .vault-search::placeholder,
html[data-theme="dark"] .vault-action-input::placeholder,
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color:#91aabd !important;
}
html[data-theme="dark"] .editor-panel:focus-within,
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
  border-color:#55b8e8 !important;
  box-shadow:0 0 0 3px rgba(85,184,232,.14);
}
/* Explicit light theme surfaces remain bright and retain the sky blue design. */
html[data-theme="light"] .editor-panel,
html[data-theme="light"] .editor-panel .editor,
html[data-theme="light"] .script-name-field input,
html[data-theme="light"] .vault-loader-code,
html[data-theme="light"] .vault-search,
html[data-theme="light"] .vault-action-input {
  background-color:#f5fbff;
  color:#163a53;
  border-color:#a9cce0;
}


/* Minimal Vault page navigation */
.vault-back-link{display:inline-flex;align-items:center;gap:9px;margin:8px 0 24px;color:var(--text,#163a53);font-weight:700;text-decoration:none;font-size:15px;transition:color .18s ease,transform .18s ease}.vault-back-link span{font-size:22px;line-height:1}.vault-back-link:hover{color:var(--accent,#168ac4);transform:translateX(-2px)}html[data-theme="dark"] .vault-back-link{color:#e8f4fc}


/* Soft sky-blue fills for editable fields in light mode only. */
html[data-theme="light"] .editor-panel,
html[data-theme="light"] .editor-panel .editor,
html[data-theme="light"] .script-name-field input,
html[data-theme="light"] .field input,
html[data-theme="light"] .vault-loader-code,
html[data-theme="light"] .vault-search,
html[data-theme="light"] .vault-action-input,
html[data-theme="light"] .vault-result-dialog .vault-loader-code,
html[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
html[data-theme="light"] textarea,
html[data-theme="light"] select {
  background-color:#EAF7FF !important;
  color:#163a53;
  border-color:#a9cce0;
}
