:root {
  --bg: #f7f9fb;
  --surface: #ffffff;
  --surface-muted: #f1f5f7;
  --text: #122027;
  --muted: #64727c;
  --line: #dce4e8;
  --accent: #0d9488;
  --accent-strong: #0f766e;
  --accent-soft: #e6f7f5;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --success: #0f766e;
  --shadow: 0 18px 50px rgba(18, 32, 39, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, #ffffff 0, var(--bg) 360px),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

code {
  color: var(--text);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

.sprite {
  display: none;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.site-header {
  border-bottom: 1px solid rgba(220, 228, 232, 0.78);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-wrap,
.page-shell,
.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.nav-wrap {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent-strong);
  font-size: 16px;
}

.nav-links {
  gap: 8px;
}

.nav-links a,
.back-link {
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 10px;
}

.nav-links a:hover,
.back-link:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.page-shell {
  padding: 58px 0 72px;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.intro {
  grid-column: 1 / -1;
  max-width: 640px;
}

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

h1 {
  margin-bottom: 14px;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.06;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.25;
}

p {
  color: var(--muted);
}

.tool-board {
  display: grid;
  gap: 14px;
}

.tool-card,
.panel,
.sheet-option,
.empty-state,
.mini-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.tool-card {
  min-height: 138px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  box-shadow: 0 10px 28px rgba(18, 32, 39, 0.05);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tool-card:hover {
  border-color: rgba(13, 148, 136, 0.38);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.muted-card {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.64);
}

.tool-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.tool-icon.muted {
  color: var(--muted);
  background: var(--surface-muted);
}

.tool-copy {
  display: grid;
  gap: 3px;
}

.tool-copy strong {
  font-size: 20px;
  line-height: 1.25;
}

.tool-copy span:last-child {
  color: var(--muted);
  font-size: 14px;
}

.tool-topline,
.eyeline {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.card-arrow {
  color: var(--accent-strong);
}

.panel {
  box-shadow: var(--shadow);
}

.home-panel {
  display: grid;
  gap: 28px;
  padding: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

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

.button-primary {
  color: #ffffff;
  background: var(--accent-strong);
}

.button-primary:hover {
  background: #0b665f;
}

.tool-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.tool-summary {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.tool-summary h1 {
  margin-bottom: 0;
  font-size: 46px;
}

.mini-note {
  display: grid;
  gap: 4px;
  padding: 16px;
  color: var(--muted);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.mini-note strong {
  color: var(--text);
}

.workflow-panel {
  padding: 28px;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.stepper li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-muted);
}

.stepper li.active {
  color: var(--text);
  border-color: rgba(13, 148, 136, 0.36);
  background: var(--accent-soft);
}

.stepper span {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.stepper strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert {
  margin-bottom: 16px;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 650;
}

.alert-error {
  color: var(--danger);
  background: var(--danger-soft);
}

.alert-success {
  color: var(--success);
  background: var(--accent-soft);
}

.upload-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: stretch;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.drop-zone {
  display: grid;
  min-height: 126px;
  align-content: center;
  justify-items: start;
  gap: 8px;
  border: 1px dashed #b8c7ce;
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  background: #fbfcfd;
}

.drop-zone svg {
  width: 26px;
  height: 26px;
  color: var(--accent-strong);
}

.drop-title {
  color: var(--text);
  font-weight: 800;
}

.drop-copy {
  color: var(--muted);
  font-size: 14px;
}

.upload-box input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-box .button {
  align-self: end;
  min-width: 138px;
}

.sheet-section {
  display: grid;
  gap: 18px;
  padding-top: 28px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.sheet-form {
  display: grid;
  gap: 18px;
}

.sheet-list {
  display: grid;
  gap: 10px;
}

.sheet-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  cursor: pointer;
}

.sheet-option:hover {
  border-color: rgba(13, 148, 136, 0.42);
}

.sheet-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-strong);
}

.sheet-option span {
  display: grid;
  min-width: 0;
}

.sheet-option strong {
  overflow-wrap: anywhere;
}

.sheet-option small {
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  display: grid;
  min-height: 180px;
  place-items: center;
  gap: 8px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: #fbfcfd;
}

.empty-state svg {
  width: 34px;
  height: 34px;
  color: var(--accent-strong);
}

.empty-state strong {
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 34px;
  color: var(--muted);
  font-size: 13px;
}

.error-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.error-panel {
  max-width: 520px;
  padding: 30px;
}

.error-panel h1 {
  margin-bottom: 22px;
  font-size: 28px;
}

@media (max-width: 860px) {
  .nav-wrap,
  .page-shell,
  .site-footer {
    width: min(100% - 28px, 1120px);
  }

  .nav-wrap {
    height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .home-grid,
  .tool-layout {
    grid-template-columns: 1fr;
  }

  .tool-summary {
    position: static;
  }

  .stepper,
  .upload-box {
    grid-template-columns: 1fr;
  }

  .upload-box .button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .page-shell {
    padding-top: 34px;
  }

  h1,
  .tool-summary h1 {
    font-size: 34px;
  }

  .workflow-panel,
  .home-panel {
    padding: 20px;
  }

  .tool-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .card-arrow {
    display: none;
  }
}
