/* Hurricanes Hockey Association
   Palette taken from the crest: black, flag red, stick silver, on rink white. */
:root {
  --ink: #000000;
  --red: #CC0202;
  --red-dark: #9E0101;
  --silver: #A8A9AD;
  --silver-soft: #D9DADD;
  --ice: #EEF1F4;
  --white: #FFFFFF;
  --text: #16171A;
  --muted: #55585F;

  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;

  --wrap: 1180px;
  --r: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 1.0625rem; line-height: 1.55; color: var(--text); background: var(--ice); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-underline-offset: 2px; }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.02; letter-spacing: .005em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
code { font-size: .9em; background: var(--white); border: 1px solid var(--silver-soft); padding: .05em .35em; border-radius: 3px; word-break: break-all; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: .5rem; left: .5rem; z-index: 50; background: var(--white); padding: .5rem 1rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; font: 600 1rem/1 var(--body); padding: .8em 1.2em; border-radius: var(--r); border: 2px solid transparent; text-decoration: none; cursor: pointer; }
.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: var(--red-dark); color: var(--white); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); }
.btn--block { width: 100%; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--red); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linklike.danger { color: var(--red-dark); }
form.inline { display: inline; }

/* Top bar */
.topbar { background: var(--ink); color: var(--white); border-bottom: 4px solid var(--red); position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--white); text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.35rem; }
.brand:hover { color: var(--white); }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a, .nav .linklike { color: var(--white); text-decoration: none; padding: .55rem .8rem; border-radius: var(--r); font-weight: 500; }
.nav a:hover, .nav .linklike:hover { background: #1f1f1f; color: var(--white); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--red); border-radius: 0; }
.nav-social { display: flex; gap: .1rem; margin-left: .5rem; padding-left: .5rem; border-left: 1px solid #333; }
.nav-social a { padding: .5rem; display: grid; place-items: center; }
.nav-toggle { display: none; background: none; color: var(--white); border: 1px solid var(--silver); border-radius: var(--r); font: 600 .95rem var(--body); padding: .45rem .8rem; cursor: pointer; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); flex-direction: column; align-items: stretch; padding: .5rem 1.25rem 1rem; border-bottom: 4px solid var(--red); }
  .nav.is-open { display: flex; }
  .nav-social { border: 0; margin: .5rem 0 0; padding: 0; }
  .brand span { font-size: 1.15rem; }
}

/* Hero */
.hero { background: var(--ink); color: var(--white); position: relative; overflow: hidden; }
.hero::after { /* stick-tape stripes, echoing the crest */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px;
  background: linear-gradient(var(--silver) 0 4px, var(--ink) 4px 6px, var(--red) 6px 10px, var(--ink) 10px 12px, var(--silver) 12px);
}
.hero-inner { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero-mark img { width: 100%; filter: drop-shadow(0 0 0 transparent); }
.hero h1 { font-size: clamp(2.8rem, 6.5vw, 5.4rem); font-weight: 900; line-height: .92; margin-bottom: .3em; max-width: 12ch; }
.hero-tag { color: var(--silver); font-size: 1.15rem; max-width: 46ch; margin-bottom: 2rem; }
.board-h { font-size: 1.25rem; color: var(--silver); font-weight: 700; margin-bottom: .6rem; }
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: #2a2a2a; border: 2px solid #2a2a2a; border-radius: var(--r); overflow: hidden; }
.board-cell { display: flex; flex-direction: column; gap: .2rem; background: #0c0c0c; color: var(--white); padding: 1rem 1.1rem 1.1rem; text-decoration: none; border-top: 5px solid var(--red); min-height: 9.5rem; }
.board-cell--u13 { border-top-color: var(--silver); }
.board-cell--u15 { border-top-color: var(--white); }
.board-cell:hover { background: #161616; color: var(--white); }
.board-team { font-family: var(--display); font-weight: 900; font-size: 2.1rem; line-height: 1; margin-bottom: .35rem; }
.board-when { font-weight: 600; }
.board-what { color: #e6e6e6; }
.board-where { color: var(--silver); font-size: .92rem; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero-mark { width: min(200px, 50vw); }
}
@media (max-width: 640px) {
  .board { grid-template-columns: 1fr; }
  .board-cell { min-height: 0; display: grid; grid-template-columns: 4rem 1fr; column-gap: .75rem; border-top: 0; border-left: 5px solid var(--red); }
  .board-cell--u13 { border-left-color: var(--silver); }
  .board-cell--u15 { border-left-color: var(--white); }
  .board-team { grid-row: span 3; align-self: center; margin: 0; }
}

.welcome { background: var(--white); border-bottom: 1px solid var(--silver-soft); }
.welcome p { margin: 0; padding: 1.4rem 0; font-size: 1.15rem; max-width: 70ch; }

/* Section heads */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 3px solid var(--ink); margin-bottom: 1.25rem; }
.section-head h2 { margin: 0 0 .25rem; }
.section-head a { font-weight: 600; white-space: nowrap; }

/* Home layout */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 3rem; padding: 3rem 0; }
.home-side > section + section { margin-top: 2.5rem; }
@media (max-width: 960px) { .home-grid { grid-template-columns: 1fr; } }

/* Post cards */
.post-card { background: var(--white); border: 1px solid var(--silver-soft); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.post-card-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card-body { padding: 1.1rem 1.25rem 1.25rem; }
.post-card h3 { margin-bottom: .35em; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--red); text-decoration: underline; }
.post-card p:last-child { margin: 0; color: var(--muted); }
.post-card--lead { margin-bottom: 1.25rem; border-top: 5px solid var(--red); }
.post-card--lead h3 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
@media (min-width: 700px) {
  .post-card--lead:has(.post-card-img) { display: grid; grid-template-columns: 1.1fr 1fr; }
  .post-card--lead .post-card-img img { height: 100%; aspect-ratio: auto; min-height: 260px; }
  .post-card--lead .post-card-body { padding: 1.6rem; align-self: center; }
}
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .92rem; color: var(--muted); margin-bottom: .5rem; }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; line-height: 1; padding: .3em .5em; border-radius: 3px; background: var(--ink); color: var(--white); vertical-align: .1em; }
.tag--u11 { background: var(--red); }
.tag--u13 { background: var(--silver); color: var(--ink); }
.tag--u15 { background: var(--ink); }
.tag--pin { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

/* Event lists */
.ev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.ev { display: flex; gap: .9rem; align-items: stretch; background: var(--white); border: 1px solid var(--silver-soft); border-left: 5px solid var(--silver); border-radius: var(--r); padding: .7rem .9rem; }
.ev--game { border-left-color: var(--red); }
.ev--practice { border-left-color: var(--ink); }
.ev-date { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 2.8rem; line-height: 1; text-align: center; }
.ev-dow, .ev-mon { font-size: .78rem; color: var(--muted); }
.ev-day { font-family: var(--display); font-weight: 900; font-size: 1.8rem; }
.ev-body p { margin: 0; }
.ev-title { font-weight: 600; line-height: 1.3; }
.ev-meta { color: var(--muted); font-size: .92rem; margin-top: .15rem !important; }

.empty { color: var(--muted); background: var(--white); border: 1px dashed var(--silver); border-radius: var(--r); padding: 1.25rem; }
.notice { background: #fff4f4; border: 1px solid #f0c4c4; border-left: 5px solid var(--red); padding: .8rem 1rem; border-radius: var(--r); }

/* Facebook */
.fb iframe { border: 0; width: 100%; max-width: 340px; height: 500px; background: var(--white); border-radius: var(--r); display: block; margin-bottom: .9rem; }

/* Teams */
.teams { background: var(--white); border-top: 1px solid var(--silver-soft); padding: 3rem 0 3.5rem; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.team { border: 2px solid var(--ink); border-radius: var(--r); padding: 1.4rem; display: flex; flex-direction: column; }
.team h3 { font-size: 1.6rem; display: flex; align-items: baseline; gap: .5rem; }
.team-age { font-size: 3rem; font-weight: 900; line-height: .9; color: var(--red); }
.team--u13 .team-age { color: var(--silver); -webkit-text-stroke: 1px var(--ink); }
.team--u15 .team-age { color: var(--ink); }
.team-links { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .35rem; }
.team .btn { margin-top: auto; }

/* Pages */
.page { padding: 2.5rem 0 4rem; }
.narrow { max-width: 760px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; border-bottom: 3px solid var(--ink); margin-bottom: 1.75rem; }
.page-head h1 { margin-bottom: .15em; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; padding-bottom: .75rem; }
.chips a { text-decoration: none; color: var(--ink); background: var(--white); border: 1px solid var(--silver); padding: .4rem .85rem; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.chips a:hover { border-color: var(--ink); color: var(--ink); }
.chips a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; }

.article h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.article-img { width: 100%; border-radius: var(--r); margin: 1rem 0 1.75rem; }
.prose { font-size: 1.125rem; max-width: 68ch; }
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .3em; }
.prose blockquote { margin: 1.5em 0; padding: .2em 0 .2em 1.2em; border-left: 4px solid var(--red); font-style: italic; }
.byline { color: var(--muted); margin-top: 2rem; }

/* Calendar */
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.cal-bar h2 { margin: 0; text-align: center; }
.cal-grid { background: var(--silver-soft); border: 1px solid var(--silver-soft); border-radius: var(--r); overflow: visible; display: grid; gap: 1px; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.cal-dow div { background: var(--ink); color: var(--white); text-align: center; padding: .45rem 0; font-weight: 600; font-size: .9rem; }
.cal-dow div:first-child { border-top-left-radius: var(--r); }
.cal-dow div:last-child { border-top-right-radius: var(--r); }
.cal-day { background: var(--white); min-height: 7.5rem; padding: .35rem .35rem .5rem; position: relative; display: flex; flex-direction: column; gap: 3px; }
.cal-day.is-out { background: #f6f7f8; }
.cal-day.is-out .cal-num { color: var(--silver); }
.cal-num { font-family: var(--display); font-weight: 800; font-size: 1.15rem; line-height: 1; padding: .15rem .2rem .25rem; }
.cal-day.is-today .cal-num { background: var(--red); color: var(--white); border-radius: 3px; align-self: flex-start; padding: .2rem .35rem; }
.cal-ev { position: relative; }
.cal-ev summary { list-style: none; cursor: pointer; font-size: .8rem; line-height: 1.25; padding: .25rem .35rem; border-radius: 3px; background: var(--ice); border-left: 4px solid var(--silver); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev summary::-webkit-details-marker { display: none; }
.cal-ev summary:hover { background: #e2e6ea; }
.cal-ev.c--u11 summary { border-left-color: var(--red); }
.cal-ev.c--u13 summary { border-left-color: var(--silver); }
.cal-ev.c--u15 summary { border-left-color: var(--ink); }
.cal-ev--game summary { background: #fdeaea; font-weight: 600; }
.cal-ev--game summary:hover { background: #f9d6d6; }
.cal-pop { position: absolute; z-index: 10; top: calc(100% + 4px); left: 0; width: 260px; background: var(--ink); color: var(--white); border-radius: var(--r); padding: .9rem 1rem; display: grid; gap: .3rem; font-size: .92rem; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.cal-row .cal-day:nth-child(n+5) .cal-pop { left: auto; right: 0; }
.cal-pop strong { font-size: 1rem; }
.cal-desc { color: var(--silver); }
.cal-agenda { display: none; }
.agenda-day { font-size: 1.35rem; margin: 1.5rem 0 .6rem; }
.agenda-day.is-today { color: var(--red); }
@media (max-width: 760px) {
  .cal-grid { display: none; }
  .cal-agenda { display: block; }
  .cal-bar .btn { padding: .6em .8em; font-size: .9rem; }
}

.subscribe { margin-top: 3rem; background: var(--ink); color: var(--white); border-radius: var(--r); padding: 1.75rem; border-top: 5px solid var(--red); }
.subscribe p { color: #ddd; max-width: 60ch; }
.sub-buttons { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.sub-help summary { cursor: pointer; color: var(--silver); }
.sub-help code { background: #1c1c1c; border-color: #333; color: var(--white); }
.sub-help ul { padding-left: 1.2em; }

/* Footer */
.footer { background: var(--ink); color: #ccc; border-top: 4px solid var(--red); margin-top: 0; }
.footer a { color: var(--white); }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; padding: 2.5rem 0 2rem; }
.footer-brand { display: flex; gap: 1rem; align-items: flex-start; }
.footer-brand strong { font-family: var(--display); font-size: 1.4rem; color: var(--white); }
.footer-brand p { margin: .25rem 0 0; }
.footer-links, .footer-social { display: grid; gap: .45rem; align-content: start; }
.footer-social a { display: flex; align-items: center; gap: .5rem; text-decoration: none; }
.footer-base { display: flex; justify-content: space-between; border-top: 1px solid #262626; padding: 1rem 0 1.4rem; font-size: .9rem; }
.footer-base a { color: var(--silver); }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }

/* ---------- Admin ---------- */
.admin-body { background: var(--ice); }
.admin-main { padding: 2rem 0 4rem; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.admin-head h1 { margin: 0; }
.alert { padding: .8rem 1rem; border-radius: var(--r); margin: 0 0 1.25rem; }
.alert p { margin: 0; }
.alert--ok { background: #eef8ee; border: 1px solid #b8dcb8; }
.alert--err { background: #fff0f0; border: 1px solid #efb9b9; border-left: 5px solid var(--red); }
.empty-box { background: var(--white); border: 1px dashed var(--silver); border-radius: var(--r); padding: 2rem; text-align: center; }

.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--silver-soft); border-radius: var(--r); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.admin-table th, .admin-table td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--silver-soft); vertical-align: middle; }
.admin-table th { background: var(--ink); color: var(--white); font-weight: 600; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table a { color: var(--ink); }
.row-actions { white-space: nowrap; display: flex; gap: .9rem; }
.row-actions a { color: var(--red); }
.state { font-size: .85rem; font-weight: 600; padding: .2em .55em; border-radius: 3px; }
.state--published { background: #e7f4e7; color: #1f5d1f; }
.state--draft { background: var(--ice); color: var(--muted); }
.state--scheduled { background: #fff3d6; color: #6b4b00; }

label { display: grid; gap: .3rem; font-weight: 600; margin-bottom: 1rem; }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; margin-bottom: .5rem; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  font: 400 1rem/1.4 var(--body); color: var(--text); background: var(--white); border: 1px solid var(--silver); border-radius: var(--r); padding: .65rem .75rem; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: var(--red); }
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { width: 1.1rem; height: 1.1rem; accent-color: var(--red); }
fieldset { border: 1px solid var(--silver-soft); background: var(--white); border-radius: var(--r); padding: 1rem 1.25rem .5rem; margin: 0 0 1.25rem; }
legend { font-family: var(--display); font-weight: 800; font-size: 1.25rem; padding: 0 .35rem; }
.opt { font-weight: 400; color: var(--muted); font-size: .9rem; }
.hint { margin: -.5rem 0 1rem; color: var(--muted); font-size: .95rem; }
.hint summary { cursor: pointer; }

.editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; align-items: start; }
.editor-main { background: var(--white); border: 1px solid var(--silver-soft); border-radius: var(--r); padding: 1.25rem; }
.editor-main textarea[name=body] { min-height: 22rem; font-size: 1.05rem; }
.thumb { border-radius: var(--r); margin-bottom: .5rem; max-height: 160px; object-fit: cover; width: 100%; }
@media (max-width: 900px) { .editor { grid-template-columns: 1fr; } }

.settings { max-width: 780px; }
.team-row { display: grid; grid-template-columns: 1fr 1.4fr 1.4fr; gap: 0 1rem; border-top: 1px solid var(--silver-soft); padding-top: 1rem; }
.team-row .wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .team-row { grid-template-columns: 1fr; } }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.user-list { list-style: none; padding: 0; margin: 0 0 1.5rem; background: var(--white); border: 1px solid var(--silver-soft); border-radius: var(--r); }
.user-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1rem; border-bottom: 1px solid var(--silver-soft); }
.user-list li:last-child { border-bottom: 0; }

.auth-card { max-width: 420px; margin: 4rem auto; background: var(--white); border-top: 5px solid var(--red); border-radius: var(--r); padding: 2rem; text-align: center; }
.auth-card img { margin: 0 auto 1rem; }
.auth-card form { text-align: left; margin-bottom: 1rem; }
.auth-card .btn { width: 100%; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Extra ("Other") calendars */
.tag--other { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--silver); }
.cal-ev.c--other summary { border-left-color: var(--silver-soft); border-left-style: dashed; }
.chips a.chip--other:not([aria-current]) { border-style: dashed; }
.sub-note { font-size: .92rem; color: var(--silver) !important; }
