:root {
  --ink: #12141a;
  --paper: #f3efe8;
  --card: #fffcf7;
  --line: #ddd4c6;
  --muted: #6b6458;
  --accent: #1d4ed8;
  --accent-hot: #dc2626;
  --accent-ink: #ffffff;
  --ok: #1f7a3a;
  --page: min(1100px, calc(100% - 40px));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  overflow-x: clip;
}

body {
  font-family: Sora, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

body::before,
body::after {
  content: "";
  pointer-events: none;
  position: fixed;
  z-index: 0;
  width: min(520px, 70vw);
  height: min(520px, 70vw);
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.34;
}

body::before {
  top: -140px;
  left: -80px;
  background: #2563eb;
  animation: orb-drift 14s ease-in-out infinite;
}

body::after {
  right: -120px;
  bottom: -160px;
  background: #dc2626;
  animation: orb-drift 16s ease-in-out infinite reverse;
}

@keyframes orb-drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(40px, 24px) scale(1.08);
  }
}

@keyframes brand-shift {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
  }
  50% {
    box-shadow: 0 10px 26px rgba(220, 38, 38, 0.28);
  }
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.top,
.wrap,
footer {
  position: relative;
  z-index: 1;
  width: var(--page);
  margin-left: auto;
  margin-right: auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow: visible;
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid #2563eb;
  border-radius: 20px;
  background: color-mix(in srgb, var(--card) 92%, #fff);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
  backdrop-filter: blur(16px);
  animation: header-in 0.7s var(--ease) both, header-glow 6s ease-in-out infinite;
}

.brand {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  min-width: 0;
  padding-right: 4px;
  color: inherit;
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
}

.top-actions,
.nav-toggle {
  display: none !important;
}

@keyframes header-glow {
  0%,
  100% {
    border-color: #2563eb;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.1);
  }
  50% {
    border-color: #dc2626;
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.12);
  }
}

@keyframes header-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s var(--ease);
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(18, 20, 26, 0.05);
  transform: translateY(-1px);
}

.nav-link.is-on {
  background: linear-gradient(135deg, #1d4ed8, #dc2626);
  background-size: 160% 160%;
  animation: brand-shift 6s linear infinite;
  color: #fff;
  transform: none;
}

.nav-more {
  position: relative;
  flex-shrink: 0;
}

.nav-more-btn {
  display: inline-flex;
  align-items: center;
}

.nav-more-btn::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 6px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.72;
}

.nav-more-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: none;
  flex-direction: column;
  gap: 2px;
  min-width: 208px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 16px 40px rgba(18, 20, 26, 0.12);
}

.nav-more.is-open .nav-more-list {
  display: flex;
}

.nav-more-list .nav-link {
  width: 100%;
  justify-content: flex-start;
  border-radius: 10px;
}

.nav-short {
  display: none;
}

.nav-more-extra {
  display: none;
}

.nav-view-all {
  display: none;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  justify-self: end;
}

.nav-toggle {
  display: none;
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.2s var(--ease), top 0.2s var(--ease), opacity 0.2s ease;
}

.nav-toggle-bars {
  top: 50%;
  margin-top: -1px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.top.is-open .nav-toggle-bars {
  background: transparent;
}

.top.is-open .nav-toggle-bars::before {
  top: 0;
  transform: translateX(-50%) rotate(45deg);
}

.top.is-open .nav-toggle-bars::after {
  top: 0;
  transform: translateX(-50%) rotate(-45deg);
}

.help-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 20, 26, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.help-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.help-open,
body.nav-open {
  overflow: hidden;
}

.help-modal {
  width: min(520px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  padding: 28px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 24px 60px rgba(18, 20, 26, 0.18);
  transform: translateY(16px) scale(0.97);
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.35s ease;
}

.help-overlay.is-open .help-modal {
  transform: none;
  opacity: 1;
}

.help-modal h2 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 32px;
  font-weight: 400;
}

.help-modal .lede {
  margin: 10px 0 18px;
}

.help-modal textarea {
  min-height: 140px;
}

.help-modal-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.help-close {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.help-close:hover {
  border-color: var(--ink);
}

.brand {
  color: inherit;
  text-decoration: none;
}

.mark {
  display: inline-block;
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}

.mark-d {
  display: inline-block;
  background: linear-gradient(90deg, #2563eb, #7c3aed, #dc2626, #2563eb);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: brand-shift 4s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  #view-home.is-touring .pdf-card,
  #view-home.is-touring .pdf-card.is-spotlight {
    opacity: 1 !important;
    transform: none !important;
    box-shadow: none !important;
  }
}

.tag,
.hint,
footer p,
.empty small {
  color: var(--muted);
}

.tag,
.eyebrow,
footer p {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.tag,
.eyebrow,
footer p {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  padding: 28px 0 48px;
}

.wrap-stack {
  grid-template-columns: 1fr;
}

main.wrap:not(.hidden) {
  animation: page-in 0.5s var(--ease) both;
}

main.wrap.is-entering:not(.hidden) {
  animation: page-in 0.5s var(--ease) both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.b64-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 8px;
}

.b64-head h1 {
  margin-bottom: 10px;
}

.mode-switch {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 4px;
  width: fit-content;
  margin: 0 0 22px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.mode {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s var(--ease);
}

.mode.is-on {
  background: linear-gradient(135deg, #1d4ed8, #dc2626);
  color: #fff;
}

.converter {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: stretch;
}

.converter-pane {
  min-width: 0;
}

.converter-pane textarea {
  min-height: 300px;
  margin: 0;
}

#view-base64 .b64-field {
  margin-bottom: 16px;
}

#view-base64 .b64-field textarea {
  height: 240px;
  min-height: 240px;
  max-height: 240px;
  resize: none;
}

#b64-output {
  background: #fff;
}

.pane-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pane-top span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

.converter-mid {
  display: grid;
  place-items: center;
  padding-top: 28px;
}

.flip {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.flip:hover {
  border-color: var(--ink);
}

.advanced {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.advanced summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.advanced .checks {
  margin: 14px 0 0;
}

.lede,
.subhead {
  margin: -12px 0 24px;
  max-width: 36em;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.subhead {
  margin: 0 0 16px;
  font-size: 22px;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  color: var(--ink);
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 0 16px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.check input {
  width: auto;
  margin: 0;
}

.panel,
.stage {
  position: relative;
  border: 1.5px solid transparent;
  border-radius: 24px;
  padding: 32px;
  background-image:
    linear-gradient(
      color-mix(in srgb, var(--card) 94%, #fff),
      color-mix(in srgb, var(--card) 94%, #fff)
    ),
    linear-gradient(90deg, #2563eb, #7c3aed, #dc2626, #2563eb);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  background-size: 100% 100%, 220% 100%;
  background-position: 0 0, 0% 50%;
  box-shadow: 0 20px 48px rgba(18, 20, 26, 0.06);
  animation: rise 0.6s var(--ease) both, card-border 8s linear infinite;
  transition: box-shadow 0.25s ease;
}

@keyframes card-border {
  to {
    background-position: 0 0, 200% 50%;
  }
}

.stage {
  animation-delay: 0.1s;
}

.panel:hover,
.stage:hover {
  box-shadow: 0 24px 52px rgba(18, 20, 26, 0.08);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #1d4ed8, #dc2626);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1 {
  margin: 0 0 22px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.05;
  animation: title-in 0.7s ease both;
}

.lede {
  animation: title-in 0.7s 0.08s ease both;
}

@keyframes title-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

main.wrap:not(.hidden) .field,
main.wrap:not(.hidden) .mode-switch,
main.wrap:not(.hidden) .types,
main.wrap:not(.hidden) .actions {
  animation: title-in 0.55s var(--ease) both;
}

main.wrap:not(.hidden) .mode-switch,
main.wrap:not(.hidden) .types {
  animation-delay: 0.12s;
}

main.wrap:not(.hidden) .field:nth-of-type(1) {
  animation-delay: 0.16s;
}

main.wrap:not(.hidden) .field:nth-of-type(2) {
  animation-delay: 0.22s;
}

main.wrap:not(.hidden) .field:nth-of-type(3),
main.wrap:not(.hidden) .actions {
  animation-delay: 0.28s;
}

.types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.type,
.btn,
select,
input[type="text"],
input[type="url"],
input[type="tel"],
input[type="email"],
input[type="date"],
input[type="time"],
input[type="search"],
input[type="number"],
input[type="password"],
textarea {
  font: inherit;
}

.type {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease,
    transform 0.18s var(--ease);
}

.type:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.type.is-on {
  background: linear-gradient(135deg, #1d4ed8, #dc2626);
  color: #fff;
  border-color: transparent;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.field span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14), 0 0 0 7px rgba(220, 38, 38, 0.08);
}

textarea {
  min-height: 220px;
  resize: vertical;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.5;
}

.json-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 10px;
}

.json-actions .btn {
  padding: 9px 14px;
}

.json-status {
  min-height: 1.3em;
  margin: 0 0 14px;
  font-size: 12px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: var(--muted);
}

.json-status.is-error {
  color: var(--accent-hot);
}

.json-status.is-ok {
  color: var(--ok);
}

input[type="color"] {
  padding: 6px;
  height: 48px;
  cursor: pointer;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hidden {
  display: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.file-btn {
  display: inline-flex;
  align-items: center;
}

.file-btn input {
  display: none;
}

.tree-tools {
  display: flex;
  gap: 14px;
}

.jtree {
  min-height: 420px;
  max-height: 70vh;
  overflow: auto;
  border-radius: 18px;
  border: 1px dashed var(--line);
  background: #fff;
  padding: 18px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.65;
}

.jtree .empty {
  min-height: 360px;
  display: grid;
  place-content: center;
}

.jtree-children {
  margin-left: 6px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.jtree-summary {
  cursor: pointer;
}

.jk {
  color: #1d4ed8;
  font-weight: 500;
}

.jv-string {
  color: #2f6b3a;
}

.jv-number {
  color: #1d4f8c;
}

.jv-boolean {
  color: var(--accent-hot);
}

.jv-null,
.jv-meta {
  color: var(--muted);
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s var(--ease), box-shadow 0.18s ease,
    background 0.18s ease, border-color 0.18s ease;
}

.btn.primary {
  background: linear-gradient(135deg, #1d4ed8, #dc2626);
  background-size: 160% 160%;
  animation: brand-shift 5s linear infinite, pulse-glow 2.8s ease-in-out infinite;
  color: var(--accent-ink);
}

.btn.primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.btn.primary:active,
.btn.ghost:active {
  transform: translateY(0) scale(0.98);
}

.btn.ghost {
  background: #fff;
  border: 1px solid var(--line);
}

.btn.ghost:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.frame {
  min-height: 360px;
  border-radius: 18px;
  border: 1px dashed var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  padding: 24px;
}

.frame canvas {
  max-width: 100%;
  height: auto;
}

.empty {
  text-align: center;
}

.empty span {
  display: block;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 28px;
}

.empty small {
  display: block;
  margin-top: 8px;
}

.hint {
  min-height: 1.4em;
  margin: 14px 0 0;
  font-size: 13px;
  word-break: break-all;
}

.hint.is-error {
  color: var(--accent-hot);
}

.hint.is-ok {
  color: var(--ok);
}

.hint.is-warn {
  color: #8a5a18;
}

.suggest {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #e3c4a4;
  border-radius: 14px;
  background: #fff6ea;
}

.suggest.is-fixed {
  border-color: #c9d6b8;
  background: #f3f7ec;
}

.suggest p {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
}

.suggest ul {
  margin: 0;
  padding: 0 0 0 1.15em;
}

.suggest li {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}

.suggest li:last-child {
  margin-bottom: 0;
}

.suggest .btn {
  justify-self: start;
}

.kv {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 13px;
}

.kv-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
  align-items: baseline;
}

.kv-row span {
  color: var(--muted);
}

.kv-row strong {
  font-weight: 500;
  word-break: break-all;
}

.regex-row {
  grid-template-columns: 1.4fr 0.6fr;
}

.unit-result {
  margin: 16px 0 10px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
}

.calc-table {
  margin: 14px 0 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.calc-table:empty {
  display: none;
}

.calc-table-head,
.calc-table-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
}

.calc-table-head-4,
.calc-table-row-4 {
  grid-template-columns: 0.9fr 1fr 1fr 1fr;
}

.calc-table-head {
  background: #f6f1e8;
  font-weight: 600;
}

.calc-table-row + .calc-table-row {
  border-top: 1px solid var(--line);
}

.regex-out,
.diff-out {
  min-height: 120px;
  margin: 8px 0 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.regex-out mark {
  background: #dbeafe;
  color: var(--ink);
  padding: 0 2px;
  border-radius: 4px;
}

.diff-line {
  display: block;
  padding: 1px 6px;
  border-radius: 4px;
}

.diff-add {
  background: #e7f4ea;
}

.diff-del {
  background: #f8e6e2;
}

.diff-same {
  color: var(--muted);
}

footer {
  width: var(--page);
  margin: 0 auto 32px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
  animation: page-in 0.7s 0.12s var(--ease) both;
}

.foot-copy {
  margin: 0;
  padding: 0;
  border: 0;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--muted);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
}

footer p.foot-name {
  margin: 0 0 8px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.foot-brand p,
.foot-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.foot-label {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.foot-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.foot-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.foot-link:hover,
.foot-link.is-on {
  color: var(--accent);
}

.foot-copy {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

footer .foot-copy + .foot-copy {
  margin-top: 8px;
  padding-top: 0;
  border-top: 0;
}

footer .foot-copy a {
  color: inherit;
}

.drop {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 150px;
  margin-bottom: 16px;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  text-align: center;
}

.drop input {
  display: none;
}

.drop > *:not(input) {
  pointer-events: none;
}

.drop-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 24px;
  word-break: break-word;
}

.drop small {
  color: var(--muted);
}

.drop.is-over {
  border-color: var(--accent);
  background: #eff6ff;
}

.drop.has-file {
  border-style: solid;
  border-color: #93c5fd;
  background: #f8fafc;
}

.docs-preview-wrap {
  min-height: 420px;
  border-radius: 18px;
  border: 1px dashed var(--line);
  background: #f6f3ee;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.docs-preview-wrap:has(.docs-pages:not(.hidden)) {
  display: block;
  overflow: auto;
  max-height: 70vh;
  padding: 18px;
}

.docs-preview-wrap .empty {
  min-height: 360px;
}

.docs-pages {
  display: grid;
  gap: 18px;
  width: 100%;
}

.docs-page {
  margin: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(18, 20, 26, 0.1);
  overflow: hidden;
}

.docs-page img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.docs-page figcaption {
  margin: 0;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted);
}

.btn.is-busy {
  pointer-events: none;
  opacity: 0.7;
}

#view-docs.is-hub,
#view-json.is-hub,
#view-image.is-hub,
#view-calc.is-hub,
#view-time.is-hub,
#view-home.is-hub,
#view-qr.is-hub {
  grid-template-columns: 1fr;
}

.qr-gen-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}

#qr-hub.hidden,
#qr-work-gen.hidden,
#qr-work-scan.hidden,
#qr-work-barcode.hidden,
.qr-gen-grid.hidden {
  display: none !important;
}

.scan-frame {
  position: relative;
  margin: 0 0 16px;
  overflow: hidden;
  border-radius: 16px;
  background: #111;
}

.scan-video,
.scan-still {
  display: block;
  width: 100%;
  height: min(70vh, 520px);
  object-fit: cover;
  background: #111;
}

.scan-still.hidden,
.scan-overlay.hidden {
  display: none !important;
}

.scan-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.scan-hit-box {
  position: absolute;
  border: 2px solid #ffffff;
  border-radius: 14px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.18), 0 8px 24px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.scan-hit-chip {
  position: absolute;
  pointer-events: auto;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(92%, 340px);
  padding: 11px 16px 11px 14px;
  border-radius: 999px;
  background: #ffffff;
  color: #12141a;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.scan-hit-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--accent);
}

.scan-hit-chip.is-link::after {
  content: "↗";
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.scan-hit-chip.is-link {
  cursor: pointer;
}

.scan-hit-chip.is-plain {
  color: #12141a;
}

.scan-hit-chip[hidden],
.scan-hit-box[hidden] {
  display: none !important;
}

.scan-file {
  display: inline-flex;
  cursor: pointer;
}

.barcode-frame {
  min-height: 160px;
  display: grid;
  place-items: center;
  padding: 20px;
}

.barcode-frame canvas {
  max-width: 100%;
  height: auto;
}

.checkbox-field input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 10px;
  accent-color: #1d4ed8;
}

.home-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-group-logo {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: cover;
}

.home-group:first-of-type {
  margin-top: 8px;
}

#view-home.wrap:not(.hidden),
#view-home.is-entering:not(.hidden) {
  animation: none;
}

#view-home h1,
#view-home .lede {
  animation: none;
}

#view-home .home-panel {
  position: relative;
  overflow: visible;
}

#view-home .home-panel > *:not(.home-aurora) {
  position: relative;
  z-index: 1;
}

#view-home .home-panel > .home-search {
  z-index: 12;
}

#view-home .home-search.is-open {
  z-index: 25;
}

.home-aurora {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
}

.home-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(52px);
  opacity: 0.32;
}

.home-orb-a {
  top: -70px;
  left: -50px;
  width: 280px;
  height: 280px;
  background: #2563eb;
  animation: home-orb-float 11s ease-in-out infinite;
}

.home-orb-b {
  top: 18%;
  right: -70px;
  width: 220px;
  height: 220px;
  background: #dc2626;
  animation: home-orb-float 13s 0.4s ease-in-out infinite reverse;
}

.home-orb-c {
  right: 28%;
  bottom: 8%;
  width: 190px;
  height: 190px;
  background: #7c3aed;
  animation: home-orb-float 15s 0.8s ease-in-out infinite;
}

@keyframes home-orb-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(28px, -18px) scale(1.12);
  }
}

#view-home:not(.hidden) .eyebrow {
  display: inline-block;
  animation: home-kicker 0.75s var(--ease) both;
}

#view-home .eyebrow::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, #1d4ed8, #dc2626);
}

#view-home:not(.hidden) .eyebrow::after {
  animation: home-rule 0.7s 0.28s var(--ease) both;
}

#view-home .home-line {
  display: block;
}

#view-home:not(.hidden) .home-line {
  animation: home-title 0.9s var(--ease) both;
}

#view-home:not(.hidden) .home-line:nth-child(2) {
  animation-delay: 0.12s;
}

#view-home .home-line-accent {
  background: linear-gradient(90deg, var(--ink) 0%, #1d4ed8 42%, #dc2626 62%, var(--ink) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#view-home:not(.hidden) .home-line-accent {
  animation:
    home-title 0.9s 0.12s var(--ease) both,
    home-shine 5s 1.1s linear infinite;
}

#view-home:not(.hidden) .lede {
  animation: home-fade-up 0.75s 0.2s var(--ease) both;
}

#view-home.is-revealing:not(.hidden) .home-group {
  animation: home-fade-up 0.45s calc(var(--reveal, 0) * 0.22s + 0.42s) var(--ease) both;
}

#view-home.is-revealing:not(.hidden) .pdf-card {
  animation: home-card 0.55s calc(var(--reveal, 0) * 0.22s + 0.42s) var(--ease) both;
}

#view-home.is-touring .pdf-card {
  opacity: 0.62;
  transition:
    opacity 0.35s ease,
    transform 0.35s var(--ease),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

#view-home.is-touring .pdf-card.is-spotlight {
  opacity: 1;
  z-index: 2;
  transform: translateY(-6px) scale(1.03);
  border-color: transparent;
  box-shadow: 0 18px 40px rgba(29, 78, 216, 0.18);
}

#view-home.is-touring .pdf-card.is-spotlight::after {
  transform: translateX(130%);
}

#view-home .pdf-card {
  position: relative;
  overflow: hidden;
}

#view-home .pdf-card::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.42), transparent 65%);
  transform: translateX(-130%);
  transition: transform 0.65s var(--ease);
}

#view-home .pdf-card:hover::after {
  transform: translateX(130%);
}

@keyframes home-kicker {
  from {
    opacity: 0;
    letter-spacing: 0.32em;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    letter-spacing: 0.14em;
    transform: none;
  }
}

@keyframes home-rule {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes home-title {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes home-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes home-card {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.94);
  }
  72% {
    opacity: 1;
    transform: translateY(-5px) scale(1.03);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes home-shine {
  to {
    background-position: 200% 50%;
  }
}

.pdf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.market-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.commodity-desk-block {
  margin-top: 18px;
}

.commodity-desk-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}

.commodity-desk-head .lede {
  margin-bottom: 0;
}

.commodity-desk-head h1 {
  margin-bottom: 6px;
}

.commodity-desk-head h1.market-desk-title {
  margin-bottom: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.commodity-search {
  position: relative;
  margin: 0 0 18px;
}

.commodity-desk-search {
  margin: 0 0 16px;
}

.commodity-search input[type="search"] {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.commodity-search input[type="search"]:focus {
  outline: 2px solid color-mix(in srgb, var(--accent, #1f6feb) 45%, transparent);
  outline-offset: 1px;
}

.commodity-search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(18, 20, 26, 0.12);
}

.commodity-search-hit {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.commodity-search-hit:hover,
.commodity-search-hit:focus {
  background: color-mix(in srgb, var(--accent, #1f6feb) 10%, #fff);
  outline: none;
}

.commodity-search-kind {
  flex: 0 0 auto;
  min-width: 72px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.commodity-search-hit strong {
  font-size: 14px;
  font-weight: 650;
}

.commodity-search-hit em {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-extra-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px;
}

.hub-extra-head .market-logo {
  width: 40px;
  height: 40px;
}

.hub-extra-head strong {
  font-size: 15px;
  line-height: 1.2;
}

.crypto-hub-extras {
  margin-top: 0;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pdf-grid.crypto-hub-extras {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crypto-hub-extras .pdf-card > span:not(.hub-extra-head) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

#stock-hub .stock-ticker-grid-3,
#crypto-hub .stock-ticker-grid-3,
#stock-hub .pdf-grid.crypto-hub-extras,
#crypto-hub .pdf-grid.crypto-hub-extras {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 12px;
}

#commodity-hub .stock-ticker-grid-4,
#commodity-hub .pdf-grid.crypto-hub-extras {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 12px;
}

#stock-hub .crypto-hub-extras .pdf-card,
#crypto-hub .crypto-hub-extras .pdf-card,
#commodity-hub .crypto-hub-extras .pdf-card,
#stock-hub .stock-ticker-grid .stock-ticker,
#crypto-hub .stock-ticker-grid .stock-ticker,
#commodity-hub .stock-ticker-grid .stock-ticker {
  min-width: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

#stock-hub .crypto-hub-extras,
#crypto-hub .crypto-hub-extras,
#commodity-hub .crypto-hub-extras {
  margin-top: 0;
  align-items: stretch;
}

.commodity-broker-actions {
  margin: 14px 0 18px;
  flex-wrap: wrap;
}

.commodity-broker-actions .btn {
  min-width: 148px;
}

.commodity-broker-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.commodity-broker-link img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex: 0 0 auto;
}

.market-col {
  min-height: 168px;
}

#view-home .market-cols {
  gap: 14px;
}

#view-home .market-col {
  min-height: 196px;
  padding: 22px 20px;
}

.market-col-head {
  display: grid;
  gap: 12px;
  margin: 0 0 8px;
}

.market-col-logos {
  display: flex;
  align-items: center;
}

.market-col-logos .market-logo {
  width: 38px;
  height: 38px;
  margin-left: -10px;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(18, 20, 26, 0.12);
}

.market-col-logos .market-logo:first-child {
  margin-left: 0;
}

.market-col-head strong {
  font-size: 18px;
  line-height: 1.2;
}

#view-home .market-col > span:not(.market-col-head) {
  font-size: 14px;
}

.trade-pulse {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.session-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.session-chip.is-open {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--ok);
}

.fng-box {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.fng-box strong {
  font-size: 14px;
}

.fng-box small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.fng-bar {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #efe8dc;
  overflow: hidden;
}

.fng-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #dc2626, #eab308, #16a34a);
}

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

.plan-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.plan-chip:hover {
  border-color: var(--ink);
}

.plan-chip.is-on {
  background: #12141a;
  color: #fff;
  border-color: transparent;
}

.bias-label {
  margin: 18px 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.bias-label:first-of-type {
  margin-top: 8px;
}

.desk-note {
  margin: 0 0 16px;
  max-width: 40em;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.desk-seg.is-live {
  pointer-events: none;
}

.nifty-desk .desk-body {
  padding-top: 8px;
}

.nifty-desk .desk-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.nifty-stamp {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.nifty-session {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ece7dc;
  color: #5c574e;
}

.nifty-session.is-open {
  background: #dcfce7;
  color: #166534;
}

.nifty-session.is-closed {
  background: #fee2e2;
  color: #991b1b;
}

.nifty-hero {
  margin: 0 0 18px;
  padding: 22px 20px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #f4f1ea;
}

.nifty-hero.is-buy {
  background: #ecf8f0;
  border-color: #86efac;
}

.nifty-hero.is-sell {
  background: #fef2f2;
  border-color: #fca5a5;
}

.nifty-hero.is-wait {
  background: #f4f1ea;
}

.nifty-hero.is-loading {
  position: relative;
  background: #f7f5f0;
  border-color: color-mix(in srgb, var(--accent, #1f6feb) 28%, var(--line));
}

.nifty-hero.is-loading .nifty-action {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #3f3a32;
  font-size: clamp(24px, 4vw, 34px);
}

.desk-loader {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  border: 2.5px solid color-mix(in srgb, var(--accent, #1f6feb) 25%, #d8d1c3);
  border-top-color: var(--accent, #1f6feb);
  border-radius: 50%;
  animation: desk-spin 0.7s linear infinite;
  flex: 0 0 auto;
}

@keyframes desk-spin {
  to {
    transform: rotate(360deg);
  }
}

.app-view-loader {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, #f6f1e8 72%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: all;
}

.app-view-loader[hidden] {
  display: none !important;
}

.app-view-loader-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line, #d8d1c3) 85%, transparent);
  background: color-mix(in srgb, #fffdf8 92%, transparent);
  box-shadow: 0 10px 30px color-mix(in srgb, #1a1a1a 12%, transparent);
  color: #3f3a32;
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.app-view-loader-card .desk-loader {
  width: 1.15em;
  height: 1.15em;
}

@media (prefers-reduced-motion: reduce) {
  .desk-loader {
    animation: none;
    border-top-color: color-mix(in srgb, var(--accent, #1f6feb) 55%, #d8d1c3);
    opacity: 0.85;
  }

  .app-view-loader {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.nifty-action {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #12141a;
  overflow-wrap: anywhere;
}

.nifty-hero.is-buy .nifty-action {
  color: #166534;
}

.nifty-hero.is-sell .nifty-action {
  color: #991b1b;
}

.nifty-since {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.nifty-gauge {
  margin: 0 0 20px;
}

.nifty-gauge-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.nifty-gauge-head strong {
  font-size: 16px;
  letter-spacing: 0;
  color: #12141a;
}

.nifty-gauge.is-buy .nifty-gauge-head strong {
  color: #166534;
}

.nifty-gauge.is-sell .nifty-gauge-head strong {
  color: #991b1b;
}

.nifty-gauge-scale {
  display: flex;
  justify-content: space-between;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.nifty-gauge-track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #991b1b 0%, #fca5a5 28%, #ece7dc 50%, #86efac 72%, #166534 100%);
}

.nifty-gauge-needle {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 4px;
  height: 24px;
  margin-left: -2px;
  border-radius: 999px;
  background: #12141a;
  box-shadow: 0 0 0 3px #fff;
  transition: left 0.35s ease;
}

.nifty-gauge-score {
  margin: 12px 0 0;
  font-size: 15px;
  font-weight: 600;
}

.nifty-advice {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: #3d3a34;
}

.nifty-inds {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 20px;
}

.nifty-ind {
  padding: 12px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.nifty-ind span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.nifty-ind strong {
  display: block;
  margin: 6px 0 2px;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.nifty-ind em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.nifty-ind.is-up {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.nifty-ind.is-up strong {
  color: #166534;
}

.nifty-ind.is-down {
  border-color: #fecaca;
  background: #fef2f2;
}

.nifty-ind.is-down strong {
  color: #991b1b;
}

.nifty-chart-label {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.nifty-chart {
  margin: 0 0 16px;
  min-height: 160px;
}

.nifty-chart svg {
  display: block;
  width: 100%;
  height: 200px;
}

.nifty-chart-strength svg {
  height: 140px;
}

.nifty-chart-empty {
  margin: 0;
  padding: 36px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.nifty-ticket {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.nifty-ticket-cell {
  padding: 12px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.nifty-ticket-cell span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.nifty-ticket-cell strong {
  display: block;
  margin: 6px 0 2px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.nifty-ticket-cell em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.nifty-ticket-cell.is-stop strong {
  color: #991b1b;
}

.nifty-ticket-cell.is-target strong {
  color: #166534;
}

@media (max-width: 800px) {
  .nifty-ticket,
  .nifty-inds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nifty-hero {
    padding: 16px 14px 14px;
  }

  .nifty-stamp,
  .nifty-since,
  .nifty-advice,
  .nifty-gauge-score {
    overflow-wrap: anywhere;
  }

  .nifty-ticket-cell,
  .nifty-ind {
    min-width: 0;
  }

  .nifty-ticket-cell strong,
  .nifty-ind strong {
    font-size: 15px;
    overflow-wrap: anywhere;
  }

  .nifty-desk .actions .btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .nifty-gauge-scale {
    font-size: 10px;
    gap: 2px;
  }

  .nifty-gauge-scale span[data-short] {
    font-size: 0;
    line-height: 0;
  }

  .nifty-gauge-scale span[data-short]::before {
    content: attr(data-short);
    font-size: 10px;
    line-height: 1.2;
  }

  .nifty-desk .desk-left {
    width: 100%;
    min-width: 0;
  }
}

.desk-board + .desk-board {
  margin-top: 16px;
}

.bias-result {
  margin: 0 0 20px;
  padding: 16px 16px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #faf7f1;
}

.bias-result .unit-result {
  margin: 0 0 10px;
}

.bias-votes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.bias-vote {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
}

.bias-vote.is-call,
.bias-vote.is-buy,
.bias-result.is-call,
.bias-result.is-buy {
  border-color: #bbf7d0;
}

.bias-vote.is-call,
.bias-vote.is-buy {
  background: #f0fdf4;
  color: #166534;
}

.bias-vote.is-put,
.bias-vote.is-sell,
.bias-result.is-put,
.bias-result.is-sell {
  border-color: #fecaca;
}

.bias-vote.is-put,
.bias-vote.is-sell {
  background: #fef2f2;
  color: #991b1b;
}

.bias-vote.is-abstain {
  color: var(--muted);
}

.tool-desk .lede,
.chart-desk .lede {
  max-width: 36em;
  margin-bottom: 22px;
}

.desk-board,
.chart-board {
  margin: 4px 0 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 40px rgba(18, 20, 26, 0.05);
}

.desk-bar,
.chart-board-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
  padding: 14px 16px;
  background: #faf7f1;
  border-bottom: 1px solid var(--line);
}

.desk-bar-end {
  align-items: center;
}

.chart-board-left,
.desk-left {
  min-width: 0;
}

.chart-board-kicker,
.desk-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.tool-desk .desk-seg,
.chart-desk .chart-seg,
.tool-desk .desk-seg.mode-switch {
  width: auto;
  margin-bottom: 0;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.tool-desk .desk-seg .type,
.tool-desk .desk-seg .mode,
.chart-desk .chart-seg .type {
  margin: 0;
  border: 0;
  border-radius: 9px;
  padding: 8px 14px;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.tool-desk .desk-seg .type:hover,
.tool-desk .desk-seg .mode:hover,
.chart-desk .chart-seg .type:hover {
  background: rgba(18, 20, 26, 0.05);
  transform: none;
}

.tool-desk .desk-seg .type.is-on,
.tool-desk .desk-seg .mode.is-on,
.chart-desk .chart-seg .type.is-on {
  background: #12141a;
  color: #fff;
  border-color: transparent;
}

.tool-desk .desk-seg.mode-switch {
  width: auto;
  margin: 0;
  border-radius: 12px;
}

.desk-actions,
.chart-board-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
}

.chart-board-symbol,
.chart-board-symbol-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-right: 4px;
}

.desk-actions .btn,
.chart-board-actions .btn {
  width: auto;
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
}

.desk-body {
  padding: 16px;
}

.desk-body > .desk-seg,
.desk-body > .mode-switch {
  margin-bottom: 14px;
}

.desk-body > .pdf-grid,
.desk-body > .market-cols {
  margin: 0;
}

#view-home:not(.hidden) h1 {
  animation: home-title 0.9s var(--ease) both;
}

#view-home h1 .home-title-sub {
  display: block;
  margin-top: 6px;
  font-family: var(--font-sans, "Sora", sans-serif);
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--muted, #64748b);
}

#view-home .home-popular {
  margin: 0 0 18px;
  max-width: 52rem;
  line-height: 1.6;
}

#view-home .home-popular a {
  font-weight: 500;
}

.desk-body.is-flush {
  padding: 0;
}

.desk-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.desk-tools .field {
  margin: 0;
  min-width: min(220px, 100%);
  flex: 1 1 180px;
}

.desk-tools .desk-seg {
  flex: 1 1 auto;
}

.tool-desk .trade-pulse {
  margin: 0;
}

.tool-desk .fng-box {
  margin: 0 0 16px;
  box-shadow: none;
}

.tool-desk .pdf-card {
  border-top-width: 1px;
  min-height: 118px;
}

.tool-desk .pdf-card:hover {
  border-color: var(--ink);
  box-shadow: 0 16px 32px rgba(18, 20, 26, 0.07);
}

.desk-body .stock-news-list,
.desk-body .stock-guide-list,
.desk-body .stock-ticker-grid,
.desk-body .mover-cols {
  margin: 0;
}

.desk-body .stock-news-card,
.desk-body .stock-guide {
  border-radius: 12px;
}

.desk-body .unit-result {
  margin-top: 8px;
}

.desk-body .kv {
  margin-bottom: 0;
}

.desk-body .actions {
  margin-top: 4px;
}

.chart-desk .tv-wrap,
.tool-desk .tv-wrap {
  height: 620px;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.tool-desk .hint:empty,
.chart-desk .hint:empty {
  display: none;
}

.tv-stage {
  position: relative;
}

.tv-fullbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #12141a;
  color: #fff;
}

.tv-fullbar strong {
  font-size: 13px;
  letter-spacing: 0.02em;
}

.tv-fullbar .btn {
  width: auto;
  flex: 0 0 auto;
  background: #fff;
  color: #12141a;
}

.tv-stage:fullscreen,
.tv-stage:-webkit-full-screen,
.tv-stage.is-max {
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.tv-stage.is-max {
  position: fixed;
  inset: 0;
  z-index: 80;
}

body.tv-max-open {
  overflow: hidden;
}

.tv-stage:fullscreen .tv-fullbar,
.tv-stage:-webkit-full-screen .tv-fullbar,
.tv-stage.is-max .tv-fullbar {
  display: flex;
}

.tv-stage:fullscreen .tv-wrap,
.tv-stage:-webkit-full-screen .tv-wrap,
.tv-stage.is-max .tv-wrap {
  flex: 1;
  height: auto;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.tv-wrap {
  width: 100%;
  height: 560px;
  margin: 16px 0 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.tv-host,
.tv-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.tv-direct {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 420px;
  padding: 36px 32px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, #faf7f1 0%, #fff 42%);
}

.tv-direct:hover {
  color: inherit;
}

.tv-direct-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.tv-direct strong {
  font-size: 28px;
  letter-spacing: -0.03em;
}

.tv-direct p {
  margin: 0;
  max-width: 28em;
  color: var(--muted);
}

.tv-direct .btn {
  width: auto;
  margin-top: 6px;
  pointer-events: none;
}

.tv-stage:fullscreen .tv-host,
.tv-stage:-webkit-full-screen .tv-host,
.tv-stage.is-max .tv-host {
  height: 100%;
}

.stock-ticker.is-link {
  cursor: pointer;
}

.stock-ticker-open {
  font-size: 12px;
  color: var(--accent);
}

.stock-ticker.is-link:hover {
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(18, 20, 26, 0.07);
}

.mover-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0 8px;
}

.mover-cols h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

.mover-row {
  display: grid;
  gap: 8px;
  width: 100%;
  margin: 0 0 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-align: left;
}

.mover-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(18, 20, 26, 0.07);
}

.mover-main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mover-left,
.mover-right {
  display: grid;
  gap: 2px;
}

.mover-row-groww .mover-left {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.mover-titles {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.mover-right {
  text-align: right;
  justify-items: end;
}

.mover-row strong,
.mover-symbol {
  font-size: 14px;
}

.mover-name,
.mover-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.mover-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f4f6;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.mover-left > .market-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex: 0 0 auto;
}

.mover-logo img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  display: block;
}

.mover-logo-fallback {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00b386, #1d4ed8);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mover-groww {
  justify-self: start;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7fffb;
  color: #0f766e;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

.mover-groww:hover {
  border-color: #00b386;
  color: #065f46;
}

.mover-groww img {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.mover-exchange-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mover-shark {
  background: #f8fafc;
  color: #334155;
}

.mover-shark:hover {
  border-color: #64748b;
  color: #0f172a;
}

.mover-row .is-up {
  color: var(--ok);
}

.mover-row .is-down {
  color: var(--accent-hot);
}

.session-closed {
  margin: 4px 0 12px;
  padding: 12px 14px;
  border: 1px solid #f5d0c5;
  border-radius: 14px;
  background: #fff7f4;
  color: #9a3412;
  font-size: 14px;
  line-height: 1.45;
}

.pdf-card {
  display: grid;
  gap: 8px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  min-height: 128px;
  transition: transform 0.18s var(--ease), box-shadow 0.18s ease, border-color 0.18s ease;
}

.pdf-card:hover {
  transform: translateY(-2px);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(18, 20, 26, 0.08);
}

.pdf-card strong {
  font-size: 15px;
}

.pdf-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.pdf-card .hub-extra-head {
  color: var(--ink);
}

.pdf-card .hub-extra-head strong {
  color: var(--ink);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-title-logo {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 10px;
  object-fit: cover;
}

.pdf-card-organize {
  border-top: 3px solid #2563eb;
}

.pdf-card-optimize {
  border-top: 3px solid #16a34a;
}

.pdf-card-convert {
  border-top: 3px solid #ea580c;
}

.pdf-card-edit {
  border-top: 3px solid #7c3aed;
}

.pdf-card-security {
  border-top: 3px solid #dc2626;
}

.pdf-card-cut {
  border-top: 3px solid #0d9488;
}

.pdf-back {
  margin-bottom: 12px;
}

.pdf-file-list {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.pdf-file {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
}

.pdf-file span {
  color: var(--muted);
}

.pdf-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.pdf-thumb {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.pdf-thumb img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.pdf-thumb span,
.pdf-thumb-tools {
  font-size: 12px;
}

.pdf-thumb-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pdf-thumb-tools button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.pdf-sign {
  width: 100%;
  max-width: 420px;
  height: 140px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fff;
  touch-action: none;
}

.docs-text {
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  background: #fff;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.pdf-form-fields {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

input[type="range"] {
  padding: 0;
  height: 28px;
  accent-color: var(--accent);
}

.field em {
  font-style: normal;
  color: var(--ink);
  font-weight: 600;
}

.field.is-disabled {
  opacity: 0.5;
}

.lock-btn {
  width: 100%;
  min-height: 48px;
  justify-content: center;
}

.lock-btn.is-on {
  border-color: #93c5fd;
  background: #eff6ff;
  color: var(--accent);
}

.img-compare {
  display: grid;
  gap: 18px;
  width: 100%;
}

.img-compare .docs-page img {
  max-height: 52vh;
  object-fit: contain;
  background:
    linear-gradient(45deg, #eee 25%, transparent 25%),
    linear-gradient(-45deg, #eee 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eee 75%),
    linear-gradient(-45deg, transparent 75%, #eee 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

#image-unit-note,
#image-bg-note,
#image-convert-note {
  margin: -4px 0 16px;
}

.docs-preview-wrap:has(.img-compare:not(.hidden)) {
  display: block;
  overflow: auto;
  max-height: 70vh;
  padding: 18px;
}

button,
a,
.nav-link,
.pdf-card,
.drop,
.btn,
.type,
.mode {
  touch-action: manipulation;
}

@media (max-width: 980px) {
  .top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    overflow: visible;
  }

  .brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    z-index: 3;
  }

  .mark {
    font-size: clamp(20px, 5.2vw, 24px);
    font-weight: 400;
    color: var(--ink);
    white-space: nowrap;
  }

  .mark-d {
    background: linear-gradient(90deg, #2563eb, #7c3aed, #dc2626, #2563eb);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: brand-shift 4s linear infinite;
  }

  .top-actions,
  .nav-toggle {
    display: none !important;
  }

  .nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    width: auto;
    min-width: 0;
    max-height: none;
    overflow: visible;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .nav-link,
  header .nav a.nav-link {
    width: auto;
    min-width: 0;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    flex: 0 0 auto;
  }

  .nav-primary-wide {
    display: none !important;
  }

  .nav-more-image {
    display: flex !important;
  }

  .nav-more {
    width: auto;
    margin: 0;
  }

  .nav-more-btn {
    width: auto;
    justify-content: center;
  }

  .nav-more-list {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    display: none;
    min-width: min(220px, calc(100vw - 24px));
    width: max-content;
    max-height: min(70vh, 480px);
    overflow: auto;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    box-shadow: 0 16px 40px rgba(18, 20, 26, 0.12);
    -webkit-overflow-scrolling: touch;
  }

  .nav-more.is-open .nav-more-list {
    display: flex;
  }

  .nav-more-list .nav-link {
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 10px;
  }
}

@media (max-width: 640px) {
  .nav-primary[data-view="commodity"],
  .nav-primary[data-view="docs"] {
    display: none !important;
  }

  .nav-more-commodity,
  .nav-more-docs {
    display: flex !important;
  }
}

@media (max-width: 860px) {
  :root {
    --page: min(1100px, calc(100% - 20px));
  }

  body::before,
  body::after,
  .grain {
    display: none;
  }

  #view-home .home-orb {
    filter: blur(36px);
    opacity: 0.2;
  }

  .top {
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 30;
    margin-top: max(8px, env(safe-area-inset-top));
    padding: 10px 12px;
    border-radius: 16px;
    backdrop-filter: none;
    animation: none;
    box-shadow: 0 8px 20px rgba(18, 20, 26, 0.06);
  }

  .mark {
    font-size: clamp(22px, 6vw, 26px);
  }

  .wrap {
    gap: 16px;
    padding: 16px 0 32px;
  }

  .wrap,
  .row,
  .row-2,
  .converter,
  .b64-head,
  .qr-gen-grid {
    grid-template-columns: 1fr;
  }

  .b64-head {
    display: grid;
  }

  .converter-mid {
    padding-top: 0;
  }

  .flip {
    transform: rotate(90deg);
  }

  .wrap,
  .panel,
  .stage {
    min-width: 0;
    max-width: 100%;
  }

  .panel,
  .stage {
    padding: 20px 16px;
    border-radius: 18px;
    animation: none;
    background-size: 100% 100%, 100% 100%;
  }

  h1 {
    font-size: clamp(26px, 8vw, 40px);
    margin-bottom: 16px;
  }

  .lede,
  .subhead {
    margin: -8px 0 18px;
    font-size: 14px;
  }

  .mode-switch {
    width: 100%;
    max-width: 100%;
    flex-shrink: 1;
    min-width: 0;
  }

  #pdf-cats {
    flex-wrap: wrap;
    border-radius: 16px;
    overflow: visible;
  }

  .mode {
    min-height: 40px;
    padding: 8px 12px;
    flex: 1 1 auto;
  }

  .type {
    min-height: 40px;
    flex: 1 1 calc(33.33% - 8px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .chart-board-bar,
  .desk-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .chart-desk .chart-seg,
  .tool-desk .desk-seg {
    display: flex;
    width: 100%;
  }

  .chart-desk .chart-seg .type,
  .tool-desk .desk-seg .type,
  .tool-desk .desk-seg .mode {
    flex: 1 1 0;
    min-height: 38px;
    padding: 8px 10px;
  }

  .chart-board-actions,
  .desk-actions {
    justify-content: stretch;
  }

  .chart-board-symbol {
    width: 100%;
    flex: 1 1 100%;
  }

  .chart-board-actions .btn,
  .desk-actions .btn {
    flex: 1 1 calc(50% - 8px);
    min-height: 40px;
  }

  .chart-desk .tv-wrap,
  .tool-desk .tv-wrap {
    height: 460px;
  }

  .desk-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .desk-body .pdf-grid {
    margin: 0;
  }

  input,
  select,
  textarea {
    font-size: 16px;
    padding: 12px;
  }

  textarea {
    min-height: 160px;
    font-size: 16px;
  }

  #view-base64 .b64-field textarea {
    height: 160px;
    min-height: 160px;
    max-height: 160px;
  }

  #jwt-header,
  #jwt-payload,
  #jwt-input {
    min-height: 0;
  }

  .actions {
    gap: 8px;
  }

  .actions .btn {
    min-height: 44px;
    flex: 1 1 calc(50% - 8px);
  }

  .btn.primary,
  .nav-link.is-on,
  .type.is-on,
  .mode.is-on {
    animation: none;
  }

  .mark-d {
    background: linear-gradient(90deg, #2563eb, #7c3aed, #dc2626, #2563eb);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: brand-shift 4s linear infinite;
  }

  .frame {
    min-height: 240px;
    padding: 16px;
  }

  .empty span {
    font-size: 22px;
  }

  .jtree {
    min-height: 240px;
    max-height: 60vh;
    padding: 12px;
  }

  .jtree .empty,
  .docs-preview-wrap .empty {
    min-height: 200px;
  }

  .docs-preview-wrap {
    min-height: 240px;
  }

  .pdf-grid {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .pdf-card {
    min-height: 0;
    min-width: 0;
    padding: 14px;
    width: 100%;
  }

  .pdf-card span {
    overflow-wrap: anywhere;
  }

  .img-compare .docs-page img {
    max-height: 36vh;
  }

  .pdf-file {
    flex-wrap: wrap;
  }

  .help-overlay {
    padding: 12px;
    align-items: end;
  }

  .help-modal {
    max-height: min(92dvh, 720px);
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    border-radius: 20px;
  }

  .help-modal h2 {
    font-size: 26px;
  }

  .kv-row {
    grid-template-columns: 72px 1fr;
  }

  footer {
    margin-bottom: calc(20px + env(safe-area-inset-bottom));
  }

  .foot-copy {
    line-height: 1.7;
    padding-left: 4px;
    padding-right: 4px;
  }

  .foot-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .seo-page {
    padding-top: 16px;
  }

  .seo-cta .btn {
    width: 100%;
    min-height: 44px;
  }

  .drop {
    min-height: 132px;
    padding: 16px;
  }

  .drop-title {
    font-size: 20px;
  }

  .calc-table {
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  :root {
    --page: min(1100px, calc(100% - 16px));
  }

  .panel,
  .stage {
    padding: 16px 14px;
  }

  .actions .btn {
    flex: 1 1 100%;
  }

  .row {
    grid-template-columns: 1fr 1fr;
  }

  .row .field:last-child {
    grid-column: 1 / -1;
  }

  .regex-row .field:last-child {
    grid-column: auto;
  }
}

@media (hover: none) {
  .nav-link:hover,
  .type:hover,
  .btn.primary:hover,
  .btn.ghost:hover,
  .pdf-card:hover,
  .panel:hover,
  .stage:hover {
    transform: none;
    box-shadow: none;
    filter: none;
  }

  .pdf-card:hover {
    border-color: var(--line);
  }
}

.seo-page {
  padding-top: 28px;
}

.seo-page h2 {
  margin: 28px 0 10px;
  font-size: 22px;
}

.seo-page h3 {
  margin: 18px 0 8px;
  font-size: 16px;
}

.seo-page p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

.seo-page ul,
.seo-page ol {
  margin: 0 0 12px;
  padding-left: 1.2em;
  color: var(--muted);
  line-height: 1.6;
}

.seo-page li {
  margin: 0 0 6px;
}

.seo-page .legal-updated {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.seo-cta {
  margin: 18px 0 8px;
}

.seo-grid {
  margin: 8px 0 24px;
}

header .nav a.nav-link {
  text-decoration: none;
}

#view-invoice .inv-block {
  margin: 0 0 18px;
  padding-top: 4px;
}

#view-invoice .inv-block h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

#view-invoice textarea {
  min-height: 76px;
  font-family: inherit;
  font-size: 14px;
}

#view-invoice .row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

#view-invoice .row-4 {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 12px;
}

.inv-table-wrap {
  overflow-x: auto;
  margin-bottom: 10px;
}

.inv-table {
  width: 100%;
  border-collapse: collapse;
}

.inv-table th,
.inv-table td {
  padding: 4px 6px 8px 0;
  text-align: left;
  vertical-align: middle;
}

.inv-table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.inv-table .inv-amt {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.inv-table .inv-desc {
  min-width: 160px;
}

.inv-table .inv-qty,
.inv-table .inv-rate {
  width: 88px;
}

.inv-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.inv-check input {
  width: auto;
  margin: 0;
}

.inv-logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.inv-logo-row img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

#view-invoice .stage {
  position: sticky;
  top: 88px;
  align-self: start;
}

.inv-paper {
  --inv-accent: #1d4ed8;
  min-height: 420px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(18, 20, 26, 0.05);
}

.inv-paper-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-top: 8px;
  border-top: 6px solid var(--inv-accent);
}

.inv-paper-top img {
  max-width: 120px;
  max-height: 48px;
  object-fit: contain;
}

.inv-paper-title {
  text-align: right;
}

.inv-paper-title strong {
  display: block;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  color: var(--inv-accent);
  line-height: 1;
}

.inv-paper-title span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.inv-stamp {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.inv-stamp-paid {
  color: var(--ok);
}

.inv-stamp-overdue {
  color: var(--accent-hot);
}

.inv-stamp-draft {
  color: var(--muted);
}

.inv-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.inv-cols h3,
.inv-meta p,
.inv-notes h3 {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.inv-cols strong {
  display: block;
  margin-bottom: 4px;
}

.inv-cols p,
.inv-notes p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}

.inv-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.inv-meta span {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
}

.inv-pv-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
  font-size: 12px;
}

.inv-pv-table th {
  padding: 7px 8px;
  background: var(--inv-accent);
  color: #fff;
  font-weight: 600;
  text-align: left;
}

.inv-pv-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.inv-pv-table .num,
.inv-pv-table th:not(:first-child) {
  text-align: right;
  white-space: nowrap;
}

.inv-empty-row {
  text-align: center;
  color: var(--muted);
}

.inv-totals {
  width: min(240px, 100%);
  margin-left: auto;
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.inv-totals div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.inv-totals .inv-grand {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

.inv-notes {
  margin-top: 16px;
}

@media (max-width: 900px) {
  #view-invoice .stage {
    position: static;
  }

  #view-invoice .row-4,
  #view-invoice .row-2,
  .inv-cols,
  .inv-meta {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  #view-invoice .row-4,
  #view-invoice .row-2,
  .inv-cols,
  .inv-meta {
    grid-template-columns: 1fr;
  }
}

.stock-news-list,
.stock-guide-list {
  display: grid;
  gap: 12px;
  margin: 16px 0 8px;
}

.stock-news-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.stock-news-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(18, 20, 26, 0.07);
}

.stock-news-card img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  background: #efe8dc;
}

.stock-news-card:not(:has(img)) {
  grid-template-columns: 1fr;
}

.stock-news-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.stock-news-card p,
.stock-news-card span {
  display: block;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.stock-news-empty {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.stock-guide {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  --ind-t: 10s;
}

.stock-guide-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin: 0 0 8px;
}

.stock-guide h3 {
  margin: 0;
  font-size: 15px;
}

.stock-guide p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.stock-guide-range {
  margin: 0 !important;
  color: var(--muted);
  font-size: 12px !important;
}

.ind-viz {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #f4efe6;
}

.ind-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.ind-steps li {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 0;
  padding: 7px 8px;
  border-radius: 10px;
  background: #f7f3ec;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
  opacity: 0.4;
}

.ind-steps em {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #12141a;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.ind-steps li:nth-child(1) { animation: ind-step-a var(--ind-t) ease-in-out infinite; }
.ind-steps li:nth-child(2) { animation: ind-step-b var(--ind-t) ease-in-out infinite; }
.ind-steps li:nth-child(3) { animation: ind-step-c var(--ind-t) ease-in-out infinite; }

.ind-call-a { animation: ind-call-a var(--ind-t) ease-in-out infinite; }
.ind-call-b { animation: ind-call-b var(--ind-t) ease-in-out infinite; }
.ind-call-c { animation: ind-call-c var(--ind-t) ease-in-out infinite; }

.ind-svg {
  display: block;
  width: 100%;
  height: auto;
}

.ind-caption {
  color: var(--ink) !important;
  font-size: 14px !important;
  font-style: italic;
}

.ind-bg {
  fill: #f4efe6;
}

.ind-grid,
.ind-axis,
.ind-zero,
.ind-session,
.ind-fib {
  fill: none;
  stroke: #e4dccf;
  stroke-width: 1;
}

.ind-label {
  fill: var(--muted);
  font-size: 10px;
  font-family: Sora, sans-serif;
}

.ind-label-hot { fill: var(--accent-hot); }
.ind-label-ok { fill: var(--ok); }
.ind-label-sma { fill: #c2410c; }
.ind-label-ema { fill: #1d4ed8; }

.ind-price {
  fill: none;
  stroke: #111827;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ind-sma {
  fill: none;
  stroke: #c2410c;
  stroke-width: 2;
  stroke-linecap: round;
}

.ind-ema,
.ind-rsi {
  fill: none;
  stroke: #1d4ed8;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ind-band {
  fill: none;
  stroke: #7c3aed;
  stroke-width: 1.4;
}

.ind-band-fill {
  fill: rgba(124, 58, 237, 0.12);
  stroke: none;
}

.ind-dot {
  fill: #111827;
}

.ind-ring {
  fill: none;
  stroke: #111827;
  stroke-width: 1.2;
  opacity: 0.35;
  animation: ind-ring 2.8s ease-out infinite;
}

.ind-playhead {
  fill: #1d4ed8;
  opacity: 0.55;
  animation: ind-scan var(--ind-t) ease-in-out infinite;
}

.ind-pocket {
  fill: rgba(194, 65, 12, 0.1);
  animation: ind-pocket var(--ind-t) ease-in-out infinite;
}

.ind-zone-hot { fill: rgba(220, 38, 38, 0.1); }
.ind-zone-ok { fill: rgba(31, 122, 58, 0.1); }
.ind-zone-pulse-hot { animation: ind-zone-hot var(--ind-t) ease-in-out infinite; }
.ind-zone-pulse-ok { animation: ind-zone-ok var(--ind-t) ease-in-out infinite; }

.ind-hist rect {
  fill: #1f7a3a;
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: ind-bar var(--ind-t) ease-in-out infinite;
}

.ind-hist rect.is-down {
  fill: #dc2626;
  transform-origin: center top;
}

.ind-hist rect:nth-child(1) { animation-delay: 0s; }
.ind-hist rect:nth-child(2) { animation-delay: 0.08s; }
.ind-hist rect:nth-child(3) { animation-delay: 0.16s; }
.ind-hist rect:nth-child(4) { animation-delay: 0.24s; }
.ind-hist rect:nth-child(5) { animation-delay: 0.32s; }
.ind-hist rect:nth-child(6) { animation-delay: 0.4s; }
.ind-hist rect:nth-child(7) { animation-delay: 0.48s; }
.ind-hist rect:nth-child(8) { animation-delay: 0.56s; }
.ind-hist rect:nth-child(9) { animation-delay: 0.64s; }
.ind-hist rect:nth-child(10) { animation-delay: 0.72s; }
.ind-hist rect:nth-child(11) { animation-delay: 0.8s; }
.ind-hist rect:nth-child(12) { animation-delay: 0.88s; }
.ind-hist rect:nth-child(13) { animation-delay: 0.96s; }
.ind-hist rect:nth-child(14) { animation-delay: 1.04s; }

.ind-vol-bars rect {
  fill: #c4b8a4;
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: ind-bar var(--ind-t) ease-in-out infinite;
}

.ind-vol-bars rect:nth-child(odd) { animation-delay: 0.12s; }
.ind-vol-bars rect:nth-child(even) { animation-delay: 0.28s; }

.ind-vol-bars rect.is-boom {
  fill: #1f7a3a;
  animation: ind-boom var(--ind-t) ease-in-out infinite;
}

.ind-vol-bars rect.is-thin {
  fill: #e8b4b4;
}

.ind-candles g {
  stroke: #111827;
  fill: #1f7a3a;
  opacity: 0;
  animation: ind-candle-in var(--ind-t) ease-in-out infinite;
}

.ind-candles .c1 { animation-delay: 0.1s; }
.ind-candles .c2 { animation-delay: 0.35s; }
.ind-candles .c3 { animation-delay: 0.6s; }
.ind-candles .c4 { animation-delay: 0.85s; }
.ind-candles .c5 { animation-delay: 1.1s; }
.ind-candles .c6 { animation-delay: 1.35s; }
.ind-candles .c7 { animation-delay: 1.6s; }

.ind-candles g.is-wide {
  fill: #dc2626;
}

.ind-super-up {
  fill: none;
  stroke: #1f7a3a;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: ind-draw var(--ind-t) ease forwards infinite;
}

.ind-super-down {
  fill: none;
  stroke: #dc2626;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: ind-draw var(--ind-t) 1.8s ease forwards infinite;
}

.ind-pullback {
  fill: none;
  stroke: #1d4ed8;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: ind-draw var(--ind-t) 1.4s ease forwards infinite;
}

.ind-fib-hot {
  stroke: #c2410c;
  stroke-dasharray: 4 4;
  animation: ind-pulse-line 2.4s ease-in-out infinite;
}

.ind-badge-hot rect,
.ind-badge-ok rect {
  fill: #dc2626;
}

.ind-badge-ok rect { fill: #1f7a3a; }

.ind-badge-hot text,
.ind-badge-ok text {
  fill: #fff;
  font-size: 10px;
  font-family: Sora, sans-serif;
  text-anchor: middle;
}

.ind-badge-hot,
.ind-badge-ok {
  opacity: 0;
  animation: ind-badge var(--ind-t) ease-in-out infinite;
}

.ind-badge-early { animation-delay: 0.3s; }
.ind-badge-mid { animation-delay: 1.2s; }

.ind-flash,
.ind-flash-late {
  fill: #eab308;
  opacity: 0;
  animation: ind-flash var(--ind-t) ease-in-out infinite;
}

.ind-flash-late { animation-delay: 2.2s; }

.ind-draw {
  stroke-dasharray: 560;
  stroke-dashoffset: 560;
  animation: ind-draw var(--ind-t) ease forwards infinite;
}

.ind-draw-mid {
  stroke-dasharray: 560;
  stroke-dashoffset: 560;
  animation: ind-draw var(--ind-t) 0.5s ease forwards infinite;
}

.ind-draw-late {
  stroke-dasharray: 560;
  stroke-dashoffset: 560;
  animation: ind-draw var(--ind-t) 1s ease forwards infinite;
}

.ind-squeeze,
.ind-squeeze-line {
  transform-origin: 180px 46px;
  animation: ind-squeeze var(--ind-t) ease-in-out infinite;
}

.ind-dot-sma,
.ind-ring.ind-dot-sma,
.ind-dot-ema,
.ind-dot-rsi,
.ind-ring.ind-dot-rsi,
.ind-dot-bb,
.ind-dot-vwap,
.ind-dot-fib,
.ind-ring.ind-dot-fib,
.ind-dot-super {
  offset-rotate: 0deg;
}

.ind-dot-sma,
.ind-ring.ind-dot-sma {
  offset-path: path("M16 60 C40 22 56 72 76 48 S112 20 132 46 S164 74 188 40 S220 22 248 54 S280 70 344 46");
  animation: ind-travel var(--ind-t) ease-in-out infinite;
}

.ind-dot-ema {
  offset-path: path("M16 58 C48 36 80 54 110 44 S170 30 210 40 S270 36 344 40");
  animation: ind-travel var(--ind-t) 0.4s ease-in-out infinite;
}

.ind-dot-rsi,
.ind-ring.ind-dot-rsi {
  offset-path: path("M16 70 C40 72 56 68 78 50 S110 16 150 20 S190 42 220 58 S270 72 344 36");
  animation: ind-travel var(--ind-t) ease-in-out infinite;
}

.ind-dot-bb {
  offset-path: path("M16 54 C48 50 80 56 110 52 S160 38 200 22 S250 38 344 48");
  animation: ind-travel var(--ind-t) ease-in-out infinite;
}

.ind-dot-vwap {
  offset-path: path("M16 60 C48 38 80 32 110 42 S160 28 200 32 S260 38 344 34");
  animation: ind-travel var(--ind-t) ease-in-out infinite;
}

.ind-dot-fib,
.ind-ring.ind-dot-fib {
  offset-path: path("M20 76 L140 16 C180 22 210 50 240 56");
  animation: ind-travel var(--ind-t) ease-in-out infinite;
}

.ind-dot-super {
  offset-path: path("M16 52 C48 38 80 32 120 40 S180 56 230 66 S290 72 344 68");
  animation: ind-travel var(--ind-t) ease-in-out infinite;
}

@keyframes ind-draw {
  0% { stroke-dashoffset: 560; }
  28%, 86% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 560; }
}

@keyframes ind-travel {
  0%, 4% { offset-distance: 0%; }
  78%, 88% { offset-distance: 100%; }
  100% { offset-distance: 0%; }
}

@keyframes ind-scan {
  0%, 4% { transform: translateX(0); opacity: 0; }
  10% { opacity: 0.5; }
  82% { transform: translateX(328px); opacity: 0.4; }
  90%, 100% { transform: translateX(328px); opacity: 0; }
}

@keyframes ind-step-a {
  0%, 4% { opacity: 0.38; }
  8%, 30% { opacity: 1; background: #efe7d6; }
  36%, 100% { opacity: 0.38; }
}

@keyframes ind-step-b {
  0%, 30% { opacity: 0.38; }
  36%, 60% { opacity: 1; background: #efe7d6; }
  66%, 100% { opacity: 0.38; }
}

@keyframes ind-step-c {
  0%, 60% { opacity: 0.38; }
  66%, 90% { opacity: 1; background: #efe7d6; }
  96%, 100% { opacity: 0.38; }
}

@keyframes ind-call-a {
  0%, 6% { opacity: 0.25; }
  10%, 32% { opacity: 1; }
  40%, 100% { opacity: 0.45; }
}

@keyframes ind-call-b {
  0%, 32% { opacity: 0.25; }
  38%, 62% { opacity: 1; }
  70%, 100% { opacity: 0.45; }
}

@keyframes ind-call-c {
  0%, 62% { opacity: 0.25; }
  68%, 90% { opacity: 1; }
  96%, 100% { opacity: 0.45; }
}

@keyframes ind-ring {
  0% { opacity: 0.4; transform: scale(0.7); }
  100% { opacity: 0; transform: scale(1.8); }
}

@keyframes ind-bar {
  0%, 12% { transform: scaleY(0.2); }
  45%, 70% { transform: scaleY(1); }
  100% { transform: scaleY(0.2); }
}

@keyframes ind-boom {
  0%, 40% { transform: scaleY(0.35); }
  58%, 78% { transform: scaleY(1.15); }
  100% { transform: scaleY(0.35); }
}

@keyframes ind-candle-in {
  0%, 8% { opacity: 0; }
  18%, 78% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes ind-squeeze {
  0%, 18% { transform: scaleY(0.48); }
  55% { transform: scaleY(1.18); }
  100% { transform: scaleY(0.48); }
}

@keyframes ind-flash {
  0%, 36%, 100% { opacity: 0; transform: scale(0.3); }
  46%, 58% { opacity: 1; transform: scale(1); }
}

@keyframes ind-badge {
  0%, 38%, 100% { opacity: 0; transform: translateY(4px); }
  48%, 76% { opacity: 1; transform: translateY(0); }
}

@keyframes ind-pulse-line {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes ind-pocket {
  0%, 35% { opacity: 0; }
  50%, 78% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes ind-zone-hot {
  0%, 32%, 78%, 100% { opacity: 0.3; }
  50%, 68% { opacity: 1; }
}

@keyframes ind-zone-ok {
  0%, 8% { opacity: 1; }
  24%, 100% { opacity: 0.3; }
}

#view-stock:not(.hidden) .pdf-card,
#view-crypto:not(.hidden) .pdf-card {
  animation: stock-rise 0.55s var(--ease) both;
}

#view-stock:not(.hidden) .pdf-card:nth-child(1) { animation-delay: 0.04s; }
#view-stock:not(.hidden) .pdf-card:nth-child(2) { animation-delay: 0.1s; }
#view-stock:not(.hidden) .pdf-card:nth-child(3) { animation-delay: 0.16s; }
#view-stock:not(.hidden) .pdf-card:nth-child(4) { animation-delay: 0.22s; }
#view-stock:not(.hidden) .pdf-card:nth-child(5) { animation-delay: 0.28s; }
#view-crypto:not(.hidden) .pdf-card:nth-child(1) { animation-delay: 0.04s; }
#view-crypto:not(.hidden) .pdf-card:nth-child(2) { animation-delay: 0.1s; }
#view-crypto:not(.hidden) .pdf-card:nth-child(3) { animation-delay: 0.16s; }
#view-crypto:not(.hidden) .pdf-card:nth-child(4) { animation-delay: 0.22s; }
#view-crypto:not(.hidden) .pdf-card:nth-child(5) { animation-delay: 0.28s; }
#view-crypto:not(.hidden) .pdf-card:nth-child(6) { animation-delay: 0.34s; }

.session-chip.is-open {
  animation: session-glow 2.4s ease-in-out infinite;
}

.fng-fill {
  animation: fng-grow 1.1s var(--ease) both;
}

.stock-guide {
  --ind-t: 10s;
  animation: stock-rise 0.55s calc(var(--i, 0) * 70ms) var(--ease) both;
}

.mover-row,
.stock-news-card,
.stock-ticker {
  animation: stock-rise 0.45s calc(var(--i, 0) * 50ms) var(--ease) both;
}

.unit-result:not(:empty) {
  animation: result-pop 0.45s var(--ease) both;
}

.session-closed:not(.hidden) {
  animation: stock-rise 0.4s var(--ease) both;
}

@keyframes stock-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes session-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31, 122, 58, 0.15); }
  50% { box-shadow: 0 0 0 6px rgba(31, 122, 58, 0); }
}

@keyframes fng-grow {
  from { transform: scaleX(0); transform-origin: left center; }
  to { transform: scaleX(1); transform-origin: left center; }
}

@keyframes result-pop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ind-svg *,
  .ind-steps li,
  #view-stock:not(.hidden) .pdf-card,
  #view-crypto:not(.hidden) .pdf-card,
  .session-chip.is-open,
  .fng-fill,
  .stock-guide,
  .mover-row,
  .stock-news-card,
  .stock-ticker,
  .unit-result:not(:empty),
  .session-closed:not(.hidden) {
    animation: none !important;
  }

  .ind-svg * {
    stroke-dashoffset: 0 !important;
    offset-distance: 100% !important;
    opacity: 1 !important;
  }

  .ind-steps li {
    opacity: 1 !important;
  }
}

.stock-ticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin: 8px 0 18px;
}

.stock-ticker-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stock-ticker-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  #commodity-hub .stock-ticker-grid-4,
  #commodity-hub .pdf-grid.crypto-hub-extras {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .stock-ticker-grid-3,
  .stock-ticker-grid-4,
  .pdf-grid.crypto-hub-extras,
  #stock-hub .stock-ticker-grid-3,
  #crypto-hub .stock-ticker-grid-3,
  #stock-hub .pdf-grid.crypto-hub-extras,
  #crypto-hub .pdf-grid.crypto-hub-extras,
  #commodity-hub .stock-ticker-grid-4,
  #commodity-hub .pdf-grid.crypto-hub-extras {
    grid-template-columns: 1fr;
  }
}

.stock-ticker {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.stock-ticker-side {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
}

.stock-ticker-side::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
}

.stock-ticker-side.is-buy {
  color: var(--ok);
  animation: ticker-side-blink 1.1s ease-in-out infinite;
}

.stock-ticker-side.is-sell {
  color: var(--accent-hot);
  animation: ticker-side-blink 1.1s ease-in-out infinite;
}

.stock-ticker-side.is-buy::before,
.stock-ticker-side.is-sell::before {
  animation: ticker-side-pulse 1.1s ease-in-out infinite;
}

.stock-ticker-side.is-wait {
  color: var(--muted);
  opacity: 0.85;
}

.stock-ticker-side.is-wait::before {
  opacity: 0.55;
}

@keyframes ticker-side-blink {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(1.04);
  }
}

@keyframes ticker-side-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px transparent;
    transform: scale(1.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stock-ticker-side.is-buy,
  .stock-ticker-side.is-sell,
  .stock-ticker-side.is-buy::before,
  .stock-ticker-side.is-sell::before {
    animation: none;
  }
}

.stock-ticker-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-right: 44px;
}

.stock-ticker-titles {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.stock-ticker-titles strong {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stock-ticker-sym {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.market-logo {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(18, 20, 26, 0.1), inset 0 0 0 1px rgba(18, 20, 26, 0.06);
  background: #fff;
}

.market-logo.is-badge {
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(18, 20, 26, 0.1);
}

.market-logo-sm {
  width: 28px;
  height: 28px;
  font-size: 9px;
}

.market-logo-lg {
  width: 44px;
  height: 44px;
  font-size: 13px;
}

.market-desk-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.15;
}

.market-desk-title-text {
  min-width: 0;
}

.chart-board-symbol-wrap,
.chart-board-symbol {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.stock-ticker strong {
  font-size: 13px;
}

.stock-ticker-price {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 15px;
}

.stock-disclaimer {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.risk-box {
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid #e4d2b0;
  border-radius: 12px;
  background: #fff8e8;
}

.risk-box strong {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
}

.risk-box p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.unit-result.is-up,
.stock-ticker .is-up {
  color: var(--ok);
}

.unit-result.is-down,
.stock-ticker .is-down {
  color: var(--accent-hot);
}

@media (max-width: 640px) {
  .ind-steps {
    grid-template-columns: 1fr;
  }

  .market-cols,
  .mover-cols {
    grid-template-columns: 1fr;
  }

  .stock-news-card,
  .stock-news-card:not(:has(img)) {
    grid-template-columns: 1fr;
  }

  .stock-news-card img {
    width: 100%;
    height: 140px;
  }
}

.home-search,
.seo-search {
  position: relative;
  z-index: 8;
  isolation: isolate;
  max-width: 560px;
  margin: 0 0 22px;
}

.home-search input[type="search"],
.seo-search input[type="search"] {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.home-search input[type="search"]:focus,
.seo-search input[type="search"]:focus {
  outline: 2px solid color-mix(in srgb, var(--accent, #1f6feb) 45%, transparent);
  outline-offset: 1px;
}

.tool-search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: min(320px, 50vh);
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(18, 20, 26, 0.12);
}

.home-search.is-open .tool-search-results,
.seo-search.is-open .tool-search-results {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  margin-top: 10px;
  width: 100%;
  background: #fff;
  z-index: 1;
}

.tool-search-hit {
  display: grid;
  grid-template-columns: minmax(4.8rem, 5.5rem) minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tool-search-hit:hover,
.tool-search-hit:focus {
  background: color-mix(in srgb, var(--accent, #1f6feb) 10%, #fff);
  outline: none;
}

.tool-search-kind {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tool-search-hit strong {
  min-width: 0;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .home-search,
  .seo-search {
    max-width: none;
    margin: 0 0 16px;
  }

  .tool-search-hit {
    grid-template-columns: 1fr;
    row-gap: 2px;
    padding: 10px;
  }

  .tool-search-kind {
    white-space: normal;
  }
}

.related-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.related-tools a {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.related-tools a:hover {
  border-color: var(--accent, #1f6feb);
}

.docs-next {
  margin-top: 8px;
}

.docs-next a {
  font-weight: 650;
}
