/* Shared styles for the Team Toolkit: brand colors, layout, cards, form controls
   and buttons. Each tool adds its own stylesheet on top of this one. */

:root {
  /* Silly Squared brand: #D4E0FF and black. */
  --brand: #d4e0ff;
  --brand-tint: #eef3ff;
  --bg: var(--brand);
  --card: #ffffff;
  --text: #000000;
  --muted: #555a66;
  --border: #c3cbe0;
  --divider: #e4e9f5;
  --accent: #000000;
  --accent-hover: #333333;
  --error: #b42323;
  --error-bg: #fbeaea;
  --focus: #000000;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

h1 { font-size: 28px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 16px; }
.lede { color: var(--muted); margin: 0 0 24px; }

/* --- Site header: logo (links home) and, on tool pages, a link back to all tools. */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.site-header .logo img { display: block; height: 34px; width: auto; }
.site-header .back { color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; }
.site-header .back:hover { text-decoration: underline; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 540px) { .row { grid-template-columns: 1fr; } }

.note { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.status { color: var(--muted); font-size: 14px; min-height: 1.5em; }

/* --- Form controls */
label > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }

input[type="number"], input[type="date"], input[type="text"] {
  width: 100%;
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}
input[type="radio"], input[type="checkbox"] { accent-color: var(--accent); }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
input.invalid { border-color: var(--error); background: var(--error-bg); }

.choice { border: 0; margin: 0 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.choice legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; padding: 0; }
.choice label { display: flex; gap: 6px; align-items: center; font-size: 15px; cursor: pointer; }

.errors {
  background: var(--error-bg);
  border: 1px solid #efc4c4;
  color: #7a1f1f;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}
.errors ul { margin: 6px 0 0; padding-left: 20px; }

/* --- Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

button {
  font: inherit;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  font-weight: 600;
}
button:hover { background: var(--accent-hover); }
button:disabled { opacity: 0.6; cursor: progress; }

button.link {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 4px 6px;
  font-weight: 500;
  text-decoration: underline;
}
button.link:hover { color: var(--text); background: none; }

a.button {
  display: inline-block;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 600;
}
a.button:hover { background: var(--accent); color: #fff; }
