/* Tattoo Freeze look: steel blue, white heavy caps, red top rule. No web fonts (offline). */
:root {
  --blue: #4f7aa8;
  --blue-dark: #3d6390;
  --blue-deep: #2c4a6e;
  --ink: #ffffff;
  --ink-soft: rgba(255,255,255,.78);
  --line: rgba(255,255,255,.28);
  --red: #e0371f;
  --ok: #7ee2a0;
  --gold: #f2c14e; --silver: #d9dee5; --bronze: #d38a4f;
  --head: "Avenir Next Condensed", "Futura", "Helvetica Neue", "Arial Narrow", "Arial", sans-serif;
  --body: "Avenir Next", "Futura", "Helvetica Neue", "Segoe UI", "Arial", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; } /* never scroll the whole page sideways */
body {
  margin: 0; min-height: 100vh; background: var(--blue); color: var(--ink);
  font: 17px/1.4 var(--body); border-top: 5px solid var(--red);
  padding-top: env(safe-area-inset-top); /* home-screen app: keep clear of the status bar */
  overflow-x: hidden;
}
a { color: var(--ink); text-underline-offset: 3px; }
h1, h2, h3, .caps { font-family: var(--head); font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(44px, 8vw, 104px); line-height: .92; }
h2 { font-size: clamp(26px, 3.4vw, 38px); }
h3 { font-size: 18px; letter-spacing: .01em; }

/* header */
/* One page width for every page, so the header lines up with the content below it. */
:root { --page: 1120px; --gutter: 24px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px var(--gutter); flex-wrap: wrap;
  max-width: var(--page); margin: 0 auto; } /* lines up with the page content on wide screens */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--head); font-weight: 900;
  text-transform: uppercase; font-size: 26px; line-height: .9; }
.logo .bar { width: 3px; align-self: stretch; background: var(--ink); }
.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.menu-btn { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; font-size: 17px; }
.burger, .burger::before, .burger::after { display: block; width: 20px; height: 2px; background: currentColor; position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; } .burger::after { top: 6px; }
.menu-open .burger { background: transparent; }
.menu-open .burger::before { top: 0; transform: rotate(45deg); } .menu-open .burger::after { top: 0; transform: rotate(-45deg); }
.top { position: relative; }
.nav a { font-family: var(--head); font-weight: 800; font-size: 21px; text-decoration: none; }
.nav a[aria-current] { text-decoration: underline; }
.wrap { padding: 8px var(--gutter) 48px; max-width: var(--page); margin: 0 auto; }

/* controls */
button, .btn, select, input, textarea { font: inherit; color: inherit; }
button, .btn {
  min-height: 48px; padding: 0 20px; border: 2px solid var(--ink); background: transparent; border-radius: 0;
  font-family: var(--head); font-weight: 800; text-transform: uppercase; font-size: 18px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
button.primary, .btn.primary { background: var(--ink); color: var(--blue-deep); }
button.danger { border-color: var(--red); background: var(--red); }
button:disabled { opacity: .35; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
input, select, textarea {
  width: 100%; min-height: 52px; padding: 10px 14px; background: var(--blue-dark); border: 2px solid var(--line);
  border-radius: 0; font-size: 18px; -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
input::placeholder, textarea::placeholder { color: rgba(255,255,255,.5); }
input[type=checkbox], input[type=radio] { -webkit-appearance: auto; appearance: auto; width: 22px; height: 22px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--gold); cursor: pointer; }
label { display: block; font-family: var(--head); font-weight: 800; text-transform: uppercase; font-size: 15px; margin: 18px 0 6px; letter-spacing: .03em; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.msg { min-height: 1.4em; font-weight: 600; }
.msg.ok { color: var(--ok); } .msg.err { color: #ffd0c8; background: var(--red); padding: 4px 10px; display: inline-block; }
.muted { color: var(--ink-soft); }
.card { background: var(--blue-dark); padding: 20px; }
.pill { display: inline-block; padding: 2px 10px; border: 2px solid var(--ink); font-family: var(--head); font-weight: 800; text-transform: uppercase; font-size: 13px; }
.pill.red { background: var(--red); border-color: var(--red); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-family: var(--head); text-transform: uppercase; font-size: 14px; letter-spacing: .04em; }
.ph { background: var(--blue-deep) center/cover no-repeat; display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-family: var(--head); font-weight: 800; text-transform: uppercase; }
.hidden { display: none !important; }
.giveaway { background: var(--blue-deep); border-left: 5px solid var(--gold); padding: 16px 18px; min-width: 0; }
.giveaway .gv-head b { overflow-wrap: anywhere; }
.giveaway .row > input { min-width: 0; }
.giveaway .gv-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.giveaway .gv-head .caps { color: var(--gold); font-size: 14px; letter-spacing: .08em; }
.giveaway .gv-head b { font-family: var(--head); text-transform: uppercase; font-size: 24px; line-height: 1.05; }
.giveaway ol { margin: 10px 0 12px; padding-left: 20px; font-size: 15px; }
.giveaway input { min-height: 46px; font-size: 16px; }
.giveaway .gv-check { display: flex; gap: 10px; align-items: flex-start; text-transform: none; font-family: var(--body); font-weight: 500; font-size: 14px; letter-spacing: 0; margin: 10px 0 0; }
.giveaway .gv-check input { width: 20px; min-height: 20px; flex: 0 0 20px; margin: 1px 0 0; }
.giveaway button { margin-top: 12px; }
.giveaway .gv-tc { font-size: 13px; color: var(--ink-soft); margin-top: 10px; white-space: pre-line; }
.followbar { display: flex; flex-wrap: nowrap; gap: 14px; align-items: center; background: var(--blue-dark); padding: 10px 16px; min-width: 0; }
.followbar .caps { font-size: 14px; letter-spacing: .06em; color: var(--gold); white-space: nowrap; flex: 0 0 auto; }
.followbar .icons { display: flex; gap: 6px; flex: 0 0 auto; }
.followbar .icons a { display: grid; place-items: center; width: 36px; height: 36px; border: 1.5px solid var(--line); }
.followbar .icons a:hover { border-color: var(--ink); }
.followbar .icons svg { width: 20px; height: 20px; }
.followbar .tags { display: flex; gap: 10px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; min-width: 0;
  mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
.followbar .tags::-webkit-scrollbar { display: none; }
.followbar .ht { color: var(--ink-soft); font-size: 14px; text-decoration: none; }
.followbar .ht:hover { color: var(--ink); text-decoration: underline; }

/* phones: one-line menu under the logo, and swipeable button rows instead of stacked ones */
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .top { padding-top: 14px; padding-bottom: 14px; gap: 12px; }
  .chips, .tabs, .days, .seg { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; }
  .chips::-webkit-scrollbar, .tabs::-webkit-scrollbar, .days::-webkit-scrollbar, .seg::-webkit-scrollbar { display: none; }
  .chips > *, .tabs > *, .days > *, .seg > * { flex: 0 0 auto; white-space: nowrap; }
  .seg { margin: 0; padding: 0; width: 100%; } .seg > * { flex: 1 0 auto; }
  .tabs #backup { margin-left: 0 !important; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .grid .tile .t { font-size: 15px; } .grid .tile .info { padding: 8px 10px 10px; }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .ctile h2 { font-size: 18px !important; } .ctile .tx { padding: 10px 12px 12px !important; font-size: 14px; }
}

/* phones and portrait tablets: a Menu button opens a full-width list with big tap targets */
@media (max-width: 900px) {
  .top { flex-wrap: nowrap; }
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 20; flex-direction: column; gap: 0;
    background: var(--blue-deep); border-top: 2px solid var(--line); box-shadow: 0 14px 30px rgba(0,0,0,.35);
    padding: 6px max(16px, env(safe-area-inset-left, 0px)) 12px; }
  .top.menu-open .nav { display: flex; }
  .nav a { font-size: 22px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .nav a[aria-current] { text-decoration: none; color: var(--gold); }
}

/* Simple app header: only three links, so always show them (no menu button). */
.top.simple .nav { display: flex !important; position: static; flex-direction: row; gap: 18px; background: none; padding: 0; border: 0; box-shadow: none; }
.top.simple .nav a { font-size: 19px; padding: 0; border: 0; }
.top.simple .nav a[aria-current] { color: inherit; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 3px; }
@media (max-width: 480px) { .top.simple .nav { gap: 14px; } .top.simple .nav a { font-size: 16px; } }

/* Page title row used on staff pages: title left, context right, on one line */
.pagehead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 12px 0 4px; padding-bottom: 14px; border-bottom: 2px solid var(--line); }
.pagehead h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1; }
.pagehead .ctx { font-family: var(--head); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 15px;
  border: 2px solid var(--ink); padding: 6px 12px; }

/* Header logo: the uploaded image, or a placeholder box until one is set */
.brand { display: flex; align-items: center; min-height: 56px; }
.brand img { display: block; max-height: 64px; max-width: 240px; width: auto; height: auto; }
.logo-ph { display: grid; place-items: center; width: 150px; height: 56px; border: 2px dashed var(--line); color: var(--ink-soft);
  font-family: var(--head); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 14px; }
@media (max-width: 480px) { .brand img { max-height: 48px; max-width: 160px; } .logo-ph { width: 110px; height: 44px; font-size: 12px; } }

/* "Logged in as" badge in the header */
.top.simple .nav .who { align-self: center; font-family: var(--head); font-weight: 800; text-transform: uppercase; font-size: 13px;
  letter-spacing: .06em; padding: 5px 10px; border: 2px solid currentColor; white-space: nowrap; }
.who.admin { color: var(--gold); }
.who.judge { color: var(--ok); }
@media (max-width: 480px) { .top.simple .nav .who { font-size: 11px; padding: 3px 6px; } }
