/* Flow Tools — Flow visual identity: navy, blue, sky, lemon accent, Work Sans. */
@font-face { font-family: "Work Sans"; src: url("/assets/fonts/worksans.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
	--navy: #18233E; --blue: #05426C; --indigo: #2A3187; --sky: #62B2E3; --lemon: #DEE061;
	--text: #353D40; --muted: #6E787C; --bg: #F9F9F9; --card: #FFFFFF; --line: #E4E8EB;
	--ok: #1E8E5A; --warn: #B7791F; --bad: #C0392B;
	--side: 264px; --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 "Work Sans", -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--blue); }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 6px; color: var(--navy); font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: 17px; margin: 0 0 14px; color: var(--navy); font-weight: 600; }
.lead { margin: 0 0 26px; color: var(--muted); max-width: 70ch; }
.crumb { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--blue); font-weight: 600; margin-bottom: 6px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .hidden { display: none; }
.pre { white-space: pre-wrap; word-break: break-word; }

/* sidebar */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--navy); color: #C9D2E3; display: flex; flex-direction: column; overflow-y: auto; z-index: 20; }
.brand, .auth-brand { display: flex; align-items: baseline; gap: 8px; padding: 26px 24px 22px; text-decoration: none; }
.logo { font-size: 30px; font-weight: 700; color: #fff; letter-spacing: -.03em; line-height: 1; }
.brand-sub { font-size: 13px; text-transform: uppercase; letter-spacing: .16em; color: var(--lemon); font-weight: 600; }
.side nav { flex: 1; padding: 4px 12px 16px; }
.navlink, .navtool, .navsec > summary { display: block; padding: 9px 12px; border-radius: 8px; color: #C9D2E3; text-decoration: none; cursor: pointer; }
.navlink { font-weight: 600; margin-bottom: 8px; }
.navsec { margin-bottom: 2px; }
.navsec > summary { list-style: none; font-size: 12px; text-transform: uppercase; letter-spacing: .09em; font-weight: 600; color: #8C99B5; display: flex; justify-content: space-between; align-items: center; }
.navsec > summary::-webkit-details-marker { display: none; }
.navsec > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.navsec[open] > summary::after { transform: rotate(45deg); }
.navsec[open] > summary { color: #fff; }
.navtool { padding-left: 22px; font-size: 14.5px; }
.navlink:hover, .navtool:hover, .navsec > summary:hover { background: rgba(255,255,255,.07); color: #fff; }
.navlink.on, .navtool.on { background: rgba(98,178,227,.16); color: #fff; box-shadow: inset 3px 0 0 var(--lemon); }
.navsec.admin { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.1); }
.side-foot { padding: 16px 24px 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }
.side-foot a { color: var(--sky); text-decoration: none; } .side-foot a:hover { text-decoration: underline; }
.who { color: #fff; font-weight: 600; margin-bottom: 4px; } .who small { display: block; font-weight: 400; color: #8C99B5; overflow-wrap: anywhere; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }

/* main */
.main { margin-left: var(--side); padding: 40px 44px 80px; max-width: calc(var(--side) + 1180px); }
.main.solo { margin: 0 auto; max-width: none; padding: 0; min-height: 100vh; display: grid; place-items: center; background: var(--navy) url("/assets/waves.webp") right center / auto 100% no-repeat; }
.auth { background: #fff; width: min(420px, calc(100vw - 32px)); padding: 34px 34px 28px; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.auth-brand { padding: 0 0 20px; } .auth-brand .logo { color: var(--navy); } .auth-brand .brand-sub { color: var(--blue); }
.auth h1 { font-size: 22px; margin-bottom: 16px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; }
.card.narrow { max-width: 520px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; } .card-head h2 { margin: 0; }
.sec { margin-bottom: 34px; } .sec > h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .09em; color: var(--blue); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.tile { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; text-decoration: none; color: var(--text); border-top: 3px solid var(--sky); transition: transform .12s, box-shadow .12s, border-color .12s; }
.tile strong { display: block; color: var(--navy); font-size: 16.5px; margin-bottom: 6px; font-weight: 600; }
.tile span { color: var(--muted); font-size: 14px; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(24,35,62,.1); border-top-color: var(--lemon); }

/* forms */
.form label { display: block; font-weight: 600; font-size: 13.5px; color: var(--navy); margin-bottom: 14px; }
.form input:not([type=checkbox]), .form select, .form textarea, input.copy { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; color: var(--text); background: #fff; border: 1px solid #CBD3D9; border-radius: 8px; }
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--sky); }
.form.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; align-items: end; }
.form.cols > div, .form.cols .presets, .form.cols .full { grid-column: 1 / -1; }
.form.row { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; } .form.row label { margin-bottom: 0; } .grow { flex: 1; min-width: 240px; }
.form label.check { font-weight: 400; display: flex; gap: 8px; align-items: center; color: var(--text); }
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 16px; }
input.copy { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: #F3F6F8; }

.btn { display: inline-block; padding: 10px 18px; font: inherit; font-weight: 600; font-size: 14.5px; border: 1px solid #CBD3D9; background: #fff; color: var(--navy); border-radius: 8px; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { border-color: var(--navy); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; } .btn.primary:hover { background: var(--blue); border-color: var(--blue); }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn.danger { color: var(--bad); } .btn.danger:hover { border-color: var(--bad); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.busy { opacity: .7; pointer-events: none; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .actions form { margin: 0; }

/* feedback */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; border: 1px solid; overflow-wrap: anywhere; }
.alert.ok { background: #EAF6EF; border-color: #B9DFC9; color: #14573A; }
.alert.warn { background: #FBF4E2; border-color: #EBD9A6; color: #6E4A0E; }
.alert.err { background: #FBEAE8; border-color: #EDC0BA; color: #7F241B; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #E9EDF0; color: #4A5560; white-space: nowrap; }
.pill.ok { background: #DDF1E5; color: #14573A; } .pill.warn { background: #F8ECC9; color: #6E4A0E; } .pill.bad { background: #F6D9D5; color: #7F241B; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: #B8C2C9; }
.dot.ok { background: var(--ok); } .dot.warn { background: #E0A526; } .dot.bad { background: var(--bad); } .dot.info { background: var(--sky); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--sky); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font-size: 28px; line-height: 1.1; color: var(--navy); font-weight: 600; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.stat.good { border-left-color: var(--ok); } .stat.bad { border-left-color: var(--bad); } .stat.warnc { border-left-color: #E0A526; }

/* tables */
.scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl.compact td { padding: 6px 10px; font-size: 13px; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.tbl tr.spam td { background: #FDF1EF; }
.tbl.checks td:first-child { width: 1%; white-space: nowrap; }

.altlist { display: grid; gap: 14px; margin-bottom: 16px; }
.altrow { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: start; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.altrow img { width: 150px; height: 104px; object-fit: cover; border-radius: 6px; background: #EEF1F3; display: block; }
.altrow textarea { width: 100%; margin-top: 6px; padding: 9px 11px; font: inherit; border: 1px solid #CBD3D9; border-radius: 8px; resize: vertical; }

/* run wizard */
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 0; margin: 0 0 20px; counter-reset: s; }
.steps li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: 14px; }
.steps b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #E1E6EA; color: #5A656C; font-size: 12.5px; }
.steps li.on { color: var(--navy); } .steps li.on b { background: var(--navy); color: var(--lemon); }
.steps li.done b { background: var(--ok); color: #fff; }
.runbar .actions { gap: 8px; margin-bottom: 10px; } .runbar p { margin: 6px 0 0; }
.runprogress { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; font-weight: 600; color: var(--navy); }
.runprogress.hidden { display: none; } .runprogress.err { color: var(--bad); }
.runprogress progress { flex: 0 1 320px; height: 10px; accent-color: var(--blue); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tabs a.on { color: var(--navy); border-bottom-color: var(--navy); } .tabs small { font-weight: 400; }
.runlist { display: grid; gap: 14px; }
.runrow { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.runrow.skipped { opacity: .5; }
.runcard { min-width: 0; overflow-wrap: anywhere; } .runcard img { width: 100%; max-height: 220px; object-fit: contain; border-radius: 6px; background: #EEF1F3; display: block; margin-bottom: 8px; }
.runfields { min-width: 0; }
.runfields label { display: block; font-weight: 600; font-size: 13px; color: var(--navy); margin-bottom: 10px; }
.runfields textarea, .regen input, .tbl.kw input:not([type=checkbox]) { display: block; width: 100%; margin-top: 5px; padding: 9px 11px; font: inherit; color: var(--text); border: 1px solid #CBD3D9; border-radius: 8px; resize: vertical; background: #fff; }
.runfields textarea[readonly] { background: #F3F6F8; }
.count { font-weight: 400; color: var(--muted); margin-left: 6px; font-variant-numeric: tabular-nums; } .count.over { color: var(--bad); font-weight: 600; } .count.under { color: var(--warn); }
.why { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.regen { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; } .regen input { margin: 0; font-size: 13.5px; padding: 6px 10px; } .regen .btn { white-space: nowrap; }
.runmeta { display: flex; gap: 8px 10px; flex-wrap: wrap; align-items: center; } .runmeta .check { font-weight: 400; margin: 0 0 0 auto; display: flex; gap: 6px; align-items: center; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px; }
.pager a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; background: #fff; font-weight: 600; font-size: 13.5px; }
.pager a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.serp { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; font-family: Arial, sans-serif; }
.serp-url { font-size: 12px; color: #4D5156; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp-title { font-size: 18px; line-height: 1.3; color: #1A0DAB; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.serp-desc { font-size: 13px; line-height: 1.5; color: #4D5156; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.before { margin-top: 8px; font-size: 13px; } .before summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.before dl { margin: 8px 0 0; } .before dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); } .before dd { margin: 0 0 8px; }
.tbl.kw td { min-width: 150px; } .tbl.kw td:first-child { min-width: 220px; } .tbl.kw td:nth-child(4), .tbl.kw td:nth-child(5) { min-width: 0; } .tbl.kw small { display: block; margin-top: 4px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px 4px; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 0 22px; }
legend { font-weight: 600; font-size: 13.5px; color: var(--navy); padding: 0 6px; }
.form fieldset label.check { margin-bottom: 10px; }
@media (max-width: 900px) { .runrow { grid-template-columns: 1fr; } .runmeta .check { margin-left: 0; } }

textarea.comment { display: block; width: 100%; padding: 10px 12px; font: 13.5px/1.5 ui-monospace, Menlo, Consolas, monospace; color: var(--text); background: #F3F6F8; border: 1px solid #CBD3D9; border-radius: 8px; resize: vertical; }
#maint details summary { cursor: pointer; color: var(--blue); font-weight: 600; } #maint details[open] { min-width: 420px; } #maint details .tbl { margin: 10px 0; }
.oldurl { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; } .oldurl strong { display: block; color: var(--navy); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; }

/* mobile */
.navtoggle, .burger { display: none; }
@media (max-width: 900px) {
	.side { transform: translateX(-100%); transition: transform .2s; }
	.navtoggle:checked ~ .side { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
	.burger { display: flex; flex-direction: column; gap: 5px; position: fixed; top: 14px; left: 14px; z-index: 30; padding: 10px; background: var(--navy); border-radius: 8px; cursor: pointer; }
	.burger span { width: 20px; height: 2px; background: #fff; }
	.main { margin-left: 0; padding: 70px 18px 60px; }
	h1 { font-size: 25px; }
	.altrow { grid-template-columns: 96px 1fr; } .altrow img { width: 96px; height: 72px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.tbl tr.junk td { background: #FDF8E8; }
