/* SWS Accessibility Auditor */
:root {
  --accent: #14532d;
  --accent-light: #e7f3ec;
  --ink: #1a202c;
  --muted: #5a6472;
  --line: #dde3ea;
  --bg: #f4f6f8;
  --card: #ffffff;
  --crit: #b91c1c;
  --seri: #c2540a;
  --mod: #a16207;
  --min: #52606d;
  --ok: #15803d;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 15px/1.55 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink); background: var(--bg);
}
a { color: var(--accent); }
h1 { font-size: 1.5rem; margin: 0 0 .35rem; }
h2 { font-size: 1.15rem; margin: 1.6rem 0 .6rem; }
h1 + .sub { color: var(--muted); margin: 0 0 1.2rem; }
code, .snippet { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .85em; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff; padding: .6rem 1rem; z-index: 99; }
.skip-link:focus { left: 0; }

.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 210px; flex: 0 0 210px; background: var(--accent); color: #fff;
  display: flex; flex-direction: column; padding: 1.1rem .9rem;
}
.brand { display: flex; gap: .6rem; align-items: center; margin-bottom: 1.4rem; }
.brand-mark { font-size: 1.7rem; }
.brand-name { font-weight: 700; line-height: 1.15; letter-spacing: .02em; }
.sidebar ul { list-style: none; margin: 0; padding: 0; flex: 1; }
.sidebar li a {
  display: block; color: #e6efe9; text-decoration: none; padding: .5rem .7rem;
  border-radius: 7px; margin-bottom: .15rem;
}
.sidebar li a:hover, .sidebar li a:focus { background: rgba(255,255,255,.14); color: #fff; }
.sidebar-foot { font-size: .85rem; color: #cfe0d6; display: flex; justify-content: space-between; gap: .5rem; }
.sidebar-foot a { color: #fff; }

.content { flex: 1; padding: 1.6rem 2rem 3rem; max-width: 1200px; }
.content-center { max-width: 460px; margin: 8vh auto; }

.flash { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; background: var(--accent-light); border: 1px solid var(--accent); }
.flash-err { background: #fdecec; border-color: var(--crit); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; margin: 0 0 1.4rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1.1rem; }
.card .num { font-size: 1.7rem; font-weight: 700; }
.card .lbl { color: var(--muted); font-size: .85rem; }
.card.warn .num { color: var(--crit); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.3rem; margin-bottom: 1.3rem; }

table.list { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
table.list th, table.list td { text-align: left; padding: .55rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { background: #eef1f4; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.list tr:last-child td { border-bottom: 0; }
table.list tr:hover td { background: #fafbfc; }
td.num, th.num { text-align: right; }

.grade { display: inline-block; min-width: 2.1em; text-align: center; font-weight: 700; border-radius: 7px; padding: .1em .35em; color: #fff; }
.grade-a { background: var(--ok); }
.grade-b { background: #4d7c0f; }
.grade-c { background: var(--mod); }
.grade-d { background: var(--seri); }
.grade-f { background: var(--crit); }
.grade-none { background: #9aa4af; }

.sev { display: inline-block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
       padding: .12em .5em; border-radius: 6px; color: #fff; white-space: nowrap; }
.sev-critical { background: var(--crit); }
.sev-serious { background: var(--seri); }
.sev-moderate { background: var(--mod); }
.sev-minor { background: var(--min); }

.btn {
  display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: .55rem 1rem; font-size: .95rem; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover, .btn:focus { filter: brightness(1.15); }
.btn.secondary { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
.btn.danger { background: var(--crit); }
.btn.small { padding: .3rem .7rem; font-size: .85rem; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: .8rem 0; }
form.inline { display: inline; }

label { display: block; font-weight: 600; margin: .9rem 0 .25rem; }
input[type=text], input[type=url], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; max-width: 480px; padding: .5rem .65rem; border: 1px solid #b8c2cc; border-radius: 7px;
  font: inherit; background: #fff;
}
textarea { min-height: 90px; }
.hint { color: var(--muted); font-size: .85rem; margin-top: .2rem; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 1rem; }
legend { font-weight: 700; padding: 0 .4rem; }

.snippet { display: block; background: #f2f4f6; border: 1px solid var(--line); border-radius: 7px;
           padding: .5rem .7rem; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }

.progress-wrap { background: #e5eaee; border-radius: 9px; height: 18px; overflow: hidden; margin: .6rem 0; }
.progress-bar { background: var(--accent); height: 100%; width: 0; transition: width .4s; }

.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }
.filters select, .filters input { width: auto; }

.check-item { border-bottom: 1px solid var(--line); padding: .8rem 0; }
.check-item:last-child { border-bottom: 0; }
.check-item .how { color: var(--muted); font-size: .9rem; margin: .25rem 0 .5rem; }
.check-controls { display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; }
.check-controls label { display: inline-flex; gap: .3rem; align-items: center; margin: 0; font-weight: 400; }
.check-controls input[type=text] { flex: 1; min-width: 220px; max-width: none; }
.status-pass { color: var(--ok); font-weight: 700; }
.status-fail { color: var(--crit); font-weight: 700; }

.spark { vertical-align: middle; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt0 { margin-top: 0; }

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar { width: auto; flex: none; }
  .sidebar ul { display: flex; flex-wrap: wrap; }
  .content { padding: 1rem; }
}
