/* Officer hub: resources section (public/js/hub/resources.js). Club accounts, tools, rules, college
   offices and how the hub works. Tokens and shared pieces come from app.css and hub.css. */

.hub-section-resources .hub-icon { flex: none; display: block; }

/* Discord is where we talk, the socials show, this site works. One color each, used on the strip
   and on the account cards. */
.res-tone-talk { --tone: var(--accent); }
.res-tone-show { --tone: var(--warn); }
.res-tone-work { --tone: var(--free); }

.res-where-list {
  list-style: none; margin: 0 0 18px; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
}
.res-where {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  border-top: 3px solid var(--tone);
}
.res-where-icon, .res-card-icon, .res-rule-icon, .res-step-icon {
  flex: none; display: grid; place-items: center;
  border-radius: 12px; color: var(--tone, var(--accent));
  background: var(--surface-2);
  background: color-mix(in srgb, var(--tone, var(--accent)) 14%, transparent);
}
.res-where-icon { width: 42px; height: 42px; }
.res-where-text { display: grid; gap: 1px; min-width: 0; font-size: 14px; color: var(--muted); }
.res-where-text strong { color: var(--text); font-size: 15px; }

.res-jump {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0 0 8px; padding: 10px 0 14px; border-bottom: 1px solid var(--line);
}
.res-jump a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-size: 14px; font-weight: 650; text-decoration: none;
}
.res-jump a:hover { color: var(--text); border-color: var(--accent); }

.res-section { padding-top: 26px; scroll-margin-top: 84px; }
.res-section:focus { outline: none; }
.res-section-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; margin-bottom: 12px; }
.res-section-head h3 { margin: 0; font-size: 18px; }
.res-section-head .hint { margin: 0; }

.res-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px;
}
.res-card {
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.res-tool, .res-office { --tone: var(--accent); }
.res-grid.res-offices { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.res-card-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.res-card-icon { width: 44px; height: 44px; }
.res-card-name { min-width: 0; }
.res-card-name h4 { margin: 0; font-size: 16px; }
.res-handle { margin: 1px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.res-what { flex: 1 1 auto; margin: 0; color: var(--muted); font-size: 14px; }
.res-what p { margin: 0 0 6px; }
.res-what p:last-child { margin-bottom: 0; }
.res-what .hint { font-size: 13px; }
.res-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.res-card-actions .btn { gap: 6px; }
.res-copy { color: var(--muted); }
.res-copy:hover { color: var(--text); }
.res-locked {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px;
  color: var(--muted); font-size: 13px; font-weight: 650;
}
.res-email { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.res-office .res-card-actions { margin-top: auto; }

.res-rules {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.res-rule {
  --tone: var(--accent);
  display: flex; gap: 14px; min-width: 0;
  padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.res-rule.is-warn { --tone: var(--warn); }
.res-rule.is-wide { grid-column: 1 / -1; --tone: var(--free); }
.res-rule-icon { width: 40px; height: 40px; }
.res-rule-body { min-width: 0; }
.res-rule-body h4 { margin: 2px 0 6px; font-size: 16px; }
.res-rule-body p { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.res-rule-body p:last-child { margin-bottom: 0; }
.res-rule.is-wide .res-rule-body { flex: 1; }
.res-phrases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 4px 0 10px; }
.res-phrase {
  display: grid; align-content: start; gap: 4px; min-width: 0;
  padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line);
}
.res-phrase-label { font-size: 11px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.res-phrase-text { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.res-phrase.is-motto .res-phrase-text { color: var(--free); font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.res-rule-body p.res-warn { display: flex; align-items: center; gap: 6px; color: var(--warn); font-weight: 650; }

.res-hub {
  padding: 18px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.res-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
.res-steps li { display: flex; align-items: flex-start; gap: 12px; }
.res-steps p { margin: 6px 0 0; }
.res-step-icon { --tone: var(--accent); width: 34px; height: 34px; border-radius: 10px; }
.res-credit {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14px;
}
.res-credit .hub-icon { margin-top: 3px; }
.res-credit a { overflow-wrap: anywhere; }

@media (max-width: 899px) {
  .res-where-list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .res-rules, .res-steps { grid-template-columns: minmax(0, 1fr); }
  .res-phrases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 759px) {
  .res-where { padding: 12px 14px; }
  .res-jump { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 4px; padding: 8px 16px 12px; scrollbar-width: none; }
  .res-jump::-webkit-scrollbar { display: none; }
  .res-jump a { flex: none; min-height: 44px; }
  .res-section { padding-top: 22px; }
  .res-grid, .res-grid.res-offices { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .res-phrases { grid-template-columns: minmax(0, 1fr); }
  .res-rule { gap: 12px; }
  .res-rule-icon { width: 36px; height: 36px; }
  .res-card, .res-rule { padding: 14px; }
  .res-card-actions .btn, .res-locked { min-height: 44px; }
  .res-hub { padding: 16px; }
}
