/* Notice board styles, on top of the product theme's tokens.css (load that first, then any
   theme-overrides.css, then this file). Colours come only from the tokens. */
:root { --white: #ffffff; }

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--page);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main.wrap { flex: 1; width: 100%; }

a { color: var(--brand); }
img { max-width: 100%; }
code { background: var(--panel); border: 1px solid var(--rule); padding: 0 4px; border-radius: var(--radius); font-size: 0.9em; }
.muted { color: var(--muted); }

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 16px; }

/* ---- Title bar ---- */
.titlebar { background: var(--brand); border-bottom: 3px solid var(--accent); color: var(--white); }
.titlebar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; }
.brand-emblem { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-heading); font-weight: 700; font-size: 1.35rem; letter-spacing: 0.08em; }
.brand-sub { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-brand-muted); }
.titlebar-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.titlebar-nav a, .titlebar-nav button {
  color: var(--white); text-decoration: none; font: inherit; font-size: 0.9rem;
  background: none; border: 0; padding: 6px 12px; border-radius: var(--radius); cursor: pointer;
}
.titlebar-nav a:hover, .titlebar-nav button:hover { background: rgba(255, 255, 255, 0.1); }
.titlebar-nav a.active { box-shadow: inset 0 -2px 0 var(--accent); }
.titlebar-nav form { margin: 0; }

main.wrap { padding-top: 24px; padding-bottom: 48px; }
.site-footer { border-top: 1px solid var(--rule); background: var(--white); color: var(--muted); font-size: 0.8rem; letter-spacing: 0.04em; padding: 14px 0; }

/* ---- Page heading ---- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px;
             border-bottom: 1px solid var(--rule); padding-bottom: 12px; margin-bottom: 18px; }
.crumbs { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.crumbs b { color: var(--brand); font-weight: 600; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.crumbs-standalone { margin-bottom: 14px; }
h1 { font-family: var(--font-heading); font-weight: 600; font-size: 1.85rem; line-height: 1.2; color: var(--brand-dark); margin: 4px 0 4px; }
.page-head p { color: var(--muted); margin: 0; }
h3 { font-family: var(--font-heading); font-weight: 600; font-size: 1.15rem; color: var(--brand-dark);
     border-bottom: 1px solid var(--rule); padding-bottom: 6px; margin: 28px 0 14px; }
h4 { font-family: var(--font-heading); font-weight: 600; font-size: 1.05rem; color: var(--brand-dark); margin: 0 0 4px; }
.empty { color: var(--muted); text-align: center; padding: 48px 0; border: 1px dashed var(--rule); border-radius: var(--radius); background: var(--white); }

/* ---- Buttons ---- */
.button {
  display: inline-block; border: 1px solid var(--brand); border-radius: var(--radius); padding: 8px 16px;
  background: var(--brand); color: var(--white); font: inherit; font-size: 0.92rem; font-weight: 600;
  text-decoration: none; cursor: pointer; line-height: 1.3;
}
.button:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.button-secondary { background: var(--white); color: var(--brand); border-color: var(--rule); }
.button-secondary:hover { background: var(--panel); border-color: var(--rule); }
.button-small { padding: 5px 10px; font-size: 0.85rem; }
.button-block { width: 100%; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; text-decoration: underline; }
.danger { color: var(--danger); }

/* ---- Tags & statuses ---- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
       padding: 1px 7px; border: 1px solid var(--rule); border-radius: var(--radius); color: var(--muted); background: var(--white); }
.tag-pin { border-color: var(--accent); background: var(--accent-soft); color: var(--warn); }
.tag-direct { border-color: #b9c4d6; background: #eef2f8; color: var(--brand); }
.status { font-size: 0.8rem; font-weight: 600; padding: 2px 8px; border-radius: var(--radius); }
.status-live { background: var(--ok-soft); color: var(--ok); }
.status-expired { background: var(--danger-soft); color: var(--danger); }

/* ---- Category tabs (ruled) ---- */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--rule); margin-bottom: 18px; }
.tabs a { flex: none; padding: 8px 14px; border: 1px solid transparent; border-bottom: none; border-radius: var(--radius) var(--radius) 0 0;
          text-decoration: none; color: var(--muted); font-size: 0.92rem; margin-bottom: -1px; }
.tabs a:hover { color: var(--brand); }
.tabs a.active { background: var(--white); border-color: var(--rule); color: var(--brand); font-weight: 600; box-shadow: inset 0 2px 0 var(--brand); }

/* ---- Notice list (cards with a date block) ---- */
.notice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.notice-card { background: var(--white); border: 1px solid var(--rule); border-top: 3px solid var(--brand); border-radius: var(--radius); }
.notice-card.pinned { border-top-color: var(--accent); }
.notice-card:hover { border-color: #b4bfcc; border-top-color: var(--brand); }
.notice-card.pinned:hover { border-top-color: var(--accent); }
.notice-card a { display: flex; gap: 16px; padding: 14px 16px; color: inherit; text-decoration: none; }
.date-block { flex: none; width: 58px; text-align: center; border: 1px solid var(--rule); border-radius: var(--radius); align-self: flex-start; overflow: hidden; }
.date-day { display: block; font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--brand-dark); line-height: 1.1; padding-top: 6px; }
.date-month { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand); }
.date-year { display: block; font-size: 0.68rem; color: var(--muted); background: var(--panel); border-top: 1px solid var(--rule); margin-top: 4px; padding: 1px 0; }
.notice-card-body { min-width: 0; flex: 1; }
.notice-card h2 { font-family: var(--font-heading); font-weight: 600; font-size: 1.15rem; color: var(--brand-dark); margin: 4px 0 2px; overflow-wrap: anywhere; }
.snippet { margin: 4px 0 0; color: #3a4554; white-space: pre-line; overflow-wrap: anywhere; }
.meta { color: var(--muted); font-size: 0.82rem; margin: 6px 0 0; }

/* ---- Full notice ---- */
.notice-full { background: var(--white); border: 1px solid var(--rule); border-top: 3px solid var(--brand); border-radius: var(--radius); padding: 24px; }
.notice-full-head { border-bottom: 1px solid var(--rule); padding-bottom: 14px; }
.notice-full h1 { margin-top: 8px; overflow-wrap: anywhere; }
.notice-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 10px 0 0; }
.notice-facts dt { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.notice-facts dd { margin: 0; font-size: 0.92rem; }
.notice-full .body { white-space: pre-wrap; margin: 18px 0 0; overflow-wrap: anywhere; font-size: 1rem; }
.file-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.file-list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; color: var(--text); background: var(--white); }
.file-list a:hover { background: var(--panel); }
.file-name { flex: 1; overflow-wrap: anywhere; }
.file-open { color: var(--brand); font-weight: 600; font-size: 0.88rem; flex: none; }
.file-kind { flex: none; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; color: var(--white); background: var(--danger); padding: 3px 6px; border-radius: var(--radius); }
.images { display: grid; gap: 10px; }
.images img { width: 100%; display: block; border: 1px solid var(--rule); border-radius: var(--radius); }
.notice-full-foot { display: flex; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--rule); margin-top: 24px; padding-top: 16px; }

/* ---- Alerts ---- */
.alert { padding: 10px 14px; border: 1px solid; border-left-width: 4px; border-radius: var(--radius); margin-bottom: 16px; font-size: 0.92rem; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-error { background: var(--danger-soft); border-color: #e2b8b4; border-left-color: var(--danger); color: #6e211c; }
.alert-ok { background: var(--ok-soft); border-color: #bcd6c1; border-left-color: var(--ok); color: #234f2b; }
.alert-warn { background: var(--accent-soft); border-color: #e6d6a8; border-left-color: var(--accent); color: #5e4610; }

/* ---- Cards & forms ---- */
.card { background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; }
.card-ruled { border-top: 3px solid var(--brand); }
.form-card { border-top: 3px solid var(--brand); padding: 4px 24px 24px; }
.form-card h3:first-child { margin-top: 16px; }
.field { display: grid; align-content: start; gap: 5px; margin-bottom: 14px; }
.field-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.field-label em { color: var(--danger); font-style: normal; }
.field-help { font-size: 0.82rem; color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.field-row { display: grid; align-items: start; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
input, select, textarea { font: inherit; font-size: 0.95rem; color: var(--text); padding: 8px 10px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--white); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgb(var(--brand-rgb) / 0.25); border-color: var(--brand); }
input[type="file"] { padding: 6px; background: var(--panel); }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; }
.check input { width: auto; margin: 0; }
.file-table { border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 14px; display: grid; gap: 8px; }
.file-row img { width: 44px; height: 44px; object-fit: cover; border: 1px solid var(--rule); border-radius: var(--radius); }
.file-row a { overflow-wrap: anywhere; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--rule); margin-top: 22px; padding-top: 18px; }
.form-stack { display: grid; gap: 2px; margin-top: 16px; }
.inline-form { display: flex; gap: 8px; align-items: center; margin: 0; flex-wrap: wrap; }
.inline-form input { max-width: 300px; flex: 1; }
.login-box { max-width: 400px; margin: 24px auto; }
.login-box h1 { margin-bottom: 0; }

/* ---- Admin: stats, register table ---- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { background: var(--white); border: 1px solid var(--rule); border-top: 3px solid var(--brand); border-radius: var(--radius); padding: 12px 16px; }
.stat:nth-child(2) { border-top-color: var(--accent); }
.stat:nth-child(3) { border-top-color: var(--rule); }
.stat-value { display: block; font-family: var(--font-heading); font-size: 1.7rem; font-weight: 700; color: var(--brand-dark); line-height: 1.1; }
.stat-label { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.register { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--rule); font-size: 0.92rem; }
.register th { background: #e8ecf2; color: var(--brand-dark); text-align: left; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--rule); }
.register td { padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.nowrap { white-space: nowrap; }
.register tbody tr:hover { background: #fafbfc; }
.register tr.is-expired td { color: var(--muted); }
.row-title { font-weight: 600; text-decoration: none; color: var(--brand-dark); overflow-wrap: anywhere; }
.row-title:hover { text-decoration: underline; }
.row-sub { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; font-size: 0.82rem; }
.col-actions { text-align: right; }
.actions { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: flex-end; font-size: 0.88rem; }
.actions form { margin: 0; }
.register-compact td { vertical-align: middle; }
.qr-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.qr-card > div:first-child { flex: 1 1 320px; }
.qr-card p { margin: 0; }
.qr-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.error-page { text-align: center; padding: 48px 0; }

/* ---- Phones ---- */
@media (max-width: 720px) {
  h1 { font-size: 1.5rem; }
  .notice-full { padding: 18px; }
  .notice-card a { gap: 12px; padding: 12px; }
  .date-block { width: 50px; }
  .register, .register tbody, .register tr, .register td { display: block; width: 100%; }
  .register thead { display: none; }
  .register { border: 0; background: none; }
  .register tr { background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: 10px; }
  .register td { border-bottom: 1px solid #eceff3; padding: 8px 12px; }
  .register td:last-child { border-bottom: 0; }
  .register td[data-label]::before { content: attr(data-label); display: block; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
  .register td:first-child::before { display: none; }
  .register td[data-label="Category"], .register td[data-label="Published"], .register td[data-label="Status"] {
    display: inline-block; width: auto; border-bottom: 0; padding-right: 18px; vertical-align: top; }
  .register td[data-label="Actions"] { border-top: 1px solid #eceff3; }
  .col-actions { text-align: left; }
  .actions { justify-content: flex-start; }
}

@media (min-width: 640px) {
  .images { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Poster (A4 print) ---- */
.poster-body { background: var(--white); display: block; }
.poster-toolbar { display: flex; gap: 10px; justify-content: center; padding: 16px; }
.poster { max-width: 180mm; margin: 0 auto 24px; border: 1px solid var(--rule); border-top: 0; text-align: center; }
.poster-band { display: flex; align-items: center; justify-content: center; gap: 14px; background: var(--brand); border-bottom: 4px solid var(--accent); color: var(--white); padding: 8mm 10mm; text-align: left;
               -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.poster-emblem { width: 18mm; height: 18mm; }
.poster-logo { max-height: 22mm; background: var(--white); padding: 2mm; border-radius: var(--radius); }
.poster-college { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; letter-spacing: 0.08em; line-height: 1.1; }
.poster-kicker { font-size: 0.9rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--on-brand-muted); }
.poster-main { padding: 10mm 12mm 12mm; }
.poster-heading { font-family: var(--font-heading); font-size: 2.2rem; color: var(--brand-dark); margin: 0 0 6mm; overflow-wrap: anywhere; }
.poster-qr { width: 115mm; max-width: 100%; height: auto; image-rendering: pixelated; border: 1px solid var(--rule); padding: 3mm; }
.poster-sub { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 600; color: var(--brand); margin: 6mm 0 2mm; }
.poster-url { color: var(--muted); font-size: 0.95rem; letter-spacing: 0.02em; overflow-wrap: anywhere; margin: 0; }

@media print {
  @page { size: A4; margin: 10mm; }
  .poster-toolbar { display: none; }
  .poster { margin: 0 auto; }
}

/* Setup & settings */
input[type="color"] { height: 40px; padding: 3px; cursor: pointer; }
.input-short { max-width: 160px; }
.logo-current img { max-height: 80px; max-width: 240px; display: block; }
