/* Westcool App Feedback */
:root {
  --ink: #1d2733;
  --muted: #5b6775;
  --line: #dde3ea;
  --bg: #f4f6f9;
  --card: #ffffff;
  --brand: #0b5394;
  --brand-dark: #083c6b;
  --high: #b42318;
  --med: #b54708;
  --low: #3b6e3b;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}
a { color: var(--brand); }
h1 { font-size: 1.5rem; margin: 1.4rem 0 .6rem; }
h2 { font-size: 1.05rem; margin: 0 0 .8rem; }
h3 { font-size: .95rem; margin: 1.4rem 0 .5rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.thin { font-weight: 400; font-size: 1rem; }
.nowrap { white-space: nowrap; }

/* Header */
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}
.brand strong { display: block; font-size: .95rem; }
.brand-sub { display: block; color: var(--muted); font-size: .8rem; }
nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
nav a { padding: 6px 10px; border-radius: 6px; text-decoration: none; color: var(--ink); }
nav a.on, nav a:hover { background: var(--bg); color: var(--brand); }
form.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px 10px; font: inherit; }
button.link:hover { color: var(--brand); }

/* Cards and forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.narrow { max-width: 440px; margin: 40px auto; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } }
label, .label { display: block; font-weight: 600; font-size: .85rem; margin: 12px 0 4px; }
input, select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid #c5ced8; border-radius: 6px;
  font: inherit; color: inherit; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc3e8; border-color: var(--brand); }
textarea { resize: vertical; }
input.code { font-size: 1.5rem; letter-spacing: .3em; text-align: center; }
button {
  font: inherit; padding: 8px 14px; border-radius: 6px; border: 1px solid #c5ced8;
  background: #fff; cursor: pointer;
}
button:hover { border-color: var(--brand); }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; margin-top: 16px; }
button.primary:hover { background: var(--brand-dark); }
button.danger { color: var(--high); }
.flash { background: #fff8e6; border: 1px solid #f3d48a; border-radius: var(--radius); padding: 4px 14px; margin-top: 16px; }
.tag { display: inline-block; background: #e8f1fa; color: var(--brand-dark); border-radius: 999px; padding: 2px 10px; font-size: .85rem; margin: 0 0 4px; }
.quote { background: var(--bg); border-left: 3px solid var(--brand); padding: 8px 12px; margin: 0; border-radius: 0 6px 6px 0; }
.text { white-space: pre-wrap; margin-top: 0; }
.mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: .82rem; white-space: pre-wrap; word-break: break-word; }

/* Lists */
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tabs { gap: 2px; }
.tabs a { font-size: .9rem; }
table.list { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.list th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #fafbfc; }
table.list th, table.list td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
.prio, .status, .pill { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.prio-high { background: #fde8e6; color: var(--high); }
.prio-medium { background: #fdf0e1; color: var(--med); }
.prio-low { background: #e8f3e8; color: var(--low); }
.status { background: #eef1f4; color: var(--muted); }
.status-new { background: #e8f1fa; color: var(--brand-dark); }
.status-looking-at-it { background: #fdf0e1; color: var(--med); }
.status-fixed { background: #e8f3e8; color: var(--low); }
.pill { background: #eef1f4; color: var(--muted); font-weight: 500; }
.pill-created, .pill-added-to-existing { background: #e8f3e8; color: var(--low); }
.pill-review, .pill-error, .pill-held { background: #fdf0e1; color: var(--med); }

dl.facts { display: grid; grid-template-columns: 130px 1fr; gap: 4px 12px; margin: 0 0 8px; }
dl.facts dt { color: var(--muted); font-size: .85rem; }
dl.facts dd { margin: 0; word-break: break-word; }
details.records { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
details.records summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.record { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 10px; }
.record-head { display: flex; gap: 10px; align-items: center; font-size: .85rem; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
ul.history { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
ul.history li { padding: 4px 0; border-bottom: 1px dashed var(--line); }

/* Settings */
.row-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.row-form input:not([type=checkbox]) { width: auto; flex: 1 1 180px; }
label.tick { display: inline-flex; align-items: center; gap: 5px; margin: 0; font-weight: 400; white-space: nowrap; }
label.tick input { width: auto; }
table.people td { vertical-align: middle; }

.foot { color: var(--muted); font-size: .8rem; padding: 24px 20px 40px; }
@media (max-width: 560px) {
  dl.facts { grid-template-columns: 1fr; gap: 0; }
  dl.facts dd { margin-bottom: 6px; }
  table.list { display: block; overflow-x: auto; }
}
.app-filter select { width: auto; min-width: 220px; }
.tabs { margin: 0 0 12px; }
table.list td:first-child { white-space: nowrap; }
.tag { margin-top: 8px; }
