/* GCSWA shell: the one set of tokens, header, footer and base components for every page on the apps site.
   Palette from the GCSWA emblem: red #ed1c24, charcoal #231f20, white. Change tokens here, not in an app. */
:root {
  --accent: #ed1c24;
  --accent-ink: #ffffff;
  --red-dark: #b8141b;
  --ink: #231f20;
  --muted: #5f5b5c;
  --line: #dcd8d9;
  --panel: #f7f5f5;
  --warn: #7a4a00;
  --warn-bg: #fff4e0;
  --bad: #9b1c1c;
  --bad-bg: #fde8e8;
  --ok-bg: #e8f5ea;
  --focus: #1f5fbf;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; display: flex; flex-direction: column; min-height: 100vh; background: #fff; color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
a { color: var(--red-dark); }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 28px 20px 40px; flex: 1; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 8px; }

/* Header */
.site-top { background: #fff; border-bottom: 4px solid var(--accent); }
.site-top .bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand .emblem { height: 40px; width: auto; display: block; }
.brand .wordmark { font-weight: 700; font-size: 17px; }
.app-name { font-weight: 600; color: var(--ink); padding-left: 14px; border-left: 1px solid var(--line); }
.env { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.me { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); min-width: 0; }
.me[hidden] { display: none; }
.me .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.subnav { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 24px; border-top: 1px solid var(--line); }
.subnav a { padding: 12px 14px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; }
.subnav a:hover { border-bottom-color: var(--accent); }
.envbar { background: var(--warn-bg); color: var(--warn); padding: 6px 24px; font-size: 13px; }
.site-foot { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; padding: 16px 24px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* Components */
.panel { padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.notice { padding: 12px 14px; border-radius: 6px; margin: 12px 0; }
.notice.err { background: var(--bad-bg); color: var(--bad); }
.notice.ok { background: var(--ok-bg); }
label { display: block; font-size: 14px; color: var(--muted); margin: 14px 0 6px; }
input, select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; color: var(--ink); background: #fff; border: 1px solid #c9c4c5; border-radius: 6px; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); }
button, .button { min-height: 46px; padding: 10px 18px; font: inherit; font-weight: 600; color: var(--accent-ink); background: var(--accent); border: 0; border-radius: 6px; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .button:hover { background: var(--red-dark); }
button:disabled { opacity: .55; cursor: not-allowed; }
button.secondary { background: #fff; color: var(--ink); border: 1px solid #c9c4c5; }
button.secondary:hover { background: var(--panel); }

@media (max-width: 600px) {
  .site-top .bar { padding: 12px 16px; }
  .app-name { border-left: 0; padding-left: 0; }
  .me { margin-left: 0; width: 100%; justify-content: space-between; }
  .me .who { max-width: 60%; }
  .subnav { padding: 0 12px; }
  .wrap { padding: 22px 16px 36px; }
  h1 { font-size: 22px; }
}
