@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0b0f17;
  --surface: #131a27;
  --surface-2: #1a2332;
  --border: #1e293b;
  --border-strong: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-dim: #64748b;
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.14);
  --sky: #38bdf8;
  --sky-dim: rgba(56, 189, 248, 0.12);
  --success: #34d399;
  --danger: #f87171;
  --radius: 14px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 50px rgba(0, 0, 0, 0.35);
  --font: 'Inter', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% -15%, rgba(245, 158, 11, 0.14), transparent),
    radial-gradient(ellipse 40% 30% at 100% 80%, rgba(56, 189, 248, 0.06), transparent);
  pointer-events: none;
  z-index: 0;
}

.ws-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 15, 23, 0.88);
  backdrop-filter: blur(10px);
}

.ws-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ws-logo {
  font-weight: 700;
  color: var(--amber);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.ws-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ws-nav a, .ws-nav button.link {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
}

.ws-nav a:hover, .ws-nav button.link:hover { color: var(--text); background: rgba(255,255,255,0.04); }

main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.ws-loading {
  text-align: center;
  color: var(--muted);
  padding: 64px 20px;
}

.ws-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  margin-bottom: 32px;
  align-items: start;
}

@media (max-width: 860px) {
  .ws-hero { grid-template-columns: 1fr; }
}

.ws-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
}

.ws-eyebrow span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2);
}

.ws-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.ws-sub {
  color: var(--muted);
  margin: 0 0 20px;
  max-width: 52ch;
}

.ws-sub strong { color: var(--text); font-weight: 600; }

.ws-quota-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.ws-quota-card h2 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-dim);
}

.ws-quota-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  font-size: 14px;
}

.ws-quota-row .val { font-weight: 700; color: var(--amber); font-size: 18px; }

.ws-meter {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin: 12px 0 8px;
}

.ws-meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber), #fbbf24);
  width: 0%;
  transition: width 0.4s ease;
}

.ws-quota-foot { font-size: 12px; color: var(--muted-dim); margin: 0; }

.ws-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

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

.ws-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.ws-step-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber);
  margin-bottom: 6px;
}

.ws-step h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.ws-step p { margin: 0; font-size: 13px; color: var(--muted); }

.ws-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .ws-layout { grid-template-columns: 1fr; }
}

.ws-section-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin: 0 0 14px;
}

.ws-actions { display: grid; gap: 12px; }

.ws-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: border-color 0.15s, transform 0.15s;
}

.ws-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.ws-card.featured {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.08), var(--surface) 45%);
}

.ws-card.pro {
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.06), var(--surface) 50%);
}

.ws-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
}

.ws-card.featured h3 { color: var(--amber); }
.ws-card.pro h3 { color: var(--sky); }

.ws-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

.ws-card .cta {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--amber);
}

.ws-card.pro .cta { color: var(--sky); }

.ws-sidebar { display: grid; gap: 14px; }

.ws-template {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.ws-template h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.ws-template p {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.ws-dl {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ws-dl a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
}

.ws-dl a.primary {
  background: var(--amber);
  color: #0b0f17;
  border-color: transparent;
}

.ws-dl a:hover { filter: brightness(1.05); }

.ws-cols {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 12px;
}

.ws-cols .req { color: var(--amber); font-weight: 600; }

.ws-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 8px;
}

@media (max-width: 520px) {
  .ws-links { grid-template-columns: 1fr; }
}

.ws-link-tile {
  display: block;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.ws-link-tile span { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }

.ws-notice {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: var(--amber-dim);
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.ws-notice strong { color: var(--text); }

.ws-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--muted-dim);
}

.ws-path-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

@media (max-width: 860px) {
  .ws-path-grid { grid-template-columns: 1fr; }
}

.ws-path {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}

.ws-path:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.ws-path.recommended {
  border-color: rgba(149, 191, 71, 0.45);
  background: linear-gradient(160deg, rgba(149, 191, 71, 0.1), var(--surface) 55%);
}

.ws-path-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #95bf47;
  margin-bottom: 8px;
}

.ws-path h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
}

.ws-path p {
  margin: 0;
  flex: 1;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.ws-path-cta {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--amber);
}

.ws-path.recommended .ws-path-cta { color: #95bf47; }

.ws-format-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.ws-format-tags span {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}

/* Import page */
.ws-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 20px;
}

.ws-back:hover { color: var(--amber); }

.ws-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.ws-panel label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.ws-file {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px dashed var(--border-strong);
  background: var(--bg);
  color: var(--muted);
  margin-bottom: 16px;
}

button.ws-btn {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: var(--amber);
  color: #0b0f17;
}

button.ws-btn:disabled { opacity: 0.65; cursor: wait; }

button.ws-btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  margin-top: 10px;
}

.ws-err { color: var(--danger); font-size: 14px; margin-bottom: 12px; }
.ws-ok { color: var(--success); font-size: 14px; margin-bottom: 12px; }

.ws-pre {
  font-family: var(--mono);
  font-size: 11px;
  overflow: auto;
  max-height: 260px;
  background: var(--bg);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

[hidden] { display: none !important; }
