:root {
  --bg: #f7f9f7;
  --ink: #0f1712;
  --muted: #647067;
  --line: #dce4de;
  --panel: #ffffff;
  --panel-soft: #eef4f0;
  --green: #00c805;
  --green-dark: #008f0a;
  --red: #df4b4b;
  --call-option-text: #16823a;
  --put-option-text: #bd5c5c;
  --body-wash-start: rgba(255, 255, 255, 0.88);
  --body-wash-end: rgba(247, 249, 247, 0.92);
  --body-glow: rgba(0, 200, 5, 0.08);
  --border-soft: rgba(15, 23, 18, 0.08);
  --panel-glass: rgba(255, 255, 255, 0.9);
  --suggest-bg: rgba(255, 255, 255, 0.98);
  --card-bg: rgba(255, 255, 255, 0.92);
  --field-bg: #ffffff;
  --button-bg: #0f1712;
  --button-text: #ffffff;
  --button-hover: #00c805;
  --hover-soft: rgba(15, 23, 18, 0.07);
  --focus-ring: rgba(0, 200, 5, 0.11);
  --scenario-bg: #fbfdfb;
  --chart-bg: #ffffff;
  --chart-wash: rgba(0, 200, 5, 0.04);
  --grid-line: #e8eee9;
  --chart-label: #718076;
  --strike-line: #a9b5ad;
  --break-even-line: #111812;
  --current-price-marker: #7b867d;
  --current-price-marker-text: #7b867d;
  --target-price-marker: var(--ink);
  --chart-area-start: rgba(0, 200, 5, 0.24);
  --chart-area-end: rgba(0, 200, 5, 0);
  --shadow: 0 18px 48px rgba(24, 38, 29, 0.12);
  --market-tape-height: 44px;
  --site-footer-height: 44px;
  color-scheme: light dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080d0a;
    --ink: #eef7f0;
    --muted: #91a095;
    --line: #26332b;
    --panel: #101812;
    --panel-soft: #16231a;
    --green-dark: #00e30a;
    --red: #ff6b6b;
    --call-option-text: #5fbd6b;
    --put-option-text: #dc7979;
    --body-wash-start: rgba(8, 13, 10, 0.94);
    --body-wash-end: rgba(8, 13, 10, 0.98);
    --body-glow: rgba(0, 200, 5, 0.12);
    --border-soft: rgba(238, 247, 240, 0.1);
    --panel-glass: rgba(16, 24, 18, 0.92);
    --suggest-bg: rgba(16, 24, 18, 0.98);
    --card-bg: rgba(16, 24, 18, 0.94);
    --field-bg: #0d1510;
    --button-bg: #00c805;
    --button-text: #041006;
    --button-hover: #35df3a;
    --hover-soft: rgba(238, 247, 240, 0.08);
    --focus-ring: rgba(0, 200, 5, 0.18);
    --scenario-bg: #0d1510;
    --chart-bg: #0d1510;
    --chart-wash: rgba(0, 200, 5, 0.08);
    --grid-line: #233129;
    --chart-label: #91a095;
    --strike-line: #657368;
    --break-even-line: #eef7f0;
    --current-price-marker: #8f9d93;
    --current-price-marker-text: #8f9d93;
    --target-price-marker: var(--ink);
    --chart-area-start: rgba(0, 200, 5, 0.28);
    --chart-area-end: rgba(0, 200, 5, 0);
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  }

}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

*::selection {
  background: transparent;
  color: inherit;
}

input,
textarea {
  -webkit-touch-callout: default;
  -webkit-user-select: text;
  user-select: text;
}

input::selection,
textarea::selection {
  background: color-mix(in srgb, var(--green) 30%, transparent);
  color: var(--ink);
}

html {
  height: 100%;
  min-width: 320px;
  overflow: hidden;
  background: var(--bg);
}

html.theme-transition,
html.theme-transition * {
  transition-duration: 720ms;
  transition-property: background, background-color, border-color, box-shadow, color, fill, opacity, stroke;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--body-wash-start), var(--body-wash-end)),
    radial-gradient(circle at 18% 18%, var(--body-glow), transparent 32%),
    var(--bg);
}

body.legal-modal-open {
  overflow: hidden;
}

body.official-v1 {
  --market-tape-height: 0px;
}

.market-tape {
  position: relative;
  z-index: 12;
  display: flex;
  width: 100%;
  height: var(--market-tape-height);
  min-height: var(--market-tape-height);
  overflow: hidden;
  border-bottom: 1px solid rgba(184, 220, 184, 0.18);
  background:
    linear-gradient(90deg, rgba(0, 200, 5, 0.12), transparent 15%, transparent 85%, rgba(0, 200, 5, 0.12)),
    linear-gradient(180deg, rgba(37, 47, 40, 0.96), rgba(10, 14, 12, 0.98) 48%, rgba(24, 32, 27, 0.96)),
    #0b100d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -10px 20px rgba(0, 0, 0, 0.34),
    0 10px 24px rgba(0, 0, 0, 0.18);
  color: #ede6a3;
  font-family:
    "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, ui-monospace,
    monospace;
  font-variant-numeric: tabular-nums;
}

.market-tape::before,
.market-tape::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.market-tape::before {
  z-index: 2;
  background:
    linear-gradient(90deg, #050806 0, transparent 56px, transparent calc(100% - 56px), #050806 100%),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.07) 0,
      rgba(255, 255, 255, 0.07) 1px,
      transparent 1px,
      transparent 5px
    );
  opacity: 0.9;
}

.market-tape::after {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 34%, rgba(0, 0, 0, 0.18)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.45), transparent 8%, transparent 92%, rgba(0, 0, 0, 0.45));
  opacity: 0.72;
}

.market-tape-track {
  position: relative;
  z-index: 1;
  display: flex;
  width: max-content;
  height: 100%;
  background-image:
    radial-gradient(circle, rgba(244, 236, 150, 0.34) 0 0.8px, transparent 1.15px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-position: 0 0, 0 0, 0 0;
  background-size: 4px 4px, 8px 8px, 8px 8px;
  animation: market-tape-scroll 46s linear infinite;
  will-change: transform;
}

.market-tape:hover .market-tape-track {
  animation-play-state: paused;
}

.market-tape-set {
  display: flex;
  height: 100%;
}

.market-tape-item {
  display: grid;
  min-width: 214px;
  height: 100%;
  grid-template-rows: 1fr 1fr;
  align-content: stretch;
  gap: 0;
  padding: 0 18px;
  border-right: 0;
  border-left: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%, rgba(0, 0, 0, 0.2)),
    rgba(14, 20, 16, 0.64);
  white-space: nowrap;
}

.market-tape-top,
.market-tape-bottom {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  height: 100%;
}

.market-tape-top {
  align-items: end;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(215, 235, 214, 0.16);
}

.market-tape-bottom {
  align-items: start;
  padding-top: 3px;
}

.market-tape-symbol,
.market-tape-price {
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  text-shadow:
    0 0 4px rgba(237, 230, 163, 0.24),
    0 1px 0 rgba(0, 0, 0, 0.8);
}

.market-tape-symbol {
  color: #f1f0d5;
}

.market-tape-price {
  color: #f0e999;
}

.market-tape-change {
  overflow: hidden;
  color: #aeb9b1;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  text-shadow:
    0 0 4px rgba(237, 230, 163, 0.2),
    0 1px 0 rgba(0, 0, 0, 0.8);
}

.market-tape-change::before {
  content: "";
  display: none;
  width: 0;
  height: 0;
  margin-right: 7px;
  transform: translateY(-1px);
}

.market-tape-change.is-unavailable {
  color: #9da59d;
}

.market-tape-change.is-up {
  color: #5bf27c;
}

.market-tape-change.is-up::before {
  display: inline-block;
  border-right: 6px solid transparent;
  border-bottom: 8px solid currentColor;
  border-left: 6px solid transparent;
}

.market-tape-change.is-down {
  color: #ff5e6a;
}

.market-tape-change.is-down::before {
  display: inline-block;
  border-top: 8px solid currentColor;
  border-right: 6px solid transparent;
  border-left: 6px solid transparent;
}

@keyframes market-tape-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  height: calc(100dvh - var(--site-footer-height) - var(--market-tape-height));
  margin: 0 auto;
  padding: 18px 0 10px;
  overflow: hidden;
}

.hero {
  position: relative;
  display: grid;
  height: 100%;
  place-items: center;
}

.app-layout {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, auto);
  align-content: center;
  justify-items: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.hero-grid {
  position: relative;
  display: grid;
  z-index: 3;
  width: min(820px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - var(--site-footer-height) - var(--market-tape-height) - 156px));
  min-height: 0;
  overflow: hidden;
  transform: none;
}

body.official-v1 .hero-grid,
body.official-v1.layout-locked .hero-grid {
  max-height: min(820px, calc(100dvh - var(--site-footer-height) - 88px)) !important;
}

.app-layout .hero-grid {
  position: relative;
  inset: auto;
  height: auto;
  margin: 0 auto;
  transform: none;
}

.app-layout[data-active-page="calculator"] .hero-grid {
  transform: none;
}

.app-layout[data-active-page="ranking"] .hero-grid {
  inset: auto;
  width: min(820px, calc(100vw - 32px));
  margin: 0 auto;
}

body.layout-locked .top-timestamp,
body.layout-locked .page-tabs,
body.layout-locked .hero-grid,
body.layout-locked .page-panel {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
}

body.layout-locked .top-timestamp,
body.layout-locked .page-tabs,
body.layout-locked .hero-grid {
  width: min(820px, calc(100vw - 32px)) !important;
  margin: 0 auto !important;
}

body.layout-locked .hero-grid {
  display: grid;
  max-width: min(820px, calc(100vw - 32px)) !important;
  max-height: min(760px, calc(100dvh - var(--site-footer-height) - var(--market-tape-height) - 156px)) !important;
  min-height: 0;
  overflow: hidden;
}

body.layout-locked .page-panel {
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
}

.layout-custom.hero-grid {
  align-content: stretch;
}

.page-panel.layout-custom {
  z-index: 3;
  min-height: 0;
  overflow: auto;
  scrollbar-width: none;
}

.page-panel.layout-custom::-webkit-scrollbar {
  display: none;
}

.layout-custom.hero-grid > .page-panel:not([hidden]) {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: auto;
  scrollbar-width: none;
}

.layout-custom.hero-grid > .page-panel:not([hidden])::-webkit-scrollbar {
  display: none;
}

.layout-custom.page-tabs .page-tab {
  height: 100%;
  min-height: 40px;
}

.layout-handle {
  position: absolute;
  z-index: 80;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--green) 34%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--field-bg) 92%, transparent);
  box-shadow: 0 8px 22px rgba(24, 38, 29, 0.12);
  color: var(--muted);
  opacity: 0.42;
  touch-action: none;
  transition:
    opacity 140ms ease,
    color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

body:not(.layout-edit-mode) .layout-handle {
  display: none !important;
}

.layout-surface:hover > .layout-handle,
.layout-surface:focus-within > .layout-handle,
.layout-surface.is-layout-dragging > .layout-handle,
.layout-surface.is-layout-resizing > .layout-handle {
  opacity: 1;
}

.layout-move-handle {
  top: 8px;
  left: 8px;
  cursor: grab;
}

.layout-resize-handle {
  right: 8px;
  bottom: 8px;
  cursor: nwse-resize;
}

.layout-move-handle::before,
.layout-move-handle::after,
.layout-resize-handle::before,
.layout-resize-handle::after {
  content: "";
  display: block;
}

.layout-move-handle::before {
  width: 11px;
  height: 11px;
  background:
    radial-gradient(circle, currentColor 1.4px, transparent 1.7px) 0 0 / 5px 5px;
}

.layout-resize-handle::before {
  width: 14px;
  height: 14px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.layout-handle:hover,
.layout-handle:focus-visible,
.layout-surface.is-layout-dragging > .layout-move-handle,
.layout-surface.is-layout-resizing > .layout-resize-handle {
  background: var(--green);
  color: #041006;
  opacity: 1;
  outline: none;
}

.layout-surface.is-layout-dragging > .layout-move-handle {
  cursor: grabbing;
}

.danmaku-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.danmaku-layer.is-active {
  opacity: 1;
}

.danmaku-bullet {
  position: absolute;
  top: var(--danmaku-top, 50%);
  left: 0;
  display: inline-flex;
  width: max-content;
  max-width: min(520px, 72vw);
  align-items: center;
  padding: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 820;
  line-height: 1;
  gap: 7px;
  pointer-events: auto;
  white-space: nowrap;
  transform: translateX(100vw);
  animation: danmaku-flight var(--danmaku-duration, 15s) linear forwards;
}

.danmaku-content {
  display: inline-flex;
  min-width: 0;
  max-width: min(420px, 62vw);
  align-items: center;
  padding: 8px 13px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--green) 24%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  box-shadow: 0 10px 28px rgba(24, 38, 29, 0.08);
  backdrop-filter: blur(12px);
}

.danmaku-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.danmaku-like {
  position: relative;
  display: inline-flex;
  height: 28px;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  padding: 0 2px;
  background: transparent;
  color: color-mix(in srgb, var(--ink) 68%, var(--green) 32%);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  filter: drop-shadow(0 6px 12px color-mix(in srgb, var(--shadow) 18%, transparent));
  transition:
    color 140ms ease,
    transform 140ms ease,
    opacity 140ms ease;
}

.danmaku-like:hover {
  color: var(--green-dark);
  transform: translateY(-1px) scale(1.05);
}

.danmaku-like svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.danmaku-like-count {
  min-width: 9px;
  text-align: left;
}

.danmaku-like.is-liked {
  color: var(--green-dark);
}

.danmaku-like.is-popping {
  animation: danmaku-like-pop 260ms cubic-bezier(0.2, 1.7, 0.34, 1);
}

.danmaku-like-burst {
  position: absolute;
  top: -14px;
  left: 50%;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 950;
  pointer-events: none;
  transform: translateX(-50%);
  animation: danmaku-like-burst 520ms ease-out forwards;
}

.danmaku-bullet.is-own .danmaku-content {
  border-color: color-mix(in srgb, var(--green) 62%, transparent);
  background: var(--green);
  box-shadow:
    0 10px 28px rgba(0, 200, 5, 0.18),
    0 0 0 4px color-mix(in srgb, var(--green) 16%, transparent);
  color: #041006;
}

.danmaku-bullet.is-own .danmaku-like {
  color: #041006;
}

.danmaku-bullet.is-own .danmaku-like.is-liked {
  color: var(--green);
}

@keyframes danmaku-like-pop {
  0% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.28) rotate(-7deg);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes danmaku-like-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, 6px) scale(0.72);
  }

  24% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -12px) scale(1);
  }
}

@keyframes danmaku-flight {
  from {
    transform: translateX(100vw);
  }

  to {
    transform: translateX(calc(-100% - 40px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .market-tape {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .market-tape::-webkit-scrollbar {
    display: none;
  }

  .market-tape-track {
    animation: none;
  }

  .price-dial-panel.is-current-matched::after {
    animation: none;
  }

  .danmaku-layer {
    display: none;
  }
}

.page-tabs {
  position: relative;
  z-index: 4;
  display: grid;
  align-items: stretch;
  width: min(820px, calc(100vw - 32px));
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--panel-soft);
  box-shadow: 0 10px 30px rgba(24, 38, 29, 0.08);
  transform: none;
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.top-timestamp {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(820px, calc(100vw - 32px));
  gap: 4px;
  color: var(--muted);
  font-size: clamp(13px, 1.55vw, 18px);
  font-weight: 820;
  line-height: 1.05;
  text-align: center;
  transform: none;
}

body.official-v1 .top-timestamp {
  display: none !important;
}

body.official-v1 .app-layout {
  grid-template-rows: minmax(0, auto);
}

.top-time-text {
  min-width: 0;
  white-space: nowrap;
}

.market-status {
  display: inline-block;
  order: -1;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: clamp(11px, 1.2vw, 14px);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-status.is-open {
  color: var(--green-dark);
}

.market-status.is-pre {
  color: #2f7cf6;
}

.market-status.is-after {
  color: #b76d00;
}

.market-status.is-closed {
  color: var(--red);
}

@media (prefers-color-scheme: dark) {
  .market-status.is-pre {
    color: #7fb2ff;
  }

  .market-status.is-after {
    color: #f0b85a;
  }
}

.page-tabs::before {
  content: "";
  position: absolute;
  inset: 4px auto 4px 4px;
  z-index: 0;
  width: calc((100% - 14px) / 2);
  border-radius: 6px;
  background: var(--field-bg);
  box-shadow: 0 8px 18px rgba(27, 39, 31, 0.08);
  transform: translateX(0);
  transition:
    transform 340ms cubic-bezier(0.22, 1, 0.36, 1),
    background 180ms ease,
    box-shadow 180ms ease;
}

.app-layout[data-active-page="ranking"] .page-tabs::before {
  transform: translateX(calc(100% + 6px));
}

.page-tab {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  height: 40px;
  place-items: center;
  padding: 0 10px;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition:
    color 160ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.page-tab:hover,
.page-tab.is-active {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.page-tab.is-active {
  transform: scale(1.015);
}

.page-tab:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}

@media (prefers-color-scheme: dark) {
  .page-tabs {
    border-color: rgba(238, 247, 240, 0.15);
    background:
      linear-gradient(180deg, rgba(16, 24, 19, 0.98), rgba(9, 14, 11, 0.98)),
      #0d1510;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.055),
      0 10px 28px rgba(0, 0, 0, 0.34);
  }

  .page-tabs::before {
    background:
      linear-gradient(180deg, rgba(4, 10, 7, 0.98), rgba(2, 7, 5, 0.98)),
      #050a07;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.045),
      0 6px 16px rgba(0, 0, 0, 0.26);
  }

  .page-tab {
    color: #9faaa3;
  }

  .page-tab:hover {
    color: #d4ded7;
  }

  .page-tab.is-active {
    color: #f4faf6;
    text-shadow: none;
  }
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 0.94;
  letter-spacing: 0;
}

.subcopy {
  width: min(100%, 520px);
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.calc-panel {
  position: relative;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 24px;
  background: var(--panel-glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.page-panel[hidden] {
  display: none;
}

.panel-title {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.panel-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.panel-title p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.chatter-panel .panel-title {
  position: relative;
  width: 100%;
}

.chatter-admin-toggle {
  position: absolute;
  top: 50%;
  right: 0;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: var(--field-bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  transform: translateY(-50%);
}

.chatter-admin-toggle.is-active {
  border-color: color-mix(in srgb, var(--green) 48%, var(--line));
  color: var(--green-dark);
}

.ranking-list {
  display: grid;
  min-height: 0;
  align-content: start;
  gap: 14px;
  max-height: min(520px, calc(100vh - 310px));
  overflow-y: auto;
  padding-right: 2px;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.ranking-list::-webkit-scrollbar {
  display: none;
}

.ranking-panel {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: min(720px, calc(100dvh - var(--site-footer-height) - var(--market-tape-height) - 196px));
}

.ranking-mode-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-height: 48px;
  padding: 4px;
  border-radius: 8px;
  background: var(--panel-soft);
}

.ranking-mode-option {
  position: relative;
  min-width: 0;
  border-radius: 6px;
}

.ranking-mode-button {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 40px;
  min-width: 0;
  place-items: center;
  border: 0;
  border-radius: 6px;
  padding: 0 38px;
  background: transparent;
  color: var(--muted);
  font-size: clamp(11px, 1.35vw, 15px);
  font-weight: 780;
  line-height: 1.05;
  text-align: center;
  transition:
    background 180ms ease,
    color 160ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ranking-mode-button.is-active {
  background: var(--field-bg);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(27, 39, 31, 0.08);
  transform: scale(1.015);
}

.ranking-category-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-height: 42px;
  padding: 4px;
  border-radius: 8px;
  background: var(--panel-soft);
}

.ranking-category-filter {
  display: grid;
  min-width: 0;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: clamp(11px, 1.15vw, 14px);
  font-weight: 780;
  line-height: 1.05;
  transition:
    background 180ms ease,
    color 160ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ranking-category-filter.is-active {
  background: var(--field-bg);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(27, 39, 31, 0.08);
  transform: scale(1.015);
}

.ranking-section {
  display: grid;
  gap: 8px;
  will-change: opacity, transform;
}

.ranking-section[hidden] {
  display: none;
}

.ranking-rows,
.chatter-feed {
  display: grid;
  gap: 8px;
}

.chatter-panel {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100vw;
  min-height: 100vh;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.chatter-panel .panel-title,
.chatter-feed {
  display: none;
}

.ranking-row,
.chatter-message {
  display: grid;
  min-height: 54px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field-bg);
}

.ranking-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-color: var(--line);
  cursor: default;
  text-align: left;
}

.ranking-row.is-new-comment {
  animation: ranking-comment-arrive 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ranking-number {
  display: grid;
  width: 34px;
  min-width: 34px;
  place-items: center;
  color: var(--muted-strong);
  font-size: 18px;
  font-weight: 650;
  line-height: 1;
}

.ranking-details {
  display: grid;
  min-width: 0;
  gap: 2px;
  justify-items: start;
}

.ranking-symbol {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-weight: 880;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-row-comment .ranking-symbol {
  font-size: 14px;
  line-height: 1.2;
}

.ranking-name {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-tag {
  align-self: center;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.ranking-like-button {
  display: inline-flex;
  min-width: 78px;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition:
    color 150ms ease,
    transform 150ms ease;
}

.ranking-like-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.ranking-like-button:hover,
.ranking-like-button.is-liked {
  color: var(--green-dark);
}

.ranking-like-button:hover {
  transform: translateY(-1px);
}

.ranking-like-button.is-popping {
  animation: ranking-like-pop 260ms cubic-bezier(0.2, 1.7, 0.34, 1);
}

.ranking-tag-muted {
  color: var(--muted);
}

.ranking-empty {
  min-height: 58px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.3;
  text-align: center;
}

.ranking-empty.is-reset-empty {
  animation: ranking-empty-reset 780ms cubic-bezier(0.18, 0.9, 0.22, 1);
}

@keyframes ranking-empty-reset {
  0% {
    opacity: 0;
    transform: translateY(-12px) scale(0.985);
    border-color: color-mix(in srgb, var(--green) 54%, var(--line));
    background: color-mix(in srgb, var(--panel-soft) 76%, transparent);
    box-shadow: 0 18px 42px color-mix(in srgb, var(--green) 16%, transparent);
  }

  48% {
    opacity: 1;
    transform: translateY(3px) scale(1.01);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    border-color: var(--line);
    background: transparent;
    box-shadow: none;
  }
}

@keyframes ranking-comment-arrive {
  0% {
    border-color: color-mix(in srgb, var(--green) 65%, var(--line));
    box-shadow: 0 18px 34px color-mix(in srgb, var(--green) 18%, transparent);
    opacity: 0;
    transform: translateY(-14px) scale(0.985);
  }

  48% {
    border-color: color-mix(in srgb, var(--green) 58%, var(--line));
    box-shadow: 0 14px 28px color-mix(in srgb, var(--green) 14%, transparent);
    opacity: 1;
    transform: translateY(2px) scale(1.008);
  }

  100% {
    border-color: var(--line);
    box-shadow: none;
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ranking-like-pop {
  0% {
    transform: scale(1);
  }

  48% {
    transform: scale(1.18) rotate(-5deg);
  }

  100% {
    transform: scale(1);
  }
}

.chatter-message {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  justify-items: start;
  max-height: 90px;
  padding: 13px 14px;
  overflow: hidden;
  transition:
    opacity 320ms ease,
    transform 320ms ease,
    max-height 320ms ease,
    padding 320ms ease,
    border-color 320ms ease;
}

.chatter-message.is-hiding {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
  opacity: 0;
  transform: translateY(-5px);
}

.chatter-feed {
  min-height: 0;
  align-content: end;
  overflow-y: auto;
  padding: 2px 2px 4px;
  overscroll-behavior: contain;
}

.chatter-text {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatter-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chatter-action {
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.chatter-action:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--green) 38%, var(--line));
  color: var(--green-dark);
}

.chatter-action:disabled,
.chatter-action.is-reported {
  cursor: default;
  opacity: 0.58;
}

.chatter-admin-action {
  display: none;
}

.chatter-panel.is-admin .chatter-admin-action {
  display: inline-flex;
}

.chatter-compose {
  position: fixed;
  top: var(--chatter-compose-y, auto);
  right: auto;
  bottom: var(--chatter-compose-bottom, 24px);
  left: var(--chatter-compose-x, 50%);
  z-index: 6;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  width: min(680px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-glass);
  box-shadow: 0 18px 44px rgba(24, 38, 29, 0.14);
  cursor: grab;
  pointer-events: auto;
  transform: translateX(var(--chatter-compose-shift, -50%));
  backdrop-filter: blur(18px);
}

.chatter-compose.is-positioned {
  --chatter-compose-bottom: auto;
  --chatter-compose-shift: 0;
}

.chatter-compose.is-dragging {
  cursor: grabbing;
}

.chatter-compose input,
.chatter-compose button {
  height: 48px;
  border-radius: 8px;
  cursor: auto;
  font: inherit;
  font-weight: 760;
}

.chatter-compose input {
  min-width: 0;
  border: 1px solid var(--line);
  outline: none;
  padding: 0 12px;
  background: var(--field-bg);
  color: var(--ink);
}

.chatter-ticker-field {
  position: relative;
  min-width: 0;
  width: 112px;
}

.chatter-compose .chatter-ticker-input {
  width: 100%;
  padding: 0 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.chatter-ticker-suggestions {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 90;
  display: grid;
  width: min(280px, calc(100vw - 36px));
  max-height: 230px;
  padding: 6px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--suggest-bg);
  box-shadow: 0 18px 40px rgba(24, 38, 29, 0.16);
  backdrop-filter: blur(14px);
  overflow-y: auto;
}

.chatter-ticker-suggestions,
.ticker-suggestions,
.legal-modal-card,
.returns-info-panel {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.chatter-ticker-suggestions::-webkit-scrollbar,
.ticker-suggestions::-webkit-scrollbar,
.legal-modal-card::-webkit-scrollbar,
.returns-info-panel::-webkit-scrollbar {
  display: none;
}

.chatter-ticker-suggestions[hidden] {
  display: none;
}

.chatter-ticker-suggestion {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.chatter-ticker-suggestion:hover,
.chatter-ticker-suggestion.is-active {
  background: var(--panel-soft);
}

.chatter-ticker-suggestion .ticker-symbol {
  font-size: 13px;
}

.chatter-ticker-suggestion .ticker-name {
  font-size: 12px;
}

.chatter-compose input:focus {
  border-color: rgba(0, 200, 5, 0.55);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.chatter-compose .chatter-ticker-input:invalid {
  border-color: rgba(216, 82, 82, 0.7);
}

.chatter-compose button {
  border: 0;
  padding: 0 16px;
  background: var(--button-bg);
  color: var(--button-text);
  cursor: pointer;
}

.chatter-compose button:hover {
  background: var(--button-hover);
}

.chatter-compose button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.search-label,
.field span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 740;
  text-align: center;
}

.field {
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 8px;
  min-width: 0;
}

.field span {
  margin-bottom: 0;
}

.ticker-search {
  position: relative;
  margin-top: clamp(4px, 0.8dvh, 8px);
}

.ticker-ghost {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100% - 108px);
  color: var(--muted);
  font-size: 34px;
  font-weight: 850;
  line-height: 1;
  opacity: 0.58;
  pointer-events: none;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  filter: blur(0);
  transition:
    opacity 150ms ease,
    filter 150ms ease,
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

#ticker-ghost-caret {
  display: inline-block;
  width: 3px;
  height: 0.82em;
  margin-left: 3px;
  border-radius: 999px;
  background: currentColor;
  transform: translateY(0);
}

#ticker-ghost-caret.is-hidden {
  opacity: 0;
}

.ticker-search.has-value .ticker-ghost {
  display: none;
}

.ticker-search:focus-within:not(.has-value) .ticker-ghost,
.ticker-search.is-ghost-hidden:not(.has-value) .ticker-ghost {
  opacity: 0;
  filter: blur(4px);
  transform: translate(-50%, -50%) scale(0.985);
}

.ticker-search input {
  width: 100%;
  height: 74px;
  padding: 0 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: var(--panel-soft);
  caret-color: var(--green);
  color: var(--ink);
  font-size: 34px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 74px;
  text-align: center;
  text-transform: uppercase;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.ticker-search:not(.has-value) input {
  caret-color: transparent;
}

.ticker-search:not(.has-value) input:focus {
  caret-color: var(--green);
}

.ticker-search input:focus,
.field input:focus,
.field select:focus {
  border-color: rgba(0, 200, 5, 0.55);
  background: var(--field-bg);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

#clear-ticker {
  position: absolute;
  top: 50%;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition:
    opacity 140ms ease,
    background 160ms ease;
}

.ticker-search.has-value #clear-ticker {
  opacity: 1;
  pointer-events: auto;
}

#clear-ticker:hover {
  background: var(--hover-soft);
}

#clear-ticker span {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

#clear-ticker span::before,
#clear-ticker span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 19px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
}

#clear-ticker span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

#clear-ticker span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.ticker-suggestions {
  position: fixed;
  top: var(--ticker-suggestions-top, 0);
  left: var(--ticker-suggestions-left, 0);
  --ticker-suggestion-row-height: 46px;
  z-index: 50;
  display: grid;
  width: var(--ticker-suggestions-width, min(520px, calc(100vw - 32px)));
  height: var(--ticker-suggestions-height, 320px);
  align-content: start;
  gap: 4px;
  max-height: none;
  padding: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--suggest-bg);
  box-shadow: 0 18px 40px rgba(24, 38, 29, 0.14);
  backdrop-filter: blur(14px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ticker-suggestions[hidden] {
  display: none;
}

.ticker-suggestion {
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  height: var(--ticker-suggestion-row-height);
  min-height: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.ticker-suggestion:hover,
.ticker-suggestion.is-active {
  background: var(--panel-soft);
}

.ticker-symbol {
  font-size: 15px;
  font-weight: 880;
  white-space: nowrap;
}

.ticker-name {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticker-suggestion-badge {
  justify-self: end;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
}

.control-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-height: 48px;
  margin-top: 12px;
  padding: 4px;
  border-radius: 8px;
  background: var(--panel-soft);
  overflow: hidden;
}

.option-controls {
  display: grid;
  gap: clamp(10px, 1.2dvh, 14px);
  min-width: 0;
}

.option-controls .control-row {
  margin: 0;
}

.calculator-live-now {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-self: center;
  gap: 7px;
  margin-top: clamp(8px, 1dvh, 12px);
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--green) 18%, var(--border-soft));
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
  color: color-mix(in srgb, var(--muted) 82%, var(--ink));
  font-size: clamp(11px, 1.05vw, 13px);
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
}

.hero-grid > .calculator-live-now {
  margin-top: clamp(8px, 1.2dvh, 12px);
}

.calculator-live-now strong {
  color: var(--ink);
  font-weight: 880;
}

.calculator-live-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 14%, transparent);
}

.option-choice-stage {
  display: grid;
  width: 100%;
  min-height: 40px;
  min-width: 0;
}

.option-choice-stage > .control-row {
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  transform: scale(1);
  transform-origin: center;
  filter: blur(0);
  will-change: opacity, filter, transform;
  transition:
    opacity 260ms ease,
    filter 260ms ease,
    transform 320ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0s;
}

.option-choice-stage[data-mode="buy"] .option-type-row,
.option-choice-stage[data-mode="sell"] .sell-strategy-row {
  visibility: visible;
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
  pointer-events: auto;
  transition-delay: 50ms, 50ms, 0s, 0s;
}

.option-choice-stage[data-mode="sell"] .option-type-row,
.option-choice-stage[data-mode="buy"] .sell-strategy-row {
  visibility: hidden;
  opacity: 0;
  filter: blur(5px);
  transform: scale(0.988);
  pointer-events: none;
  transition-delay: 0s, 0s, 0s, 260ms;
}

.strategy-row {
  min-height: 66px;
}

.strategy-row .segmented-option {
  font-size: clamp(18px, 1.42vw, 20px);
  font-weight: 820;
}

.option-type-row,
.sell-strategy-row {
  gap: 6px;
  min-height: 36px;
  padding: 0;
  background: transparent;
  overflow: visible;
}

.sell-strategy-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.option-type-row::before,
.sell-strategy-row::before {
  display: none;
}

.option-type-row .segmented-option,
.sell-strategy-row .segmented-option {
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--green) 16%, transparent);
  background: var(--panel-soft);
  box-shadow: none;
  font-size: clamp(12px, 0.92vw, 14px);
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option-type-row .segmented-input:checked + .segmented-option,
.sell-strategy-row .segmented-input:checked + .segmented-option {
  border-color: color-mix(in srgb, var(--green) 52%, transparent);
  background: var(--field-bg);
  box-shadow: 0 8px 18px rgba(27, 39, 31, 0.08);
}

.calc-panel > .control-row:first-child {
  margin-top: 0;
  margin-bottom: 16px;
}

.control-row::before {
  content: "";
  position: absolute;
  inset: 3px auto 3px 3px;
  z-index: 0;
  width: calc((100% - 12px) / 2);
  border-radius: 6px;
  background: var(--field-bg);
  box-shadow: 0 8px 18px rgba(27, 39, 31, 0.08);
  transform: translateX(0);
  transition:
    transform 340ms cubic-bezier(0.22, 1, 0.36, 1),
    background 180ms ease,
    box-shadow 180ms ease;
}

.control-row:has(#put:checked)::before {
  transform: translateX(calc(100% + 6px));
}

.strategy-row:has(#mode-sell:checked)::before {
  transform: translateX(calc(100% + 6px));
}

.segmented-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-option {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: color-mix(in srgb, var(--ink) 78%, var(--muted));
  font-weight: 780;
  transition:
    color 160ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.segmented-option:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -3px;
}

.segmented-input:checked + .segmented-option {
  color: var(--ink);
  transform: scale(1.015);
}

#premium-field-label,
#total-cost-label {
  display: inline-block;
  transform-origin: center;
  will-change: opacity, filter, transform;
  transition:
    opacity 180ms ease,
    filter 180ms ease,
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

#premium-field-label.is-morphing,
#total-cost-label.is-morphing {
  opacity: 0;
  filter: blur(4px);
  transform: scale(0.985);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.field-grid + .field-grid {
  margin-top: 12px;
}

.field-grid-market {
  margin-top: 18px;
}

.field-grid-support {
  align-items: end;
}

.field input,
.field select {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  height: 50px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: var(--field-bg);
  color: var(--ink);
  font-weight: 720;
  line-height: 50px;
  text-align: center;
}

input::placeholder,
textarea::placeholder,
.field input::placeholder {
  transition:
    opacity 150ms ease,
    color 150ms ease;
}

.field input[type="number"] {
  appearance: textfield;
}

.field input[type="number"]::-webkit-inner-spin-button,
.field input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.total-cost-field {
  position: relative;
}

.total-cost-field strong {
  display: grid;
  width: 100%;
  height: 50px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field-bg);
  color: var(--ink);
  cursor: default;
  font-size: 17px;
  font-weight: 820;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  -webkit-user-select: none;
  user-select: none;
  white-space: nowrap;
}

#spot::placeholder,
#target-price::placeholder,
#strike::placeholder,
#premium::placeholder,
#manual-iv::placeholder {
  color: var(--muted);
  opacity: 0.72;
  text-transform: uppercase;
}

#strike::placeholder,
#premium::placeholder {
  opacity: 0.86;
  text-transform: none;
}

#spot:focus::placeholder,
#target-price:focus::placeholder,
#strike:focus::placeholder,
#premium:focus::placeholder,
#manual-iv:focus::placeholder {
  color: transparent;
  opacity: 0;
}

input.is-placeholder-hidden::placeholder,
textarea.is-placeholder-hidden::placeholder,
.is-placeholder-hidden::placeholder {
  color: transparent !important;
  opacity: 0 !important;
}

.field input[type="date"]:focus::-webkit-datetime-edit {
  opacity: 1;
}

.number-stepper {
  position: relative;
}

.number-stepper input {
  padding-right: 38px;
}

.manual-iv-stepper {
  --manual-iv-suffix-left: 50%;
  --manual-iv-suffix-gap: 8px;
  --manual-iv-suffix-size: 17px;
}

.manual-iv-suffix {
  position: absolute;
  top: 50%;
  left: var(--manual-iv-suffix-left);
  display: none;
  color: var(--ink);
  font-size: var(--manual-iv-suffix-size);
  font-weight: 820;
  line-height: 1;
  pointer-events: none;
  transform: translate(var(--manual-iv-suffix-gap), -50%);
}

.manual-iv-stepper.has-value .manual-iv-suffix,
.manual-iv-stepper[data-has-value] .manual-iv-suffix {
  display: block;
}

.manual-iv-stepper:not(.has-value):not([data-has-value]) .manual-iv-suffix {
  display: none !important;
}

.number-stepper-buttons {
  position: absolute;
  top: 5px;
  right: 5px;
  bottom: 5px;
  display: grid;
  width: 28px;
  grid-template-rows: 1fr 1fr;
  overflow: hidden;
  border-left: 1px solid var(--line);
}

.number-stepper-buttons button {
  position: relative;
  display: grid;
  padding: 0;
  place-items: center;
  border: 0;
  color: var(--muted);
  background: transparent;
}

.number-stepper-buttons button:hover:not(:disabled) {
  color: var(--ink);
  background: var(--hover-soft);
}

.number-stepper-buttons button:disabled {
  cursor: not-allowed;
  opacity: 0.28;
}

.number-stepper-buttons button::before {
  content: "";
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.number-stepper-buttons button:first-child::before {
  transform: translateY(2px) rotate(45deg);
}

.number-stepper-buttons button:last-child::before {
  transform: translateY(-2px) rotate(225deg);
}

.field select {
  appearance: none;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 50%,
    calc(100% - 11px) 50%;
  background-repeat: no-repeat;
  background-size:
    6px 6px,
    6px 6px;
  font-size: clamp(11px, 1.45vw, 15px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.field input:disabled,
.field select:disabled,
.calculate-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.calculate-button:disabled {
  box-shadow: none;
  transform: none;
}

.calculator-action-row {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding-block: 4px;
}

.reset-calculator-button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field-bg);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 820;
  line-height: 1;
  padding: 8px 15px;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.reset-calculator-button:hover,
.reset-calculator-button:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--field-bg));
  color: var(--ink);
  outline: none;
  transform: translateY(-1px);
}

.reset-calculator-button:active {
  transform: translateY(0);
}

.calculate-button {
  display: flex;
  width: 100%;
  height: clamp(46px, 6dvh, 56px);
  min-height: 0;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 0;
  border: 0;
  border-radius: 8px;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 820;
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.calculate-button:hover:not(:disabled) {
  background: var(--button-hover);
  box-shadow: 0 12px 24px rgba(0, 200, 5, 0.2);
  transform: translateY(-1px);
}

.site-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 6;
  display: grid;
  height: var(--site-footer-height);
  padding: 6px 14px;
  place-items: center;
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  background: var(--panel);
  box-shadow: none;
}

body:has(#results.is-visible) .site-footer {
  display: none;
}

.site-footer-card {
  display: grid;
  width: 100%;
  max-width: 1480px;
  min-width: 0;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  justify-content: stretch;
  gap: clamp(18px, 3.2vw, 52px);
  color: color-mix(in srgb, var(--ink) 72%, var(--muted));
  font-size: clamp(11px, 0.86vw, 13px);
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.site-footer-main {
  display: contents;
}

.site-footer-links {
  display: flex;
  grid-column: 1;
  grid-row: 1;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  justify-self: end;
  color: inherit;
  line-height: 1;
}

.site-footer-feedback {
  display: flex;
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
  align-items: center;
  justify-content: center;
  justify-self: start;
  gap: 8px;
  color: color-mix(in srgb, var(--muted) 72%, var(--panel));
  font-size: 0.92em;
  font-weight: inherit;
  line-height: 1;
  white-space: nowrap;
}

.site-footer-links button,
.site-footer-feedback button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: left;
}

.site-footer-links button:hover,
.site-footer-links button:focus-visible {
  color: var(--ink);
  outline: none;
}

.site-footer-feedback button:hover,
.site-footer-feedback button:focus-visible {
  color: var(--ink);
  outline: none;
}

.site-footer-rights {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  margin: 0;
  color: inherit;
  line-height: 1;
  white-space: nowrap;
}

.beta-label {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  color: color-mix(in srgb, var(--ink) 52%, var(--muted));
  font-size: 0.78em;
  font-weight: 850;
  text-transform: uppercase;
}

.legal-modal[hidden] {
  display: none;
}

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
}

.legal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
}

.legal-modal-card {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100vw - 32px));
  max-height: min(720px, calc(100dvh - 36px));
  padding: 30px;
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 14px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--panel) 96%, transparent), color-mix(in srgb, var(--field-bg) 98%, transparent)),
    var(--panel);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  -webkit-user-select: text;
  user-select: text;
}

.legal-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--field-bg) 90%, transparent);
}

.legal-modal-close::before,
.legal-modal-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.legal-modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.legal-modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.legal-modal-close:hover,
.legal-modal-close:focus-visible {
  border-color: color-mix(in srgb, var(--green) 54%, var(--line));
  color: var(--green);
  outline: none;
}

.legal-modal-card h2 {
  margin: 0;
  padding: 0 46px;
  color: var(--ink);
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.1;
  text-align: center;
}

.legal-modal-card p {
  margin: 18px 0 0;
  color: color-mix(in srgb, var(--ink) 82%, var(--muted));
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 680;
  line-height: 1.55;
  white-space: pre-line;
}

.problem-report-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.problem-report-form[hidden] {
  display: none;
}

.problem-report-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.problem-report-form textarea {
  width: 100%;
  min-height: 132px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--field-bg);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}

.problem-report-form textarea:focus {
  border-color: color-mix(in srgb, var(--ink) 18%, var(--line));
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 5%, transparent);
}

.feedback-website-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.problem-report-submit {
  min-height: 42px;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--field-bg) 88%, var(--muted));
  color: color-mix(in srgb, var(--ink) 82%, var(--muted));
  font-size: 14px;
  font-weight: 850;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.problem-report-submit:hover:not(:disabled),
.problem-report-submit:focus-visible:not(:disabled),
.problem-report-submit:active:not(:disabled) {
  border-color: color-mix(in srgb, var(--green) 70%, var(--line));
  background: var(--green);
  color: #071209;
  box-shadow: 0 12px 24px rgba(0, 200, 5, 0.18);
}

.problem-report-submit:hover:not(:disabled),
.problem-report-submit:focus-visible:not(:disabled) {
  transform: translateY(-1px);
}

.problem-report-submit:active:not(:disabled) {
  transform: translateY(0);
}

.problem-report-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.problem-report-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

.problem-report-status.is-success {
  color: var(--green-dark);
}

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

.results {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  grid-template-rows: minmax(0, 1fr);
  width: 100vw;
  height: 100dvh;
  padding: 18px;
  opacity: 0;
  overflow: hidden;
  background: var(--bg);
  transform: translateY(18px);
  transition:
    opacity 260ms ease,
    transform 260ms ease;
}

.results.is-visible {
  display: grid;
  align-content: stretch;
  opacity: 1;
  transform: translateY(0);
}

.chart-board {
  position: relative;
  border: 0;
  border-radius: 0;
  background: var(--card-bg);
  display: flex;
  width: min(1500px, 100%);
  height: 100%;
  margin: 0 auto;
  min-height: 0;
  flex-direction: column;
  padding: 18px 20px 18px;
  overflow: hidden;
  box-shadow: none;
}

.simulated-board {
  gap: 12px;
}

.result-home-button {
  position: absolute;
  top: 16px;
  left: 18px;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field-bg);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(15, 23, 18, 0.08);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.result-home-icon {
  position: relative;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.result-home-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 1px;
  width: 9px;
  height: 9px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

.result-home-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translateY(-50%);
}

.result-home-button:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--panel);
  transform: translateY(-1px);
}

.result-home-button:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 4px var(--focus-ring),
    0 8px 22px rgba(15, 23, 18, 0.08);
}

.results-report-button {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 9;
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: color-mix(in srgb, var(--muted) 82%, transparent);
  font: inherit;
  font-size: 12px;
  font-weight: 780;
  line-height: 1;
  cursor: pointer;
  transition:
    color 140ms ease,
    transform 140ms ease;
}

.results-report-button:hover,
.results-report-button:focus-visible {
  color: var(--ink);
  outline: none;
}

.results-report-button:active {
  transform: scale(0.97);
}

.returns-header {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  min-height: 96px;
  padding: 4px 0 0;
  text-align: center;
}

.returns-header > div {
  display: grid;
  justify-items: center;
}

.returns-title,
.returns-value {
  display: flex;
  align-items: center;
}

.returns-title {
  gap: 8px;
}

.returns-title h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: 0;
}

.info-dot {
  display: grid;
  width: 18px;
  height: 18px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--chart-label);
  border-radius: 50%;
  color: var(--chart-label);
  background: var(--field-bg);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.info-dot:hover,
.info-dot[aria-expanded="true"] {
  border-color: var(--ink);
  color: var(--ink);
}

.returns-info-panel {
  position: absolute;
  top: 38px;
  left: 50%;
  z-index: 12;
  width: min(620px, calc(100vw - 48px));
  max-height: min(320px, 48vh);
  margin-top: 0;
  padding: 14px 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field-bg);
  box-shadow: 0 14px 36px rgba(24, 38, 29, 0.14);
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
  line-height: 1.45;
  text-align: left;
  transform: translateX(-50%);
}

.returns-info-panel[hidden] {
  display: none;
}

.returns-info-panel p {
  margin: 0;
}

.returns-info-panel p + p {
  margin-top: 10px;
}

.returns-value {
  gap: 8px;
  justify-content: center;
  margin-top: 6px;
  max-width: 100%;
}

#profit-loss {
  color: var(--green-dark);
  max-width: 100%;
  font-size: clamp(22px, 4vw, 38px);
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
}

#profit-loss.loss {
  color: var(--red);
}

.option-share-change {
  margin: 0;
  color: var(--green-dark);
  font-size: inherit;
  font-weight: 760;
  line-height: inherit;
}

.option-share-change.loss {
  color: var(--red);
}

.contract-estimate {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: clamp(12px, 2.6vw, 14px);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.contract-estimate strong {
  color: var(--ink);
  font-weight: 800;
}

.greek-strip {
  display: grid;
  grid-template-columns: repeat(5, max-content);
  justify-content: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
  line-height: 1;
}

.greek-strip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field-bg);
}

.greek-strip b {
  color: var(--muted);
  font-weight: 780;
  text-transform: uppercase;
}

.greek-strip strong {
  color: var(--ink);
  font-weight: 850;
}

@media (max-width: 720px) {
  .greek-strip {
    display: flex;
    flex-wrap: wrap;
    max-width: min(100%, 310px);
    margin-right: auto;
    margin-left: auto;
  }
}

.chart-title-row {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
  margin-top: 8px;
}

.chart-title-row small {
  display: inline-block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.1;
  text-transform: uppercase;
}

.chart-title-row .contract-multiplier {
  text-transform: none;
}

.summary-info-dot {
  display: grid;
  width: 15px;
  height: 15px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--muted);
  border-radius: 50%;
  color: var(--muted);
  background: var(--field-bg);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.summary-info-dot:hover,
.summary-info-dot[aria-expanded="true"],
.summary-info-dot:focus-visible {
  border-color: var(--ink);
  color: var(--ink);
  outline: none;
}

.summary-tooltip {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  z-index: 8;
  width: min(248px, calc(100vw - 32px));
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field-bg);
  box-shadow: 0 14px 34px rgba(24, 38, 29, 0.16);
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  text-transform: none;
  transform: translate(-50%, -3px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.chart-title-row:hover .summary-tooltip,
.chart-title-row.is-summary-info-open .summary-tooltip,
.summary-info-dot:focus-visible + .summary-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.chart-wrap {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--chart-bg);
  overflow: hidden;
}

.returns-chart-wrap {
  min-height: 0;
}

#price-chart {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.price-dial-panel {
  --wheel-offset: 0px;
  --current-price-offset: 50%;
  --current-price-left: 50%;
  --current-price-opacity: 0;
  --current-price-label-opacity: 0;
  --current-price-scale: 1;
  position: relative;
  flex: 0 0 auto;
  padding: 36px 10px 0;
}

.price-dial-panel::after {
  content: attr(data-current-price);
  position: absolute;
  top: 0;
  left: var(--current-price-left);
  z-index: 3;
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--current-price-marker) 42%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--field-bg) 92%, var(--current-price-marker));
  color: var(--current-price-marker-text);
  box-shadow: 0 8px 22px rgba(15, 23, 18, 0.08);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  opacity: var(--current-price-label-opacity);
  pointer-events: none;
  transform: translate(-50%, 2px);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
}

.price-dial-panel.is-current-matched::after {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--panel);
  box-shadow: 0 10px 26px rgba(15, 23, 18, 0.2);
  animation: current-price-match-pop 360ms cubic-bezier(0.2, 1.7, 0.34, 1);
}

@keyframes current-price-match-pop {
  0% {
    transform: translate(-50%, 7px) scale(0.96);
  }

  56% {
    transform: translate(-50%, 0) scale(1.05);
  }

  100% {
    transform: translate(-50%, 2px) scale(1);
  }
}

.price-dial-change {
  font-size: 0.9em;
}

.price-dial-change.gain {
  color: var(--green);
}

.price-dial-change.loss {
  color: var(--red);
}

.price-wheel {
  position: relative;
  width: 100%;
  height: 52px;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: transparent;
  outline: none;
  cursor: ew-resize;
  touch-action: none;
}

.price-wheel:focus-visible {
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.price-wheel-track {
  position: absolute;
  inset: 0 -48px;
  z-index: 0;
  transform: translateX(var(--wheel-offset));
  background:
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent 38px,
      var(--line) 38px,
      var(--line) 39px,
      transparent 39px,
      transparent 80px
    );
}

.price-wheel-current {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--current-price-offset);
  z-index: 4;
  width: 5px;
  border-radius: 999px;
  background: var(--current-price-marker);
  opacity: var(--current-price-opacity);
  transform: translateX(-50%) scaleX(var(--current-price-scale));
  transform-origin: center;
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.price-wheel-center {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 5;
  width: 5px;
  border-radius: 999px;
  background: var(--ink);
  transform: translateX(-50%);
  transition:
    background 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.price-wheel.is-dragging {
  cursor: grabbing;
}

.wheel-marker-labels {
  position: relative;
  height: 0;
  margin-top: 0;
  pointer-events: none;
  transition: height 140ms ease;
}

.wheel-marker-label {
  position: absolute;
  top: 0;
  max-width: 118px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.15;
  opacity: 0;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
}

.current-price-label {
  left: var(--current-price-offset);
  color: var(--current-price-marker);
  opacity: var(--current-price-opacity);
}

.current-price-return {
  position: absolute;
  top: 50px;
  left: 10px;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  max-width: min(128px, calc(50% - 14px));
  padding: 0 9px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--current-price-marker) 56%, transparent);
  border-radius: 7px;
  background: var(--panel);
  color: var(--current-price-marker);
  box-shadow: 0 8px 22px rgba(15, 23, 18, 0.1);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  transform: translateY(-50%);
  transition:
    background 140ms ease,
    color 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
  white-space: nowrap;
}

.current-price-return[data-side="right"] {
  right: 10px;
  left: auto;
}

.current-price-return[hidden] {
  display: none;
}

.current-price-return:hover {
  background: var(--current-price-marker);
  color: var(--panel);
  transform: translateY(-50%) scale(1.02);
}

.current-price-return:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 4px var(--focus-ring),
    0 8px 22px rgba(15, 23, 18, 0.1);
}

.dial-scale {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: var(--chart-label);
  font-size: 12px;
  font-weight: 650;
}

.dial-scale span {
  min-width: 0;
  white-space: nowrap;
}

.dial-scale #dial-mid {
  flex: 1 1 auto;
  color: var(--ink);
  text-align: center;
}

.dial-scale .price-dial-change {
  margin-left: 4px;
}

.iv-dial-panel {
  --iv-wheel-offset: 0px;
  margin-top: 8px;
  padding-top: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.iv-dial-panel::after {
  display: none;
}

.iv-dial-heading {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.iv-wheel {
  height: 46px;
}

.iv-wheel-track {
  transform: translateX(var(--iv-wheel-offset));
}

.iv-wheel-center {
  background: var(--ink);
  box-shadow: none;
}

.iv-dial-scale #iv-dial-mid {
  position: absolute;
  left: 50%;
  flex: 0 0 auto;
  color: var(--ink);
  text-align: center;
  transform: translateX(-50%);
}

.iv-dial-scale {
  position: relative;
  display: block;
  min-height: 15px;
}

.iv-dial-scale span:not(#iv-dial-mid) {
  visibility: hidden;
}

@media (max-width: 980px) {
  .app-layout {
    display: grid;
    grid-template-rows: 58px minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .top-timestamp {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: min(820px, 100%) !important;
    justify-self: center;
    align-self: center;
    font-size: clamp(16px, 2.6vw, 22px);
    gap: 5px;
    line-height: 1.14;
    transform: none !important;
  }

  .market-status {
    font-size: clamp(13px, 1.9vw, 16px);
    line-height: 1.14;
  }

  .page-tabs,
  .page-tabs.layout-custom {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: min(820px, 100%) !important;
    height: 48px !important;
    min-height: 0;
    margin: 0 auto !important;
    transform: none !important;
  }

  .hero-grid,
  .app-layout .hero-grid,
  .app-layout .hero-grid.layout-custom,
  .app-layout[data-active-page="ranking"] .hero-grid {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    display: grid;
    width: min(820px, 100%) !important;
    height: 100% !important;
    min-height: 0;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 auto !important;
    overflow: hidden;
    transform: none !important;
  }
}

@media (max-width: 880px) {
  .hero-grid {
    width: min(100%, 680px);
  }

  h1 {
    font-size: clamp(42px, 12vw, 62px);
  }

  .returns-title h2 {
    font-size: 25px;
  }

  #profit-loss {
    font-size: clamp(26px, 3.5vw, 33px);
  }
}

@media (max-height: 820px) {
  .results {
    padding: 10px;
  }

  .chart-board {
    padding: 12px;
  }

  .returns-title h2 {
    font-size: 24px;
  }

  #profit-loss {
    font-size: clamp(24px, 3.4vw, 32px);
  }

  .returns-chart-wrap {
    min-height: 0;
  }

  .result-home-button {
    top: 10px;
    left: 10px;
    width: 30px;
    height: 28px;
  }

  .results-report-button {
    top: 12px;
    right: 12px;
    font-size: 11px;
  }

  .price-dial-panel {
    padding-top: 34px;
  }

  .current-price-return {
    top: 46px;
    height: 26px;
    max-width: min(112px, calc(50% - 12px));
    padding: 0 8px;
    font-size: 11px;
  }

  .iv-dial-panel {
    margin-top: 6px;
    padding-top: 12px;
    padding-bottom: 10px;
  }

  .iv-wheel {
    height: 42px;
  }
}

@media (max-height: 760px) {
  .app-layout .hero-grid {
    gap: 10px;
  }
}

@media (max-width: 620px) {
  :root {
    --market-tape-height: 36px;
    --site-footer-height: 54px;
  }

  html,
  body {
    height: auto;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.legal-modal-open {
    overflow: hidden;
  }

  .app-shell {
    width: 100%;
    max-width: 100vw;
    height: calc(100dvh - var(--market-tape-height));
    min-height: calc(100dvh - var(--market-tape-height));
    padding: 8px;
    overflow: hidden;
  }

  .result-home-button {
    width: 30px;
  }

  .market-tape-item {
    min-width: 174px;
    padding: 0 14px;
  }

  .market-tape-symbol,
  .market-tape-price {
    font-size: 11px;
  }

  .market-tape-change {
    font-size: 10px;
  }

  .hero {
    height: 100%;
    place-items: stretch;
  }

  .app-layout {
    display: grid;
    grid-template-rows: 54px minmax(0, 1fr);
    gap: 9px;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .top-timestamp {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    align-self: center;
    font-size: clamp(15px, 4.4vw, 19px);
    gap: 5px;
    line-height: 1.14;
    transform: none !important;
  }

  .market-status {
    font-size: clamp(12px, 3.4vw, 15px);
    line-height: 1.14;
  }

  .page-tabs,
  .page-tabs.layout-custom {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 0;
    margin: 0 !important;
    transform: none !important;
  }

  .page-tab {
    height: 36px;
    font-size: 12px;
  }

  .hero-grid,
  .app-layout .hero-grid,
  .app-layout .hero-grid.layout-custom,
  .app-layout[data-active-page="ranking"] .hero-grid {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    display: grid;
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    overflow: hidden;
    transform: none !important;
  }

  .calc-panel,
  .page-panel.layout-custom {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
    max-height: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
    transform: none !important;
  }

  .calc-panel {
    padding: 10px;
  }

  #option-form.calc-panel:not([hidden]) {
    display: grid;
    grid-template-rows:
      minmax(102px, 1.48fr)
      minmax(58px, 1.14fr)
      repeat(4, minmax(50px, 0.9fr))
      minmax(28px, 0.26fr)
      minmax(40px, 0.58fr);
    gap: clamp(7px, 0.9dvh, 10px);
    align-content: stretch;
  }

  #option-form.calc-panel:not([hidden]) .calculator-action-row {
    min-height: 28px;
    align-self: start;
    padding-block: 0;
  }

  #option-form.calc-panel:not([hidden]) .calculate-button {
    height: clamp(40px, 5.3dvh, 50px);
  }

  .field {
    display: grid;
    grid-template-rows: auto auto;
    align-content: center;
    gap: 7px;
    min-width: 0;
  }

  .chart-board {
    padding: 10px 12px 12px;
  }

  .control-row {
    align-self: center;
    height: clamp(48px, 7.2dvh, 64px);
    min-height: 0;
    margin-top: 0;
    gap: 4px;
    padding: 4px;
  }

  .strategy-row {
    height: clamp(60px, 8.4dvh, 72px);
    min-height: 60px;
  }

  .strategy-row .segmented-option {
    font-size: clamp(18px, 4.6vw, 22px);
  }

  .option-choice-stage {
    min-height: clamp(34px, 4.9dvh, 42px);
  }

  .option-type-row,
  .sell-strategy-row {
    height: clamp(34px, 4.9dvh, 42px);
    min-height: 34px;
    gap: 4px;
  }

  .calc-panel > .control-row:first-child {
    margin-bottom: 0;
  }

  .segmented-option {
    font-size: 19px;
  }

  .sell-strategy-row .segmented-option {
    font-size: clamp(9px, 2.55vw, 12px);
    letter-spacing: 0;
    white-space: normal;
  }

  .search-label,
  .field span {
    margin-bottom: 4px;
    font-size: 10px;
    line-height: 1.1;
  }

  .field span {
    margin-bottom: 0;
  }

  .search-label {
    align-self: end;
    margin-bottom: 0;
  }

  .ticker-search,
  .number-stepper {
    min-height: 0;
  }

  .ticker-search {
    align-self: center;
  }

  .ticker-search input {
    height: clamp(64px, 9.5dvh, 82px);
    min-height: 0;
    padding: 0 42px;
    font-size: 34px;
    line-height: 1;
  }

  .ticker-ghost {
    max-width: calc(100% - 86px);
    font-size: 34px;
  }

  #clear-ticker {
    right: 8px;
    width: 28px;
    height: 28px;
  }

  .ticker-suggestions {
    --ticker-suggestion-row-height: 44px;
    width: var(--ticker-suggestions-width, calc(100vw - 20px));
    height: var(--ticker-suggestions-height, calc(100dvh - 156px));
    max-height: none;
  }

  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-self: center;
    gap: 8px;
    margin-top: 0;
    min-height: 0;
    align-items: center;
  }

  .field-grid + .field-grid,
  .field-grid-market {
    margin-top: 0;
  }

  .field-grid-market {
    align-self: end;
  }

  .field input,
  .field select,
  .total-cost-field strong {
    height: clamp(48px, 6.5dvh, 58px);
    min-height: 0;
    border-radius: 7px;
    font-size: clamp(18px, 4.6vw, 22px);
    font-weight: 860;
    line-height: 1;
  }

  .manual-iv-stepper {
    --manual-iv-suffix-gap: 9px;
    --manual-iv-suffix-size: clamp(18px, 4.6vw, 22px);
  }

  .expiry-field {
    overflow: hidden;
  }

  .expiry-field input[type="date"] {
    min-width: 0;
    padding: 0 8px;
    font-size: clamp(16px, 4.15vw, 20px);
    letter-spacing: 0;
  }

  .expiry-field input[type="date"]::-webkit-datetime-edit {
    min-width: 0;
    padding: 0;
  }

  .expiry-field input[type="date"]::-webkit-calendar-picker-indicator {
    width: 18px;
    height: 18px;
    margin-left: 2px;
    padding: 0;
  }

  .number-stepper input {
    padding-right: 30px;
  }

  .number-stepper-buttons {
    top: 4px;
    right: 4px;
    bottom: 4px;
    width: 24px;
  }

  .number-stepper-buttons button::before {
    width: 6px;
    height: 6px;
  }

  .total-cost-field strong {
    font-size: clamp(18px, 4.6vw, 22px);
  }

  .calculator-action-row {
    align-self: start;
    justify-content: center;
    margin-top: 0;
    min-height: 28px;
    padding-block: 0;
  }

  .reset-calculator-button {
    padding: 6px 13px;
    font-size: 11px;
  }

  .calculate-button {
    align-self: center;
    height: clamp(52px, 7.4dvh, 64px);
    min-height: 0;
    margin-top: 0;
    font-size: 16px;
  }

  .ranking-panel {
    gap: 8px;
    min-height: 0;
  }

  .ranking-list {
    max-height: none;
    gap: 8px;
  }

  .ranking-row {
    min-height: 48px;
    padding: 8px 10px;
  }

  .ranking-symbol {
    font-size: 15px;
  }

  .returns-header {
    display: grid;
    gap: 7px;
    min-height: 0;
    padding: 20px 0 0;
  }

  .chart-wrap {
    min-height: 0;
  }

  .site-footer {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    height: var(--site-footer-height);
    padding: 2px 8px;
  }

  .site-footer-card {
    display: grid;
    grid-template-areas:
      "rights"
      "links"
      "feedback";
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(3, auto);
    min-height: 100%;
    align-items: center;
    align-content: center;
    justify-content: center;
    column-gap: 0;
    row-gap: 2px;
    color: color-mix(in srgb, var(--ink) 72%, var(--muted));
    font-size: clamp(7.5px, 2.15vw, 9px);
    font-weight: 700;
    line-height: 1;
  }

  .site-footer-main {
    display: contents;
  }

  .site-footer-links,
  .site-footer-rights,
  .site-footer-feedback {
    font-size: inherit;
    line-height: inherit;
  }

  .site-footer-links,
  .site-footer-feedback {
    gap: 3px;
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .site-footer-links {
    grid-area: links;
    justify-self: center;
  }

  .site-footer-feedback {
    grid-area: feedback;
    grid-column: auto;
    justify-content: center;
    width: auto;
    color: color-mix(in srgb, var(--muted) 78%, var(--panel));
    font-size: clamp(7px, 1.95vw, 8.4px);
    justify-self: center;
  }

  .site-footer-rights {
    grid-area: rights;
    justify-self: center;
    white-space: nowrap;
  }

  .legal-modal {
    padding: 10px;
  }

  .legal-modal-card {
    width: calc(100vw - 20px);
    padding: 24px 18px;
    border-radius: 12px;
  }

  .legal-modal-close {
    top: 12px;
    right: 12px;
  }
}

@media (max-width: 380px) {
  .app-shell {
    padding: 6px;
  }

  .app-layout {
    grid-template-rows: 50px minmax(0, 1fr);
    gap: 8px;
  }

  .top-timestamp {
    font-size: 14px;
  }

  .market-status {
    font-size: 12px;
  }

  .page-tabs,
  .page-tabs.layout-custom {
    height: 42px !important;
  }

  .page-tab {
    height: 34px;
    font-size: 11px;
  }

  .calc-panel {
    padding: 8px;
  }

  #option-form.calc-panel:not([hidden]) {
    grid-template-rows:
      minmax(94px, 1.42fr)
      minmax(52px, 1.08fr)
      repeat(4, minmax(46px, 0.88fr))
      minmax(26px, 0.24fr)
      minmax(38px, 0.56fr);
    gap: clamp(5px, 0.74dvh, 8px);
  }

  .control-row {
    height: clamp(44px, 6.4dvh, 56px);
    min-height: 0;
  }

  .strategy-row {
    height: clamp(56px, 7.8dvh, 64px);
    min-height: 56px;
  }

  .strategy-row .segmented-option {
    font-size: clamp(17px, 4.8vw, 21px);
  }

  .option-choice-stage {
    min-height: clamp(32px, 4.7dvh, 40px);
  }

  .option-type-row,
  .sell-strategy-row {
    height: clamp(32px, 4.7dvh, 40px);
    min-height: 32px;
    gap: 4px;
  }

  .segmented-option {
    font-size: 18px;
  }

  .sell-strategy-row .segmented-option {
    font-size: clamp(8px, 2.42vw, 11px);
    white-space: normal;
  }

  .ticker-search input {
    height: clamp(56px, 8.5dvh, 74px);
    min-height: 0;
    padding: 0 36px;
    font-size: 30px;
    line-height: 1;
  }

  .ticker-ghost {
    font-size: 30px;
  }

  .field-grid {
    gap: 6px;
  }

  .field-grid + .field-grid,
  .field-grid-market {
    margin-top: 0;
  }

  .field input,
  .field select,
  .total-cost-field strong {
    height: clamp(44px, 6dvh, 52px);
    min-height: 0;
    font-size: clamp(17px, 4.8vw, 20px);
    line-height: 1;
  }

  .manual-iv-stepper {
    --manual-iv-suffix-gap: 8px;
    --manual-iv-suffix-size: clamp(17px, 4.8vw, 20px);
  }

  .expiry-field input[type="date"] {
    padding: 0 6px;
    font-size: clamp(15px, 4.25vw, 18px);
  }

  .expiry-field input[type="date"]::-webkit-calendar-picker-indicator {
    width: 16px;
    height: 16px;
    margin-left: 1px;
  }

  .number-stepper input {
    padding-right: 26px;
  }

  .number-stepper-buttons {
    width: 22px;
  }

  .calculate-button {
    height: clamp(40px, 5.8dvh, 50px);
    min-height: 0;
    font-size: 15px;
  }
}

@media (min-width: 981px) {
  .app-layout[data-active-page="calculator"] {
    gap: clamp(8px, 1.05dvh, 14px);
  }

  .app-layout[data-active-page="calculator"] .hero-grid,
  body.layout-locked .app-layout[data-active-page="calculator"] .hero-grid {
    max-height: min(820px, calc(100dvh - var(--site-footer-height) - var(--market-tape-height) - 112px)) !important;
  }

  #option-form.calc-panel:not([hidden]) {
    display: grid;
    grid-template-rows:
      minmax(44px, auto)
      minmax(82px, auto)
      repeat(4, minmax(70px, auto))
      minmax(34px, auto)
      minmax(44px, auto);
    gap: clamp(12px, 1.25dvh, 17px);
    align-content: start;
    overflow: hidden;
  }

  #option-form.calc-panel:not([hidden]) > .control-row:first-child,
  #option-form.calc-panel:not([hidden]) .field-grid,
  #option-form.calc-panel:not([hidden]) .field-grid + .field-grid,
  #option-form.calc-panel:not([hidden]) .field-grid-market {
    margin-top: 0;
    margin-bottom: 0;
  }

  #option-form.calc-panel:not([hidden]) .field {
    gap: 10px;
  }

  #option-form.calc-panel:not([hidden]) .field-grid-market {
    margin-top: clamp(4px, 0.7dvh, 8px);
  }

  #option-form.calc-panel:not([hidden]) .calculator-action-row {
    min-height: 32px;
    align-self: start;
    justify-content: center;
    padding-block: 0;
  }

  #option-form.calc-panel:not([hidden]) .calculate-button {
    height: clamp(42px, 5.4dvh, 52px);
    align-self: end;
    margin-top: 0;
  }
}

@media (min-width: 981px) and (max-height: 900px) {
  .app-shell {
    padding-top: 10px;
    padding-bottom: 8px;
  }

  .app-layout[data-active-page="calculator"] .hero-grid,
  body.layout-locked .app-layout[data-active-page="calculator"] .hero-grid {
    max-height: min(760px, calc(100dvh - var(--site-footer-height) - var(--market-tape-height) - 100px)) !important;
  }

  #option-form.calc-panel:not([hidden]) {
    padding: clamp(14px, 1.8dvh, 20px);
    grid-template-rows:
      minmax(40px, auto)
      minmax(64px, auto)
      repeat(4, minmax(54px, auto))
      minmax(clamp(28px, 3.6dvh, 36px), auto)
      minmax(40px, auto);
    gap: clamp(7px, 0.9dvh, 11px);
  }

  #option-form.calc-panel:not([hidden]) .field {
    gap: 7px;
  }

  #option-form.calc-panel:not([hidden]) .control-row {
    min-height: 40px;
  }

  #option-form.calc-panel:not([hidden]) .ticker-search input {
    height: clamp(58px, 7dvh, 76px);
  }

  #option-form.calc-panel:not([hidden]) .field input,
  #option-form.calc-panel:not([hidden]) .field select,
  #option-form.calc-panel:not([hidden]) .total-cost-field strong {
    height: clamp(42px, 5.5dvh, 48px);
  }

  #option-form.calc-panel:not([hidden]) .reset-calculator-button {
    padding: 7px 14px;
  }

  #option-form.calc-panel:not([hidden]) .calculator-action-row {
    min-height: clamp(28px, 3.6dvh, 36px);
  }

  #option-form.calc-panel:not([hidden]) .calculate-button {
    height: clamp(38px, 5dvh, 44px);
  }
}

body.official-v1 .app-layout {
  grid-template-rows: minmax(0, auto) !important;
}

@media (max-width: 620px) {
  body.official-v1 .app-layout {
    grid-template-rows: minmax(0, 1fr) !important;
  }
}
