/* Student government pages: light, roomy cards that read well on a phone. */
.sg-page { max-width: 760px; margin: 0 auto; padding: 8px 14px 40px; font-family: Inter, system-ui, sans-serif; color: #0f172a; }
.sg-page h1, .sg-page h2, .sg-page h3 { font-family: Outfit, Inter, sans-serif; letter-spacing: -0.01em; }
.sg-crumb { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 12px; font-size: .86rem; font-weight: 600; color: #047857; text-decoration: none; }

.sg-hero { container-type: inline-size; position: relative; overflow: hidden; padding: 22px 20px; border-radius: 24px; color: #fff; background: linear-gradient(135deg, #064e3b 0%, #047857 60%, #10b981 140%); box-shadow: 0 18px 40px rgba(6, 78, 59, .22); }
.sg-hero::after { content: ""; position: absolute; right: -50px; top: -60px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.sg-hero-kicker { position: relative; margin: 0 0 4px; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #a7f3d0; }
.sg-hero h1 { position: relative; margin: 0 0 6px; font-size: 1.05rem !important; font-size: min(1.7rem, 5.6cqw) !important; font-weight: 800; line-height: 1.15; letter-spacing: .01em; text-transform: uppercase; white-space: nowrap; }
.sg-hero h1.sg-long { white-space: normal; font-size: 1.3rem !important; font-size: min(1.6rem, 7cqw) !important; }
.sg-hero p { position: relative; max-width: none; margin: 0; font-size: .95rem; line-height: 1.5; color: #d1fae5; }
.sg-chips { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sg-chip { padding: 5px 12px; border-radius: 100px; font-size: .78rem; font-weight: 700; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .26); }

.sg-banner { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0 0; padding: 14px 16px; border-radius: 18px; font-size: .92rem; line-height: 1.5; }
.sg-banner i { font-size: 1.2rem; margin-top: 1px; }
.sg-banner b { display: block; }
.sg-banner.election { background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; }
.sg-banner.ended { background: #fffbeb; color: #78350f; border: 1px solid #fde68a; }
.sg-banner.preview { background: #fef2f2; color: #7f1d1d; border: 1px solid #fecaca; }

.sg-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 28px 2px 12px; }
.sg-h h2 { margin: 0; font-size: 1.1rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.sg-h a, .sg-h span { font-size: .85rem; font-weight: 700; color: #047857; text-decoration: none; }
.sg-sub { margin: -6px 2px 12px; font-size: .88rem; color: #64748b; max-width: none; }

.sg-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .sg-grid.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sg-leader { padding: 16px; background: #fff; border: 1px solid #e6efe9; border-radius: 20px; box-shadow: 0 6px 20px rgba(16, 185, 129, .06); }
.sg-leader-big { border-color: #a7f3d0; box-shadow: 0 10px 26px rgba(16, 185, 129, .12); }
.sg-leader-top { display: flex; gap: 14px; align-items: center; }
.sg-photo { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: center 25%; border: 3px solid #fff; box-shadow: 0 0 0 2px #d1fae5; background: #ecfdf5; }
.sg-leader-big .sg-photo { width: 76px; height: 76px; }
.sg-initials { display: flex; align-items: center; justify-content: center; font: 800 1.15rem Outfit, sans-serif; color: #047857; }
.sg-who { min-width: 0; }
.sg-who p { max-width: none; margin: 0; }
.sg-name { font-weight: 700; font-size: 1.02rem; line-height: 1.25; overflow-wrap: anywhere; }
.sg-role { font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; line-height: 1.3; color: #047857; }
.sg-course { display: flex; gap: 6px; align-items: center; margin-top: 2px !important; font-size: .82rem; color: #64748b; }
.sg-bio { margin: 12px 0 0; max-width: none; font-size: .9rem; line-height: 1.55; color: #475569; }
.sg-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-top: 14px; }
.sg-act { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; border-radius: 12px; border: 1px solid #d1fae5; background: #f0fdf7; color: #047857; font-size: .86rem; font-weight: 700; text-decoration: none; }
.sg-act:hover { background: #dcfce7; color: #065f46; }
.sg-socials { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; }
.sg-socials a { font-size: .82rem; font-weight: 600; color: #64748b; text-decoration: none; }
.sg-socials a:hover { color: #047857; text-decoration: underline; }

.sg-notice { padding: 16px; margin-bottom: 10px; background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; }
.sg-pinned { border-color: #fcd34d; background: #fffdf5; }
.sg-notice-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.sg-cat { padding: 3px 10px; border-radius: 100px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: #e2e8f0; color: #334155; }
.sg-cat-event { background: #dbeafe; color: #1e40af; }
.sg-cat-election { background: #ede9fe; color: #5b21b6; }
.sg-cat-opportunity { background: #dcfce7; color: #166534; }
.sg-pin { font-size: .78rem; font-weight: 700; color: #b45309; }
.sg-date { margin-left: auto; font-size: .78rem; color: #94a3b8; }
.sg-notice-title { margin: 0 0 4px; font-size: 1.05rem; font-weight: 700; }
.sg-notice-text { margin: 0; max-width: none; font-size: .92rem; line-height: 1.6; color: #475569; white-space: pre-line; }
.sg-notice-event { margin: 8px 0 0; max-width: none; font-size: .86rem; font-weight: 600; color: #1e40af; }

.sg-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 20px; padding: 4px 16px; }
.sg-row { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid #f1f5f9; font-size: .92rem; }
.sg-row:last-child { border-bottom: 0; }
.sg-row i { flex: none; width: 22px; margin-top: 2px; font-size: 1.1rem; color: #059669; }
.sg-row a { color: #047857; font-weight: 600; text-decoration: none; word-break: break-word; }
.sg-row small { display: block; color: #64748b; font-size: .8rem; }
.sg-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sg-link { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 100px; border: 1px solid #e2e8f0; background: #fff; color: #0f172a; font-size: .88rem; font-weight: 700; text-decoration: none; }
.sg-link:hover { border-color: #10b981; color: #047857; }
.sg-empty { padding: 28px 18px; text-align: center; border: 1px dashed #cbd5e1; border-radius: 20px; color: #64748b; background: #f8fafc; }
.sg-empty i { display: block; margin-bottom: 8px; font-size: 1.8rem; color: #94a3b8; }

.sg-past { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 8px; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; text-decoration: none; color: #0f172a; }
.sg-past b { flex: 1; }
.sg-past small { color: #64748b; }
.sg-past:hover { border-color: #10b981; }

@media (prefers-color-scheme: dark) {
  body.dark-mode .sg-leader, body.dark-mode .sg-notice, body.dark-mode .sg-card, body.dark-mode .sg-past, body.dark-mode .sg-link { background: #111c17; border-color: #1f3a2f; color: #e2e8f0; }
}

/* A place waiting for its details: same card, dashed so it reads as empty */
.sg-leader-ghost { border-style: dashed; box-shadow: none; }
.sg-leader-ghost .sg-name { color: #64748b; }
.sg-leader-ghost .sg-act { pointer-events: none; }

/* The college's key leaders sit in front, large; ministers, deputies and members below them are smaller */
.sg-grid.cols .sg-leader:not(.sg-leader-big) { padding: 12px 14px; }
.sg-grid.cols .sg-leader:not(.sg-leader-big) .sg-photo { width: 52px; height: 52px; }
.sg-grid.cols .sg-leader:not(.sg-leader-big) .sg-name { font-size: .95rem; }
.sg-leader-big .sg-role { font-weight: 800; }

/* The student constitution: a document card */
.sg-doc { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1px solid #a7f3d0; border-radius: 20px; text-decoration: none; color: #0f172a; box-shadow: 0 8px 22px rgba(16, 185, 129, .10); }
.sg-doc-ico { flex: none; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: #ecfdf5; color: #047857; font-size: 1.5rem; }
.sg-doc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sg-doc-text b { font-size: .98rem; }
.sg-doc-text small { color: #64748b; font-size: .8rem; }
.sg-doc > .bi { flex: none; color: #047857; }
.sg-doc-ghost { border-style: dashed; box-shadow: none; }

/* The key leaders: two to a row on a phone, photo on top, so all of them are seen together */
.sg-grid.sg-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sg-top .sg-leader { padding: 14px 10px; text-align: center; }
.sg-top .sg-leader-top { flex-direction: column; gap: 8px; }
.sg-top .sg-photo, .sg-top .sg-leader-big .sg-photo { width: 68px; height: 68px; }
.sg-top .sg-name { font-size: .92rem; overflow-wrap: anywhere; }
.sg-top .sg-role { font-size: .7rem; }
.sg-top .sg-course { justify-content: center; font-size: .72rem; text-align: left; }
.sg-top .sg-actions { justify-content: center; }
.sg-top .sg-act span { display: none; }
@media (min-width: 640px) { .sg-grid.sg-top { grid-template-columns: repeat(3, minmax(0, 1fr)); } .sg-top .sg-act span { display: inline; } }

/* Ministries and offices: one small card each, so a long list stays short */
.sg-units { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .sg-units { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sg-unit { padding: 12px 14px; background: #fff; border: 1px solid #e6efe9; border-radius: 18px; box-shadow: 0 6px 18px rgba(16, 185, 129, .05); }
.sg-unit-name { margin: 0 0 6px; max-width: none; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #047857; }
.sg-urow { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid #f1f5f9; }
.sg-urow:first-of-type { border-top: 0; }
.sg-uphoto { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: center 25%; background: #ecfdf5; font-size: .85rem; }
.sg-uwho { flex: 1; min-width: 0; }
.sg-uwho p { margin: 0; max-width: none; }
.sg-uname { font-size: .92rem; font-weight: 700; overflow-wrap: anywhere; }
.sg-urole { font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #047857; }
.sg-uacts { display: flex; gap: 6px; flex: none; }
.sg-uacts a { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #ecfdf5; color: #047857; text-decoration: none; }
.sg-unit-ghost { border-style: dashed; box-shadow: none; }
.sg-more { margin-top: 10px; }
.sg-more > summary { cursor: pointer; padding: 11px 14px; border: 1px solid #a7f3d0; border-radius: 14px; background: #ecfdf5; color: #047857; font-weight: 700; font-size: .88rem; list-style: none; text-align: center; }
.sg-more > summary::-webkit-details-marker { display: none; }
.sg-more[open] > summary { margin-bottom: 10px; }

/* Contact details folded under one button; opening slides them down */
.sg-contact { margin-top: 10px; }
.sg-contact-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid #d1fae5; border-radius: 12px; background: #f0fdf7; color: #047857; font: 700 .82rem/1 inherit; cursor: pointer; }
.sg-contact-btn .sg-chev { margin-left: auto; transition: transform .3s ease; }
.sg-contact.open .sg-chev { transform: rotate(180deg); }
.sg-contact-ghost { cursor: default; border-style: dashed; }
.sg-contact-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s ease; }
.sg-contact.open .sg-contact-panel { grid-template-rows: 1fr; }
.sg-contact-inner { overflow: hidden; min-height: 0; visibility: hidden; transition: visibility 0s .32s; }
.sg-contact.open .sg-contact-inner { visibility: visible; transition-delay: 0s; }
.sg-contact-inner .sg-actions { margin-top: 10px; }
.sg-top .sg-contact-btn { justify-content: center; }
.sg-top .sg-contact-btn .sg-chev { margin-left: 0; }
.sg-top .sg-act span { display: inline; }
.sg-top .sg-actions { grid-template-columns: 1fr; }
@media (prefers-reduced-motion: reduce) { .sg-contact-panel, .sg-contact-btn .sg-chev, .sg-contact-inner { transition: none; } }
.sg-grid.sg-top { align-items: start; }

/* A person inside a ministry card: the Contact button is small and sits at the end of the row */
.sg-uperson { border-top: 1px solid #f1f5f9; }
.sg-uperson:first-of-type { border-top: 0; }
.sg-uperson > .sg-urow { border-top: 0; }
.sg-contact-btn.sg-ubtn { width: auto; min-height: 34px; padding: 0 10px; gap: 6px; font-size: .74rem; flex: none; }
.sg-contact-btn.sg-ubtn .sg-chev { margin-left: 0; }
.sg-uperson .sg-contact-inner .sg-actions { margin: 0 0 8px; }

.sg-units.sg-units-one { grid-template-columns: minmax(0, 1fr); }

/* Thanks to leaders who served earlier in the term */
.sg-userved { font-size: .74rem; color: #64748b; }
.sg-utribute { margin: 2px 0 6px 54px; max-width: none; font-size: .84rem; line-height: 1.45; color: #334155; font-style: italic; }

/* Schooling: level, school and year, one line each */
.sg-edu-list { list-style: none; margin: 10px 0 0; padding: 0; }
.sg-edu-list li { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; border-top: 1px solid #f1f5f9; font-size: .86rem; }
.sg-edu-list li:first-child { border-top: 0; }
.sg-edu-list b { flex: none; min-width: 74px; font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #047857; }
.sg-edu-list span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sg-edu-list small { flex: none; color: #64748b; }
.sg-edu-note { margin: 4px 0 8px; max-width: none; font-size: .72rem; color: #94a3b8; }
.sg-edu { margin-top: 8px; }

/* Education as a table: level, school, from, to. In the narrow key-leader cards each entry stacks. */
.sg-edu-table { margin: 10px 0 0; font-size: .82rem; }
.sg-edu-head, .sg-edu-tr { display: grid; grid-template-columns: 64px minmax(0, 1fr) 44px 44px; gap: 6px; align-items: baseline; padding: 6px 0; }
.sg-edu-head { font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #94a3b8; border-bottom: 1px solid #e2e8f0; }
.sg-edu-tr { border-top: 1px solid #f1f5f9; }
.sg-edu-tr b { font-size: .64rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #047857; }
.sg-edu-tr span { overflow-wrap: anywhere; }
.sg-edu-tr span:nth-child(3), .sg-edu-tr span:nth-child(4) { color: #64748b; font-size: .78rem; }
.sg-top .sg-edu-head { display: none; }
.sg-top .sg-edu-tr { grid-template-columns: 1fr auto auto; gap: 4px; text-align: left; }
.sg-top .sg-edu-tr span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
.sg-top .sg-edu-tr span:nth-child(3) { grid-column: 2; grid-row: 1; }
.sg-top .sg-edu-tr span:nth-child(4) { grid-column: 3; grid-row: 1; }
.sg-top .sg-edu-tr span:nth-child(4)::before { content: "\2013\00a0"; }

/* The college's official social accounts, inside the office card */
.sg-social-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sg-social { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 12px; border: 1px solid #d1fae5; border-radius: 99px; background: #f0fdf7; color: #047857; font-size: .82rem; font-weight: 700; text-decoration: none; }
.sg-social i { width: auto; margin: 0; font-size: 1rem; color: inherit; }
.sg-social:hover { background: #dcfce7; color: #065f46; }
.sg-social-ghost .sg-social { border-style: dashed; padding: 0 12px; pointer-events: none; }

/* Social accounts: one row of round buttons, each in the colour of its network */
.sg-socials-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sg-soc { --c: #047857; display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); text-decoration: none; transition: transform .15s ease, background .15s ease; }
.sg-soc i { width: auto; margin: 0; font-size: 1.15rem; color: inherit; }
.sg-soc:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--c) 20%, transparent); }
.sg-soc:active { transform: scale(.94); }
.sg-soc-instagram { --c: #e4405f; } .sg-soc-x { --c: #0f172a; } .sg-soc-facebook { --c: #1877f2; } .sg-soc-youtube { --c: #ff0000; }
.sg-soc-tiktok { --c: #0f172a; } .sg-soc-whatsapp { --c: #16a34a; } .sg-soc-telegram { --c: #229ed9; } .sg-soc-linkedin { --c: #0a66c2; } .sg-soc-threads { --c: #0f172a; }
.sg-soc-ghost .sg-soc { border-style: dashed; pointer-events: none; background: transparent; opacity: .8; }
body.dark-mode .sg-soc-x, body.dark-mode .sg-soc-tiktok, body.dark-mode .sg-soc-threads { --c: #e2e8f0; }

/* Notices: how soon an event is, and a button to a link */
.sg-when { margin-left: 8px; padding: 2px 9px; border-radius: 99px; background: #fef3c7; color: #92400e; font-size: .72rem; font-weight: 800; }
.sg-notice-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; min-height: 40px; padding: 0 16px; border-radius: 12px; background: #047857; color: #fff; font-size: .86rem; font-weight: 700; text-decoration: none; }
.sg-notice-link:active { transform: scale(.97); }

/* Notices: a date tile for events, text cut at three lines, and a quiet look once an event is over */
.sg-notice-row { display: flex; gap: 12px; align-items: flex-start; }
.sg-notice-main { flex: 1; min-width: 0; }
.sg-datetile { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 54px; height: 60px; border-radius: 14px; background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; line-height: 1.1; }
.sg-datetile b { font-size: 1.35rem; font-weight: 800; }
.sg-datetile span { font-size: .64rem; font-weight: 800; letter-spacing: .08em; }
.sg-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sg-notice.expanded .sg-clamp { display: block; -webkit-line-clamp: unset; }
.sg-readmore { margin: 2px 0 0; padding: 0; border: 0; background: none; color: #047857; font-size: .82rem; font-weight: 700; cursor: pointer; }
.sg-ended { background: #f8fafc; }
.sg-ended .sg-datetile { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.sg-ended .sg-notice-title { color: #475569; }
.sg-when-ended { background: #e2e8f0; color: #475569; }
.sg-tabs { display: flex; gap: 8px; margin: 4px 0 14px; }
.sg-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 99px; border: 1px solid #e2e8f0; background: #fff; color: #475569; font-size: .88rem; font-weight: 700; text-decoration: none; }
.sg-tabs a span { padding: 1px 8px; border-radius: 99px; background: #f1f5f9; font-size: .74rem; }
.sg-tabs a.on { background: #047857; border-color: #047857; color: #fff; }
.sg-tabs a.on span { background: rgba(255,255,255,.2); color: #fff; }

/* A notice is a header that opens (native details): tap the header to read what is under it */
details.sg-notice { padding: 0; }
.sg-notice-head { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; cursor: pointer; list-style: none; }
.sg-notice-head::-webkit-details-marker { display: none; }
.sg-nobody .sg-notice-head { cursor: default; }
.sg-notice-head .sg-chev { flex: none; margin-top: 4px; color: #64748b; transition: transform .25s ease; }
.sg-notice[open] .sg-chev { transform: rotate(180deg); }
.sg-notice-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 4px 0 0; max-width: none; font-size: .8rem; font-weight: 600; color: #1e40af; }
.sg-has { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 99px; background: #f1f5f9; color: #334155; font-size: .74rem; font-weight: 700; }
.sg-notice-body { padding: 0 16px 16px; border-top: 1px solid #f1f5f9; }
.sg-notice-body .sg-notice-text { margin-top: 12px; }
.sg-notice-imgwrap { display: block; margin-top: 12px; border-radius: 14px; overflow: hidden; background: #f1f5f9; }
.sg-notice-img { display: block; width: 100%; max-height: 380px; object-fit: contain; }
.sg-attach { display: flex; align-items: center; gap: 10px; margin-top: 12px; min-height: 46px; padding: 0 14px; border: 1px solid #fecaca; border-radius: 12px; background: #fef2f2; color: #b91c1c; font-size: .88rem; font-weight: 700; text-decoration: none; }
.sg-attach span { flex: 1; }
.sg-attach .bi:first-child { font-size: 1.25rem; }

/* A notice of words only: the words are the notice */
.sg-plain { padding: 14px 16px; }
.sg-plain .sg-notice-text { margin: 4px 0 0; color: #334155; font-size: .95rem; }
.sg-plain .sg-notice-meta { margin-top: 8px; }

/* Notices, calm and easy to scan: sentence-case headers in a medium weight, small quiet labels, soft surfaces.
   Nothing here is in capitals or bold enough to shout; the colour is kept for what matters (today, pinned, ended). */
.sg-notice { margin-bottom: 10px; border-color: #e6ecef; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: box-shadow .2s ease, border-color .2s ease; }
.sg-notice:hover { border-color: #cfe3da; box-shadow: 0 4px 14px rgba(15, 23, 42, .06); }
.sg-notice[open] { border-color: #cfe3da; }
.sg-notice-head { padding: 13px 16px; gap: 14px; align-items: center; }
.sg-notice-top { gap: 10px; margin-bottom: 5px; }
.sg-cat { display: inline-flex; align-items: center; gap: 6px; padding: 0; border-radius: 0; background: none !important; font-size: .66rem; font-weight: 700; letter-spacing: .1em; color: #64748b; }
.sg-cat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; }
.sg-cat-event::before { background: #3b82f6; } .sg-cat-election::before { background: #8b5cf6; } .sg-cat-opportunity::before { background: #10b981; }
.sg-pin { font-size: .72rem; font-weight: 600; color: #a16207; }
.sg-date { font-size: .72rem; font-weight: 500; color: #94a3b8; }
.sg-notice-title { margin: 0; font-family: Outfit, Inter, system-ui, sans-serif !important; font-size: 1.04rem; font-weight: 600; letter-spacing: -.012em; line-height: 1.32; color: #0f172a; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sg-notice[open] .sg-notice-title { -webkit-line-clamp: unset; }
.sg-notice-meta { margin-top: 5px; font-size: .76rem; font-weight: 500; color: #475569; }
.sg-when { padding: 1px 8px; background: #fef3c7; color: #92400e; font-size: .68rem; font-weight: 700; }
.sg-datetile { width: 48px; height: 54px; border-radius: 12px; background: #f1f6ff; border-color: #dbe7fb; }
.sg-datetile b { font-size: 1.2rem; font-weight: 700; }
.sg-datetile span { font-size: .6rem; }
.sg-notice-body { padding: 4px 16px 16px; border-top-color: #eef2f4; }
.sg-notice-body .sg-notice-text { margin-top: 10px; font-size: .93rem; line-height: 1.65; color: #334155; }
.sg-pinned { background: #fcfdf9; border-color: #ece7c8; }
body.dark-mode .sg-notice-title { color: #f1f5f9; }

/* Under the header: the words first, then the picture in a frame, then the document, then the link. One rhythm of 14px. */
.sg-notice-body { display: flex; flex-direction: column; gap: 14px; padding: 6px 16px 16px; }
.sg-notice-body .sg-notice-text { margin: 8px 0 0; max-width: 62ch; font-size: .95rem; line-height: 1.7; color: #334155; }
.sg-media { margin: 0; cursor: zoom-in; }
.sg-notice-img { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; border: 1px solid #e6ecef; background: #f1f5f9; transition: max-height .3s ease; }
.sg-media.zoom { cursor: zoom-out; }
.sg-media.zoom .sg-notice-img { max-height: 1200px; object-fit: contain; }
.sg-media figcaption { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: .74rem; font-weight: 500; color: #94a3b8; }
.sg-doccard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #e6ecef; border-radius: 14px; background: #fafbfc; color: #0f172a; text-decoration: none; transition: border-color .2s ease, background .2s ease; }
.sg-doccard:hover { border-color: #cfe3da; background: #f4faf7; }
.sg-doccard:active { transform: scale(.99); }
.sg-doccard-ico { flex: none; display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 11px; background: #fef2f2; color: #dc2626; font-size: 1.3rem; }
.sg-doccard-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sg-doccard-text b { font-family: Outfit, Inter, system-ui, sans-serif; font-size: .95rem; font-weight: 600; }
.sg-doccard-text small { color: #64748b; font-size: .76rem; }
.sg-doccard > .bi { flex: none; color: #94a3b8; }
.sg-notice-body .sg-notice-link { align-self: flex-start; margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .sg-notice-img { transition: none; } }

/* Search box: one calm pill with a magnifier and a button */
.sg-search { position: relative; display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; padding: 5px 5px 5px 14px; background: #fff; border: 1px solid #dbe6e1; border-radius: 99px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: border-color .2s ease, box-shadow .2s ease; }
.sg-search:focus-within { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .15); }
.sg-search > i { color: #94a3b8; font-size: 1rem; }
.sg-search input { flex: 1; min-width: 0; height: 40px; border: 0; outline: 0; background: transparent; color: #0f172a; font-size: .95rem; }
.sg-search input::placeholder { color: #94a3b8; }
.sg-search button { flex: none; height: 38px; padding: 0 16px; border: 0; border-radius: 99px; background: #047857; color: #fff; font-size: .86rem; font-weight: 700; cursor: pointer; }
.sg-search button:active { transform: scale(.97); }

/* ======================================================================================================
   On a computer. The rules above are made for a phone: one narrow column. From 992px up the page uses the
   width of the screen instead of leaving empty bands on both sides.
   ====================================================================================================== */

/* How the blocks of a page follow each other on a phone. The two columns below are only a computer layout: on a
   phone they disappear (display: contents) and every block takes its place in this order. */
.sg-layout { display: flex; flex-direction: column; }
.sg-main, .sg-aside { display: contents; }
.sg-sec { min-width: 0; }
.sg-o1 { order: 1; } .sg-o2 { order: 2; } .sg-o3 { order: 3; } .sg-o4 { order: 4; } .sg-o5 { order: 5; } .sg-o6 { order: 6; } .sg-o7 { order: 7; }
.sg-notice-grid { display: block; }
.sg-bodies { margin-top: 16px; }

@media (min-width: 992px) {
  .sg-page { max-width: 1320px; padding: 18px 28px 64px; }

  /* The banner is the face of the page: roomier, bigger writing, a soft glow instead of one small circle */
  .sg-hero { padding: 40px 48px; border-radius: 28px; }
  .sg-hero::after { right: -70px; top: -90px; width: 340px; height: 340px; background: rgba(255, 255, 255, .09); }
  .sg-hero::before { content: ""; position: absolute; right: 150px; bottom: -120px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .05); }
  .sg-hero-kicker { font-size: .84rem; margin-bottom: 8px; }
  .sg-hero h1 { font-size: 1.6rem !important; font-size: min(2.7rem, 4.2cqw) !important; margin-bottom: 10px; }
  .sg-hero h1.sg-long { font-size: 1.5rem !important; font-size: min(2.3rem, 3.6cqw) !important; }
  .sg-hero p { max-width: 62ch; font-size: 1.08rem; line-height: 1.6; }
  .sg-chip { padding: 6px 14px; font-size: .84rem; }

  .sg-search { max-width: 640px; margin: 20px 0 4px; }

  /* Two columns: the leaders on the left, what a student looks for next to them on the right */
  .sg-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 0 44px; align-items: start; }
  .sg-main, .sg-aside { display: block; min-width: 0; }
  .sg-layout { margin-top: 28px; }
  .sg-main > .sg-sec:first-child .sg-h:first-child, .sg-aside > .sg-sec:first-child .sg-h:first-child { margin-top: 0; }
  .sg-h { margin-top: 34px; }
  .sg-h h2 { font-size: 1.05rem; }

  /* Leaders: the key ones in a row of three, the rest in two columns */
  .sg-grid.sg-top { gap: 16px; }
  .sg-top .sg-leader { padding: 22px 14px; border-radius: 22px; transition: transform .2s ease, box-shadow .2s ease; }
  .sg-top .sg-leader:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(16, 185, 129, .14); }
  .sg-top .sg-photo, .sg-top .sg-leader-big .sg-photo { width: 84px; height: 84px; }
  .sg-top .sg-name { font-size: 1rem; }
  .sg-top .sg-role { font-size: .74rem; }
  .sg-units { gap: 14px; }
  .sg-unit { padding: 16px 18px; border-radius: 20px; }

  /* Right column: tidy and not too wide */
  .sg-aside .sg-notice { margin-bottom: 12px; }
  .sg-aside .sg-empty { padding: 30px 18px; }

  /* Pages without the two columns (colleges list, one term, notices, search) fill the width in a grid */
  .sg-wide .sg-bodies { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin-top: 22px; }
  .sg-wide .sg-bodies .sg-past { margin-bottom: 0; padding: 18px 20px; border-radius: 20px; }
  .sg-wide .sg-grid.cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .sg-wide .sg-grid.sg-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sg-wide .sg-units { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .sg-wide .sg-units.sg-units-one { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sg-notice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
  .sg-notice-grid .sg-notice { margin-bottom: 0; }
  .sg-wide .sg-tabs { margin-bottom: 18px; }
}

/* A very wide screen: a little more room, never a stretched line of text */
@media (min-width: 1500px) {
  .sg-page { max-width: 1440px; }
  .sg-layout { grid-template-columns: minmax(0, 1fr) 430px; gap: 0 56px; }
  .sg-wide .sg-bodies { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
}

/* Section headings and the small note beside them ("Electoral commission" and "4 people") stay on ONE line, side by side.
   If the line is ever too long, the note is cut with "..." first and the heading last, rather than words dropping onto a
   second line. The role under a person's name is kept to one line the same way. */
.sg-h h2 { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-h a, .sg-h > span { flex: 0 100 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-urole { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The rest of the site forces every h2 on a phone to a big size with !important, which is too wide for a heading that
   shares its line with a note; this keeps the section headings at a size that fits (and only these). */
@media (max-width: 768px) {
  .sg-page .sg-h h2 { font-size: clamp(.92rem, 4.3vw, 1.1rem) !important; letter-spacing: .04em; }
  .sg-page .sg-h a, .sg-page .sg-h > span { font-size: clamp(.72rem, 3.2vw, .85rem); }
}
