:root { --blue:#477EF7; --black:#111; --grey:#6b7280; --line:#e5e7eb; --bg:#f5f6f8; --ok:#16a34a; --err:#dc2626; }
* { box-sizing:border-box; }
body { margin:0; font-family:'Montserrat',Arial,sans-serif; background:var(--bg); color:var(--black); font-size:15px; line-height:1.5; }
.wrap { max-width:1100px; margin:0 auto; padding:0 24px; }
main.wrap { padding-top:32px; padding-bottom:60px; }
h1 { font-size:26px; font-weight:700; margin:0 0 6px; }
h2 { font-size:17px; font-weight:600; margin:0 0 14px; }
a { color:var(--blue); text-decoration:none; }
.muted { color:var(--grey); }

.top { background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.04); }
.top .wrap { display:flex; align-items:center; justify-content:space-between; height:60px; }
.brand { font-weight:700; color:var(--black); letter-spacing:.3px; }
.top nav a { color:var(--grey); margin-left:24px; font-weight:500; }
.top nav a.on, .top nav a:hover { color:var(--blue); }

.card { background:#fff; border-radius:0; box-shadow:0 2px 14px rgba(0,0,0,.045); padding:24px; margin-bottom:20px; display:block; color:inherit; border-left:3px solid transparent; transition:border-color .2s, background .2s; }
.pagehead { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; margin-bottom:24px; }
.back { font-size:13px; }
.tick { color:var(--grey); font-size:14px; }

.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:20px; }
.wfcard:hover { border-left-color:var(--blue); }
.wfcard-head { display:flex; justify-content:space-between; align-items:center; }
.wfcard p { color:var(--grey); margin:0 0 14px; }
dl { display:grid; grid-template-columns:110px 1fr; gap:4px 10px; margin:0; font-size:14px; }
dt { color:var(--grey); }
dd { margin:0; }

.pill { font-size:12px; padding:2px 10px; background:var(--line); color:var(--grey); font-weight:600; }
.pill.on { background:var(--blue); color:#fff; }
.st { display:inline-block; font-size:12px; font-weight:600; padding:1px 8px; }
.st.ok { background:#e8f6ee; color:var(--ok); }
.st.err { background:#fdeaea; color:var(--err); }
.st.run { background:#eaf0fe; color:var(--blue); }

.btn { font-family:inherit; font-size:14px; font-weight:600; padding:10px 18px; border:1px solid var(--line); background:#fff; color:var(--black); cursor:pointer; border-radius:0; }
.btn:hover { border-color:var(--blue); color:var(--blue); }
.btn.primary { background:var(--blue); border-color:var(--blue); color:#fff; }
.btn.primary:hover { background:#3567d8; color:#fff; }
.btn:disabled { opacity:.6; cursor:wait; }
button.link { background:none; border:0; color:var(--blue); cursor:pointer; font:inherit; text-decoration:underline; }

label { display:block; font-size:13px; font-weight:600; color:var(--grey); margin-bottom:14px; }
input[type=text], input[type=password], input[type=number], select, textarea {
  display:block; width:100%; margin-top:5px; font-family:inherit; font-size:14px; padding:10px 12px;
  border:1px solid var(--line); border-radius:0; background:#fff; color:var(--black); }
input:focus, select:focus, textarea:focus { outline:none; border-color:var(--blue); }
textarea { resize:vertical; min-height:220px; line-height:1.5; }
.mono { font-family:Consolas,monospace; font-size:13px; }

.fields { display:grid; grid-template-columns:1fr 1fr; gap:0 20px; }
.fields.three { grid-template-columns:2fr 1fr 1fr; }
.areahead { display:flex; justify-content:space-between; align-items:center; }
.areahead h2 { margin:0; }
.result { font-size:14px; font-weight:600; min-height:0; margin:10px 0 6px; }
.area.good { border-left-color:var(--ok); background:#f3fbf6; }
.area.good .result { color:var(--ok); }
.area.good .result::before { content:'✓ '; }
.area.bad { border-left-color:var(--err); background:#fef5f5; }
.area.bad .result { color:var(--err); }
.savebar { margin-bottom:28px; }

.row { display:flex; align-items:center; gap:28px; flex-wrap:wrap; margin-bottom:14px; }
.row label.inline { margin:0; display:flex; align-items:center; gap:10px; }
.row label.inline input { width:110px; margin:0; }
.switch { display:flex; align-items:center; gap:10px; margin:0; color:var(--black); cursor:pointer; }
.switch input { display:none; }
.switch span { width:42px; height:22px; background:var(--line); position:relative; transition:.2s; }
.switch span::after { content:''; position:absolute; width:16px; height:16px; top:3px; left:3px; background:#fff; transition:.2s; }
.switch input:checked + span { background:var(--blue); }
.switch input:checked + span::after { left:23px; }

.chain { display:flex; align-items:stretch; flex-wrap:wrap; gap:10px; }
.box { border:1px solid var(--line); padding:12px 16px; min-width:150px; max-width:220px; background:#fff; font-weight:500; font-size:14px; }
.box small { display:block; color:var(--grey); font-size:11px; text-transform:uppercase; letter-spacing:.5px; margin-bottom:3px; }
.box.trigger { border-color:var(--blue); background:#f2f6fe; }
.arrow { align-self:center; color:var(--blue); font-size:20px; font-weight:700; }

.run { border-top:1px solid var(--line); }
.run summary { cursor:pointer; padding:10px 0; display:flex; gap:14px; align-items:center; list-style:none; font-size:14px; }
.run summary::-webkit-details-marker { display:none; }
.run .time { color:var(--grey); white-space:nowrap; }
.run .src { color:var(--grey); font-size:12px; }
.run table { width:100%; border-collapse:collapse; font-size:13px; margin:0 0 12px; }
.run td { padding:6px 8px; border-top:1px solid #f1f2f4; vertical-align:top; }
.run td.step { font-weight:600; white-space:nowrap; }

.flash { padding:12px 16px; margin-bottom:20px; font-weight:500; background:#e8f6ee; color:var(--ok); border-left:3px solid var(--ok); }
.flash.err { background:#fdeaea; color:var(--err); border-left-color:var(--err); }
.flash.warn { background:#fff7e6; color:#a16207; border-left-color:#eab308; }
.login { max-width:420px; margin:60px auto; }

@media (max-width:700px) { .fields, .fields.three { grid-template-columns:1fr; } .pagehead { flex-direction:column; align-items:flex-start; } }
