/* Grand Rounds - Department of Medicine. Same palette as the original layout.css, modern layout. */
:root {
    --maroon: #800000;       /* header band, titles (was h1, .page-header rule) */
    --brick: #8f3931;        /* navigation bar */
    --brick-dark: #6e2a24;
    --blue: #155f83;         /* section headings (was h2) */
    --olive: #43433c;        /* page background and footer (was body) */
    --cream: #f7f6ee;        /* content area */
    --cream-2: #ecece4;
    --line: #e1e0d8;
    --text: #202020;
    --muted: #636363;
    --font-head: "Century Gothic", "Futura", "Avenir Next", "Gill Sans", "Segoe UI", sans-serif;
    --font-body: "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--olive); color: var(--text); font: 15px/1.55 var(--font-body); }
a { color: var(--blue); }
a:hover { color: var(--maroon); }
img { border: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.masthead { background: var(--maroon); color: #fff; }
.masthead .wrap { display: flex; align-items: center; gap: 24px; min-height: 104px; position: relative; flex-wrap: wrap; }
.logo img { display: block; height: 84px; width: auto; }
.header-right { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; padding: 10px 0; }
.uc-links { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.uc-links a { color: #fff; text-decoration: none; opacity: .9; padding: 0 6px; border-left: 1px solid rgba(255,255,255,.35); }
.uc-links a:first-child { border-left: 0; }
.uc-links a:hover { opacity: 1; text-decoration: underline; color: #fff; }
.search { display: flex; }
.search input[type=text] { width: 240px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.4); border-right: 0; border-radius: 4px 0 0 4px; font: inherit; font-size: 14px; }
.search button { border: 1px solid rgba(255,255,255,.4); background: var(--brick-dark); color: #fff; padding: 0 12px; border-radius: 0 4px 4px 0; cursor: pointer; font: inherit; font-size: 14px; }
.search button:hover { background: var(--brick); }

/* "Internal resources" panel */
#app-panel { display: none; position: absolute; right: 24px; top: 100%; z-index: 1000; width: 360px; max-height: 70vh; overflow: auto;
    background: #fff; color: var(--text); border-radius: 0 0 8px 8px; box-shadow: 0 12px 32px rgba(0,0,0,.25); padding: 14px 18px; }
#app-panel h5 { margin: 10px 0 6px; font: 600 12px/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--maroon); }
#app-panel h5 img { vertical-align: -2px; }
#app-panel ul { list-style: none; margin: 0 0 6px; padding: 0; }
#app-panel li a { display: block; padding: 4px 6px; border-radius: 4px; text-decoration: none; font-size: 13.5px; }
#app-panel li a:hover { background: var(--cream-2); }
#app-panel .btn-slide { float: right; }

/* ---------- navigation ---------- */
.globalnav { background: var(--brick); border-top: 1px solid rgba(255,255,255,.12); }
.globalnav ul { list-style: none; margin: 0 auto; padding: 0 24px; max-width: 1120px; display: flex; flex-wrap: wrap; }
.globalnav a { display: block; color: #fff; text-decoration: none; font: 15px/1 var(--font-head); padding: 12px 16px; border-right: 1px solid rgba(255,255,255,.15); }
.globalnav li:first-child a { border-left: 1px solid rgba(255,255,255,.15); }
.globalnav a:hover { background: var(--brick-dark); color: #fff; }

/* ---------- content ---------- */
.content { background: var(--cream); }
.content .wrap { padding-top: 28px; padding-bottom: 40px; min-height: 60vh; }
.page-title { margin: 0 0 4px; font: 400 34px/1.2 var(--font-head); color: var(--maroon); }
.page-intro { margin: 0 0 22px; padding-bottom: 14px; border-bottom: 2px solid var(--maroon); color: var(--muted); font-size: 14px; }
.page-intro strong { color: var(--text); font-weight: 600; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar h2 { margin: 0; font: 400 22px/1.2 var(--font-head); color: var(--blue); }
.tabs { display: inline-flex; border: 1px solid var(--maroon); border-radius: 6px; overflow: hidden; }
.tabs a { padding: 7px 16px; text-decoration: none; color: var(--maroon); font-size: 14px; font-weight: 600; }
.tabs a + a { border-left: 1px solid var(--maroon); }
.tabs a.active { background: var(--maroon); color: #fff; }
.tabs a:not(.active):hover { background: #fff; }

/* event cards */
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.event { display: grid; grid-template-columns: 112px 1fr auto; gap: 20px; align-items: start; background: #fff; border: 1px solid var(--line);
    border-left: 4px solid var(--maroon); border-radius: 8px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.event:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.date { text-align: center; background: var(--maroon); color: #fff; border-radius: 6px; padding: 8px 6px 10px; font-family: var(--font-head); }
.date .dow { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.date .day { display: block; font-size: 32px; line-height: 1.05; }
.date .mon { display: block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.date .yr { display: block; font-size: 11px; opacity: .8; margin-top: 2px; }
.event .topic { margin: 0 0 6px; font: 400 19px/1.3 var(--font-head); color: var(--blue); }
.event .topic.tba { color: var(--muted); font-style: italic; }
.event .speaker { margin: 0; font-weight: 600; }
.event .affiliation { margin: 2px 0 8px; color: var(--muted); font-size: 13.5px; }
.event .meta { margin: 0; color: var(--muted); font-size: 13px; }
.event .meta span + span::before { content: "\00b7"; margin: 0 8px; }
.event.cancelled { border-left-color: #c1c1c1; background: var(--cream-2); }
.event.cancelled .date { background: #8a8a82; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; background: #8a8a82; color: #fff; vertical-align: 3px; margin-right: 6px; }

.btn { display: inline-block; border: 1px solid var(--maroon); color: var(--maroon); background: #fff; border-radius: 6px; padding: 7px 14px;
    font: 600 13.5px/1 var(--font-body); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--maroon); color: #fff; }

.empty { background: #fff; border: 1px dashed #c1c1c1; border-radius: 8px; padding: 28px; text-align: center; color: var(--muted); }

/* Email Aliases */
.alias-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.alias-list li { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 6px; padding: 10px 14px; }

/* ---------- footer ---------- */
.footer { color: #e1e0d8; font-size: 13px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 24px; padding-top: 22px; padding-bottom: 28px; flex-wrap: wrap; }
.footer address { font-style: normal; line-height: 1.6; }
.footer strong { color: #fff; font-weight: 600; }
.footer a { color: #fff; }
.footer ul { list-style: none; margin: 0; padding: 0; text-align: right; line-height: 1.8; }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
    .masthead .wrap { min-height: 0; padding-top: 10px; padding-bottom: 10px; }
    .logo img { height: 64px; }
    .header-right { margin-left: 0; align-items: flex-start; width: 100%; }
    .search input[type=text] { width: 100%; }
    .search { width: 100%; }
    #app-panel { left: 12px; right: 12px; width: auto; }
    .globalnav a { padding: 10px 12px; font-size: 14px; }
    .event { grid-template-columns: 84px 1fr; }
    .event .actions { grid-column: 1 / -1; }
    .date .day { font-size: 26px; }
    .footer ul { text-align: left; }
}

@media print {
    .masthead, .globalnav, .footer, .tabs, .actions, .search { display: none !important; }
    body, .content { background: #fff; }
    .event { break-inside: avoid; box-shadow: none; }
}
