﻿:root {
  --bg: #f4eee4;
  --bg-strong: #efe5d6;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-dark: linear-gradient(145deg, #151a22 0%, #0f1319 100%);
  --ink: #131313;
  --ink-soft: #59544d;
  --ink-inverse: #faf8f4;
  --accent: #ff6a3d;
  --accent-deep: #dd4c1f;
  --accent-soft: rgba(255, 106, 61, 0.14);
  --mint: #a6e1c4;
  --line: rgba(19, 19, 19, 0.1);
  --line-strong: rgba(255, 255, 255, 0.14);
  --shadow: 0 20px 44px rgba(24, 23, 20, 0.11);
  --shadow-strong: 0 20px 44px rgba(7, 8, 11, 0.28);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --mono: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono",
    monospace;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
    "Noto Sans SC", "Source Han Sans SC", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.68;
  background:
    radial-gradient(circle at top left, rgba(255, 135, 92, 0.18), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(166, 225, 196, 0.22), transparent 24%),
    linear-gradient(180deg, #f8f4ee 0%, var(--bg) 56%, var(--bg-strong) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(19, 19, 19, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 19, 19, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 78%);
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1080px, calc(100% - 28px));
  margin: 24px auto 40px;
  position: relative;
}

.hero {
  margin-bottom: 20px;
}

.hero-card,
.panel,
.info-card,
.noscript-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 28px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58));
  backdrop-filter: blur(18px);
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -72px;
  bottom: -84px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 106, 61, 0.2), transparent 68%);
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

h1 {
  margin: 0;
  max-width: 15ch;
  font-size: clamp(1.72rem, 2.55vw, 2.5rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.hero-copy {
  max-width: 48rem;
  margin: 16px 0 0;
  font-size: 0.92rem;
  line-height: 1.88;
  color: var(--ink-soft);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-badges span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(19, 19, 19, 0.05);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
}

.hero-badges span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.panel {
  padding: 24px;
  backdrop-filter: blur(18px);
}

.panel-dark {
  background: var(--surface-dark);
  color: var(--ink-inverse);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-strong);
}

.panel-dark::after {
  content: "";
  position: absolute;
  inset: auto -70px -70px auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 106, 61, 0.26), transparent 68%);
}

.panel-light {
  background: linear-gradient(140deg, var(--surface-strong), rgba(255, 255, 255, 0.7));
}

.panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.kicker {
  margin: 0 0 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.72;
}

h2 {
  margin: 0;
  font-size: clamp(1.16rem, 1.7vw, 1.52rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.01em;
}

.precision-switch {
  display: inline-flex;
  padding: 5px;
  border-radius: 999px;
  background: rgba(19, 19, 19, 0.08);
  border: 1px solid rgba(19, 19, 19, 0.08);
}

.panel-dark .precision-switch {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.precision-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: transparent;
  color: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

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

.precision-button.is-active {
  background: var(--ink);
  color: var(--ink-inverse);
}

.panel-dark .precision-button.is-active {
  background: var(--accent);
  color: #111;
}

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

.field span {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.field small {
  display: block;
  min-height: 3.44em;
  font-size: 0.82rem;
  line-height: 1.72;
  color: inherit;
  opacity: 0.74;
}

.field input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(19, 19, 19, 0.1);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.panel-dark .field input {
  background: rgba(255, 255, 255, 0.96);
}

.field input:focus {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(255, 106, 61, 0.6);
  box-shadow: 0 0 0 4px rgba(255, 106, 61, 0.14);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 16px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease,
    border-color 160ms ease;
}

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

.button:focus-visible,
.precision-button:focus-visible {
  outline: 3px solid rgba(255, 106, 61, 0.26);
  outline-offset: 2px;
}

.button-primary {
  background: var(--accent);
  color: #111;
  box-shadow: 0 12px 20px rgba(221, 76, 31, 0.2);
}

.button-primary:hover {
  background: #ff7a52;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  border-color: rgba(255, 255, 255, 0.16);
}

.panel-light .button-secondary {
  background: rgba(19, 19, 19, 0.06);
  border-color: rgba(19, 19, 19, 0.08);
}

.button-ghost {
  background: transparent;
  color: inherit;
  border-color: currentColor;
  opacity: 0.72;
}

.panel-light .button-ghost {
  border-color: rgba(19, 19, 19, 0.18);
}

.result-block {
  margin-top: 22px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 180ms ease, background-color 180ms ease;
}

.panel-light .result-block {
  background: rgba(19, 19, 19, 0.03);
  border-color: rgba(19, 19, 19, 0.08);
}

.result-block[data-state="success"] {
  background: rgba(166, 225, 196, 0.12);
  border-color: rgba(166, 225, 196, 0.4);
}

.panel-light .result-block[data-state="success"] {
  background: rgba(166, 225, 196, 0.16);
}

.result-block[data-state="error"] {
  background: rgba(255, 106, 61, 0.14);
  border-color: rgba(255, 106, 61, 0.42);
}

.result-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.result-label,
.result-status {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.result-status {
  opacity: 0.72;
}

.result-value {
  display: block;
  min-height: 46px;
  font-family: var(--mono);
  font-size: clamp(1.22rem, 2.35vw, 1.88rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.result-note {
  margin: 12px 0 0;
  font-size: 0.86rem;
  line-height: 1.8;
  opacity: 0.82;
}

.result-note:empty {
  display: none;
}

.info-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.info-card {
  padding: 20px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.55));
  backdrop-filter: blur(14px);
}

.info-card h3 {
  margin: 0 0 10px;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.info-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.86;
}

.noscript-banner {
  width: min(1080px, calc(100% - 28px));
  margin: 0 auto 28px;
  padding: 16px 18px;
  background: rgba(255, 106, 61, 0.16);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-card,
  .panel,
  .info-card {
    animation: rise-in 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .panel:nth-of-type(1) {
    animation-delay: 110ms;
  }

  .panel:nth-of-type(2) {
    animation-delay: 160ms;
  }

  .info-card:nth-of-type(1) {
    animation-delay: 200ms;
  }

  .info-card:nth-of-type(2) {
    animation-delay: 240ms;
  }

  .info-card:nth-of-type(3) {
    animation-delay: 280ms;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .hero-card h1 {
    max-width: 100%;
  }

  .info-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 18px, 100%);
    margin-top: 18px;
    margin-bottom: 24px;
  }

  .hero-card,
  .panel,
  .info-card {
    border-radius: 24px;
    padding: 20px;
  }

  h1 {
    font-size: 1.9rem;
    line-height: 1.26;
  }

  .hero-copy,
  .result-note,
  .info-card p {
    font-size: 0.84rem;
  }

  .field small {
    min-height: 0;
  }

  .panel-top,
  .result-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .precision-switch {
    width: 100%;
    justify-content: space-between;
  }

  .precision-button {
    flex: 1 1 50%;
  }

  .action-row .button {
    flex: 1 1 100%;
  }
}
