:root {
  --bg: #f5f7fb;
  --panel: #fff;
  --line: #dbe2ef;
  --text: #172033;
  --muted: #5b6578;
  --accent: #2f67ff;
  --accent-soft: #eef3ff;
  --ok: #0c8f57;
  --warn: #c77700;
  --danger: #cc2f2f;
  --shadow: 0 12px 30px rgba(18, 31, 54, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: .85rem .95rem; background: #fff;
}
textarea { resize: vertical; }
button {
  border: 0; border-radius: 999px; background: var(--accent); color: #fff; padding: .8rem 1.1rem; cursor: pointer;
}
button.secondary { background: var(--accent-soft); color: var(--accent); }
.header {
  position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; gap: 1rem; align-items: start;
  padding: 1rem 1.2rem; border-bottom: 1px solid rgba(219,226,239,.9); background: rgba(245,247,251,.93); backdrop-filter: blur(10px);
}
.header nav { display: flex; gap: .8rem; flex-wrap: wrap; }
.eyebrow { font-size: .82rem; color: var(--accent); text-transform: uppercase; font-weight: 700; letter-spacing: .04em; }
.layout {
  width: min(1260px, calc(100vw - 1.2rem)); margin: 0 auto; padding: 1rem 0 2rem;
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem;
}
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 1.1rem; }
.stack { display: grid; gap: .8rem; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two-col .full { grid-column: 1 / -1; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.row { display: flex; gap: .8rem; flex-wrap: wrap; }
.align-end { align-items: end; }
.one-line { display: flex; gap: .8rem; align-items: end; }
.top-gap { margin-top: 1rem; }
label { display: grid; gap: .35rem; color: var(--muted); font-size: .94rem; }
.card { border: 1px solid var(--line); border-radius: 14px; padding: .9rem; background: #fff; }
.message { margin-top: .8rem; padding: .85rem 1rem; border-radius: 12px; background: #edf3ff; color: #23488f; }
.message.ok { background: #ebf8f1; color: var(--ok); }
.message.warn { background: #fff5e8; color: var(--warn); }
.message.error { background: #ffefef; color: var(--danger); }
.muted { color: var(--muted); }
.pill { display: inline-flex; padding: .3rem .65rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .85rem; margin-right: .4rem; margin-bottom: .4rem; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: .7rem; }
.stat { border: 1px solid var(--line); border-radius: 14px; padding: .8rem; }
.stat .k { font-size: .82rem; color: var(--muted); }
.stat .v { font-size: 1.25rem; font-weight: 700; }
.progress { margin-top: .8rem; height: 12px; border-radius: 999px; background: #e7eefc; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg,#2f67ff,#7096ff); width: 0%; }
pre.output { white-space: pre-wrap; word-break: break-word; border: 1px solid var(--line); border-radius: 12px; padding: .8rem; margin: 0; background: #0f172a; color: #dbe8ff; }
ul.tight { margin: .35rem 0 0; padding-left: 1.1rem; }
@media (max-width: 980px) {
  .layout, .grid-2, .two-col { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .header { flex-direction: column; }
}

.hero-copy { margin: .35rem 0 0; color: var(--muted); }
.inline-form { grid-template-columns: 240px auto; align-items: end; }
@media (max-width: 980px) { .inline-form { grid-template-columns: 1fr; } }


.header nav a.active { background: var(--accent); color: #fff; padding: .45rem .8rem; border-radius: 999px; text-decoration: none; }
.page-layout { width: min(980px, calc(100vw - 1.2rem)); margin: 0 auto; padding: 1rem 0 2rem; display: grid; gap: 1rem; }
.page-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.hero-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 1.4rem; }
.phase-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; margin-top: 1rem; }
.phase-card { display: grid; gap: .55rem; padding: 1rem; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.phase-card h3 { margin: 0; font-size: 1rem; }
.phase-card p { margin: 0; color: var(--muted); }
.phase-card .actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .2rem; }
.phase-card .actions a { display: inline-flex; align-items: center; justify-content: center; padding: .7rem .9rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; text-decoration: none; }
.phase-card .actions a.primary { background: var(--accent); color: #fff; }
.page-lead { margin: .25rem 0 0; color: var(--muted); }
.section-title { margin: 0 0 .35rem; }
.subtle-list { margin: .4rem 0 0; padding-left: 1.1rem; color: var(--muted); }
@media (max-width: 980px) {
  .page-grid, .phase-grid { grid-template-columns: 1fr; }
}

.hint { margin: -.25rem 0 0; color: var(--muted); font-size: .86rem; }
