/* Colors from arizona.edu (Arizona Bootstrap): blue #0C234B, red #AB0520 */
:root {
  --az-blue: #0C234B;
  --az-red: #AB0520;
  --az-red-dark: #8B0015;
  --midnight: #001C48;
  --cool-gray: #E2E9EB;
  --bg: #F4F6F8;
  --text: #1E1E1E;
  --muted: #5A6472;
  --border: #D8DEE4;
}
* { box-sizing: border-box; }
/* Keep the hidden attribute working on elements that set their own display (e.g. .toolbar) */
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: "Proxima Nova", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 20px; }

/* White bar: the Coit logo has navy text and is designed for a white background */
.masthead { background: #fff; border-bottom: 4px solid var(--az-red); }
.masthead-inner { padding-block: 14px; }
.logo { height: 48px; max-width: 100%; display: block; }

.hero { background: linear-gradient(135deg, var(--az-blue), var(--midnight)); color: #fff; padding-block: 48px 56px; }
.hero h1 { margin: 0 0 8px; font-size: 2.4rem; }
.hero p { margin: 0 0 24px; font-size: 1.1rem; opacity: .85; }
#search {
  width: 100%; max-width: 560px; padding: 14px 18px; font-size: 1rem;
  border: 0; border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.25);
}

main.wrap { padding-top: 28px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding-bottom: 16px; }
#count { color: var(--muted); font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border); background: #fff; color: var(--az-blue);
  padding: 6px 14px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .9rem;
}
.chip:hover { border-color: var(--az-blue); }
.chip.on { background: var(--az-blue); border-color: var(--az-blue); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; padding-bottom: 48px; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: 0 8px 24px rgba(12,35,75,.14); transform: translateY(-2px); }
.card-head { display: flex; gap: 14px; align-items: center; }
.badge {
  flex: none; width: 52px; height: 52px; border-radius: 10px; color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 1.15rem;
}
.card h2 { margin: 0; font-size: 1.15rem; color: var(--az-blue); }
.logo-badge { background: #fff; border: 1px solid var(--border); padding: 5px; }
.logo-badge img { width: 100%; height: 100%; object-fit: contain; display: block; }
.org { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.desc { margin: 0; line-height: 1.5; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { background: var(--cool-gray); color: var(--az-blue); font-size: .78rem; padding: 3px 10px; border-radius: 999px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 14px; }
.status { font-size: .8rem; font-weight: 600; }
.status::before { content: "● "; }
.status.live { color: #1F7A4D; }
.status.beta { color: #B86A00; }
.status.source { color: var(--muted); }
.btn {
  background: var(--az-red); color: #fff; text-decoration: none; font-weight: 600;
  padding: 8px 16px; border-radius: 6px; font-size: .92rem;
}
.btn:hover { background: var(--az-red-dark); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

footer { background: var(--az-blue); color: #fff; font-size: .88rem; padding-block: 20px; opacity: .95; }

/* Category cards (top level) and breadcrumb */
.crumbs { margin-bottom: 16px; color: var(--muted); font-size: .95rem; }
.crumbs a { color: var(--az-blue); font-weight: 600; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { margin-inline: 6px; }
.crumbs strong { color: var(--text); }
.cat { color: inherit; text-decoration: none; padding: 28px; }
.cat h2 { font-size: 1.4rem; }
.cat-icon {
  width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center;
  background: var(--az-blue); color: #fff;
}
.cat-icon svg { width: 30px; height: 30px; }
.cat-foot { border-top: 1px solid var(--border); padding-top: 14px; font-weight: 600; color: var(--az-red); }
.cat .arrow { display: inline-block; transition: transform .15s; }
.cat:hover .arrow { transform: translateX(4px); }
.cat.disabled { cursor: default; opacity: .6; }
.cat.disabled:hover { box-shadow: none; transform: none; }
.cat.disabled .cat-icon { background: var(--muted); }
.cat.disabled .cat-foot { color: var(--muted); }
.card { position: relative; }
.cat .stretch { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }

/* ---------- Admin mode (/admin) ---------- */
.admin-bar { background: #FFF4D6; border-bottom: 1px solid #E8D18A; color: #5A4300; font-size: .92rem; }
.admin-bar-inner { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; padding-block: 10px; }
.admin-links { display: flex; gap: 18px; align-items: center; }
.admin-links a, .link-btn { color: var(--az-blue); font-weight: 600; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
.danger-text { color: var(--az-red); }

.card-tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; z-index: 2; }
.icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer;
  background: #fff; color: var(--az-blue); border: 1px solid var(--border); border-radius: 8px;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover:not(:disabled) { background: var(--az-blue); color: #fff; border-color: var(--az-blue); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.card:has(> .card-tools) { padding-top: 52px; }

.add-card {
  align-items: center; justify-content: center; min-height: 220px; cursor: pointer; font: inherit;
  border: 2px dashed var(--border); background: transparent; color: var(--muted); font-weight: 600; font-size: 1rem;
}
.add-card .plus { font-size: 2.6rem; line-height: 1; font-weight: 300; }
.add-card:hover { border-color: var(--az-blue); color: var(--az-blue); background: #fff; }

.edit-card { gap: 12px; border: 2px solid var(--az-blue); }
.edit-card:hover { transform: none; }
.edit-card h2 { font-size: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; font-weight: 600; color: var(--az-blue); }
.field em { color: var(--az-red); font-style: normal; }
.field input, .field textarea, .field select {
  font: inherit; font-weight: 400; color: var(--text); padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 6px; background: #fff; width: 100%;
}
.field input[type="color"] { padding: 2px; height: 38px; width: 70px; }
.field textarea { resize: vertical; }
.field small { font-weight: 400; color: var(--muted); }
.form-errors { background: #FDECEC; border: 1px solid #F2868B; color: #8B0015; border-radius: 6px; padding: 10px 12px; font-size: .9rem; }
.edit-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
button.btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: .92rem; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.secondary { background: #fff; color: var(--az-blue); border: 1px solid var(--border); }
.btn.secondary:hover { background: var(--cool-gray); }
.btn.danger { background: var(--az-red-dark); }
.btn.small { padding: 4px 10px; font-size: .85rem; margin-left: 8px; }

.notice { background: #FDECEC; border: 1px solid #F2868B; color: #8B0015; border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }
.notice.ok { background: #EFFAF4; border-color: #8FD6B2; color: #0F6540; }

.history { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px 20px; margin-bottom: 20px; }
.history-head { display: flex; justify-content: space-between; align-items: center; }
.history h2 { margin: 0; font-size: 1.1rem; color: var(--az-blue); }
.history ol { list-style: none; margin: 12px 0 0; padding: 0; max-height: 320px; overflow-y: auto; }
.history li { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--border); font-size: .9rem; }
.history .when { color: var(--muted); min-width: 170px; }
.history .what { flex: 1; min-width: 200px; }
.history .current { color: #0F6540; font-weight: 600; }

/* Coming-soon status and disabled buttons (e.g. data not released yet) */
.status.soon { color: var(--muted); }
.btn:disabled, .btn:disabled:hover { background: var(--muted); }
.card-foot { gap: 10px; flex-wrap: wrap; }
.card-foot .btn, .card-foot .status { white-space: nowrap; }
.field-note { color: var(--muted); font-size: .85rem; }

/* Editable hero title and tagline (admin) */
.hero .site-btn { display: inline-grid; vertical-align: middle; margin-left: 6px; width: 28px; height: 28px; }
.site-form { max-width: 720px; margin-bottom: 24px; }
.site-form-title { margin-bottom: 12px; }
.site-form input, .site-form textarea {
  width: 100%; font: inherit; font-size: 1.05rem; padding: 10px 12px; border: 0; border-radius: 8px; resize: vertical;
}
.site-form-title input { font-size: 1.6rem; font-weight: 700; }
.site-form .btn.secondary { border-color: transparent; }
