/* P1 admission timetable pages (/p1, /p1/<slug>). Built on site.css: same tokens, waves, sparkles
   and dreamy glass cards. Traditional Chinese first, so these pages stay lang="zh-Hant". */

.p1-back { display: none; margin-left: auto; padding: 8px 16px; border-radius: 999px; background: var(--navy); color: #fff; font: 800 15px var(--head); text-decoration: none; }

.p1-hero { padding-bottom: 34px; }
.p1-hero h1 { max-width: 920px; margin: 0 auto; }
.p1-hero h1 .p1-h1sub { display: block; font-size: .62em; margin-top: 6px; color: var(--navy); }
.p1-hero .lead { font-weight: 700; }
.p1-crumbbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 12px; padding-bottom: 12px; }
.p1-crumb { font: 700 15px var(--head); color: var(--soft); }
.p1-crumb a { color: var(--blue); }

/* Search: the big box in the /p1 hero, and the small one in the breadcrumb bar of inner pages */
.p1-search { max-width: 640px; margin: 22px auto 0; }
.p1-search[hidden] { display: none; }
.p1-search label { display: block; font: 800 15px var(--head); color: var(--navy); margin-bottom: 6px; }
.p1-search input, .p1-mini input {
  width: 100%; font: 700 18px var(--body); color: var(--navy); padding: 15px 20px 15px 52px; border-radius: 999px;
  border: 3px solid #fff; outline: none; box-shadow: 0 0 0 2px var(--gold-deep), 0 10px 26px rgba(212, 138, 0, .25);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f2c6e' stroke-width='2.6' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E") 18px center / 22px no-repeat;
}
.p1-search input:focus, .p1-mini input:focus { box-shadow: 0 0 0 3px var(--blue), 0 10px 26px rgba(30, 95, 224, .25); }
.p1-mini { display: flex; gap: 6px; flex: 0 1 300px; }
.p1-mini input { font-size: 16px; padding: 8px 14px 8px 38px; background-position: 12px center; background-size: 17px; box-shadow: 0 0 0 2px var(--gold-pale); border-width: 2px; }
.p1-mini button { flex: none; cursor: pointer; border: 0; border-radius: 999px; padding: 8px 16px; background: var(--navy); color: #fff; font: 800 15px var(--head); }

/* The required disclaimer, near the top of every page */
.p1-notice {
  max-width: 860px; margin: 20px auto 0; padding: 14px 20px 14px 50px; position: relative; text-align: left;
  background: rgba(255, 255, 255, .9); border: 2px solid #fff; border-radius: 18px;
  font: 700 15px/1.6 var(--body); color: var(--navy); box-shadow: 0 8px 22px rgba(212, 138, 0, .2);
}
.p1-notice::before {
  content: "i"; position: absolute; left: 16px; top: 15px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; background: var(--navy); color: var(--gold); font: 900 14px/1 Georgia, serif;
}

.p1-status { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 12px; margin: 16px 0 0; font-size: 17px; color: var(--navy); }
.p1-status .p1-chk { flex-basis: 100%; margin: 0; }

/* Cards: the site's pearly glass on the dreamy background */
.p1-card {
  max-width: 1040px; margin: 28px auto 0; padding: 30px 32px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .86); border: 2px solid rgba(255, 255, 255, .95);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgba(255, 210, 63, .35), 0 16px 36px rgba(110, 80, 170, .16);
}
.p1-card h2 { font-size: 24px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.p1-card h2::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-pale); }
.p1-sub { margin: 0 0 14px; color: var(--soft); font-size: 15px; }
.p1-card > p:last-child, .p1-card > .p1-sub:last-child { margin-bottom: 0; }

.p1-steps, .p1-list, .p1-notes { margin: 0; padding-left: 1.4em; display: grid; gap: 10px; }
.p1-steps b { color: var(--navy); }
.p1-notes { margin-top: 14px; font-size: 15px; color: var(--soft); }
.p1-k2 { margin: 14px 0 0; padding: 12px 16px; border-radius: 14px; background: var(--gold-soft); border: 2px solid var(--gold-pale); font-size: 15px; }

/* Footnote refs, labels and checked dates */
.p1-ref { font: 800 13px var(--head); text-decoration: none; white-space: nowrap; }
.p1-lbl { display: inline-block; font: 700 13px/1.4 var(--head); color: var(--navy); background: var(--gold-soft); border: 1px solid var(--gold-pale); padding: 1px 8px; border-radius: 999px; }
.p1-chk { display: block; font: 600 12px/1.4 var(--head); color: var(--soft); margin-top: 3px; }
.p1-src-none { color: var(--soft); }

/* Timetables */
.p1-tablewrap { overflow-x: auto; }
.p1-tt { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 16px; }
.p1-tt caption { text-align: left; font: 700 14px var(--head); color: var(--soft); padding-bottom: 8px; }
.p1-tt thead th { text-align: left; font: 800 14px var(--head); color: #fff; background: var(--navy); padding: 10px 12px; }
.p1-tt thead th:first-child { border-radius: 14px 0 0 0; }
.p1-tt thead th:last-child { border-radius: 0 14px 0 0; }
.p1-tt tbody th, .p1-tt td { text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid rgba(15, 44, 110, .1); background: rgba(255, 255, 255, .7); }
.p1-tt tbody th { font-weight: 800; color: var(--navy); }
.p1-tt tr.st-done th, .p1-tt tr.st-done td { color: var(--soft); background: rgba(255, 255, 255, .45); }
.p1-tt tr.st-now th, .p1-tt tr.st-now td, .p1-tt tr.st-next th, .p1-tt tr.st-next td { background: #fff; }
.p1-tt tr.st-now th { box-shadow: inset 5px 0 0 var(--blue); }
.p1-tt tr.st-next th { box-shadow: inset 5px 0 0 var(--gold); }

.p1-state { display: inline-block; white-space: nowrap; font: 800 13px/1.4 var(--head); padding: 2px 10px; border-radius: 999px; }
.s-done { background: #eef0f6; color: #5d6b8f; }
.s-now { background: var(--blue); color: #fff; }
.s-started { background: var(--sky); color: var(--navy); }
.s-next { background: var(--gold); color: var(--navy); }
.s-tbc { background: #fff; color: var(--soft); border: 1.5px dashed #9aa7c7; }

/* Hub: one card per school */
.p1-schools { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.p1-schools li[hidden] { display: none; }
.p1-school {
  height: 100%; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 16px; border-radius: 18px;
  background: #fff; border: 2px solid var(--gold-pale); color: var(--ink); text-decoration: none; transition: transform .2s, border-color .2s;
}
a.p1-school:hover { transform: translateY(-3px); border-color: var(--gold); }
.p1-sname { font: 900 18px/1.35 var(--head); color: var(--navy); }
.p1-sname small { display: block; font: 600 13px/1.35 var(--head); color: var(--soft); }
.p1-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.p1-type { font: 800 13px var(--head); color: var(--soft); }
.p1-next { grid-column: 1 / -1; font-size: 15px; color: var(--soft); padding-top: 6px; border-top: 1px dashed rgba(15, 44, 110, .15); }
.p1-next b { display: block; color: var(--navy); font-size: 16px; }
.p1-fee { grid-column: 1 / -1; font-size: 14px; color: var(--soft); }
.p1-fees td:nth-child(2) { font-weight: 700; color: var(--navy); }
.p1-hold { opacity: .8; }
.p1-empty { margin: 14px 0 0; padding: 14px 18px; border-radius: 16px; background: var(--gold-soft); color: var(--navy); font-weight: 700; }
.p1-empty[hidden] { display: none; }
.p1-more { margin-top: 18px; }
.p1-more summary { cursor: pointer; font: 800 15px var(--head); color: var(--blue); }
.p1-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.p1-links a { display: block; padding: 18px 20px; border-radius: 18px; background: var(--gold-soft); border: 2px solid var(--gold-pale); text-decoration: none; color: var(--soft); font-size: 15px; }
.p1-links a:hover { border-color: var(--gold); }
.p1-links b { display: block; font: 900 19px var(--head); color: var(--navy); margin-bottom: 2px; }
.p1-links b::after { content: " →"; color: var(--gold-deep); }

.p1-badge { display: inline-block; white-space: nowrap; font: 800 14px/1.4 var(--head); padding: 4px 12px; border-radius: 999px; }
.b-open { background: var(--blue); color: #fff; }
.b-r2 { background: var(--gold); color: var(--navy); box-shadow: 0 2px 0 var(--gold-deep); }
.b-iv { background: var(--sky); color: var(--navy); }
.b-wait { background: #fff; color: var(--navy); border: 2px solid var(--navy); }
.b-done { background: #eef0f6; color: #5d6b8f; }
.b-tbc { background: #fff; color: var(--soft); border: 1.5px dashed #9aa7c7; }

.p1-legend { list-style: none; padding: 0; margin: 18px 0 10px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--soft); }
.p1-legend li { display: flex; align-items: center; gap: 6px; }
.p1-legend .p1-badge { font-size: 12px; padding: 2px 9px; }

/* Filter buttons (shown only when the inline script runs) */
.p1-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.p1-filters[hidden] { display: none; }
.p1-filters button {
  cursor: pointer; border: 2px solid var(--navy); background: #fff; color: var(--navy);
  font: 800 15px var(--head); padding: 6px 16px; border-radius: 999px;
}
.p1-filters button[aria-pressed="true"] { background: var(--navy); color: var(--gold); }
.p1-filters button:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.p1-count { margin-left: auto; font: 700 14px var(--head); color: var(--soft); }

/* Calendar */
.p1-cal { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 20px 0 0; }
.p1-cal .btn { font-size: 16px; padding: 12px 20px; }
.p1-cal span { flex: 1 1 280px; font-size: 14px; color: var(--soft); }
.p1-cal-none { margin: 18px 0 0; font-size: 15px; color: var(--soft); }

/* Add-to-calendar list: one Google Calendar button per date */
.p1-gcal { margin-top: 22px; padding: 20px 22px; border-radius: 20px; background: var(--gold-soft); border: 2px solid var(--gold-pale); }
.p1-gcal h3 { font-size: 19px; margin-bottom: 10px; }
.p1-gcal ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.p1-gcal li {
  display: grid; grid-template-columns: 300px 1fr auto; align-items: center; gap: 4px 14px;
  padding: 10px 12px 10px 16px; border-radius: 14px; background: #fff;
}
.p1-gd { font: 800 15px var(--head); color: var(--navy); }
.p1-gt { font-size: 15px; color: var(--soft); }
.p1-gbtn {
  white-space: nowrap; text-decoration: none; padding: 8px 14px; border-radius: 999px;
  background: var(--blue); color: #fff; font: 800 14px var(--head);
}
.p1-gbtn:hover { background: var(--navy); }
.p1-gbtn:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.p1-gcal .p1-cal { margin-top: 16px; }
.p1-gcal { scroll-margin-top: 90px; }
.p1-tocal { padding: 5px 14px; border-radius: 999px; background: var(--blue); color: #fff; text-decoration: none; font: 800 14px var(--head); white-space: nowrap; }
.p1-gcal .p1-cal .btn { font-size: 15px; padding: 10px 18px; box-shadow: 0 0 0 2px var(--navy); }

/* Tips */
.p1-tips { margin: 0; padding: 0; list-style: none; counter-reset: tip; display: grid; gap: 12px; }
.p1-tips li {
  counter-increment: tip; position: relative; padding: 14px 16px 14px 58px; border-radius: 18px;
  background: #fff; border: 2px solid var(--gold-pale);
}
.p1-tips li::before {
  content: counter(tip); position: absolute; left: 14px; top: 14px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--navy); color: var(--gold); font: 900 16px/1 var(--head);
}
.p1-tips b { display: block; color: var(--navy); font-size: 17px; margin-bottom: 2px; }

/* Follow card: the lemon-gold of the hero */
.p1-follow { text-align: center; background: radial-gradient(circle at 50% 0%, var(--gold-hi), var(--gold) 70%); border-color: #fff; }
.p1-follow h2 { justify-content: center; }
.p1-follow h2::before { display: none; }
.p1-follow .cta { margin: 16px 0 12px; }
.p1-follow .btn { font-size: 17px; }
.p1-follow .p1-en { color: var(--navy); font-size: 14px; margin: 0; }

.p1-school-link .btn { box-shadow: 0 0 0 2px var(--navy), 0 6px 0 var(--navy); }
.p1-sources ol { margin: 0 0 12px; padding-left: 1.5em; display: grid; gap: 10px; font-size: 15px; }
.p1-sources a { word-break: break-all; }
.p1-en-card p { margin: 0 0 8px; }
.p1-backlink { max-width: 1040px; margin: 24px auto 0; font: 800 16px var(--head); }

@media (max-width: 1020px) {
  .p1-back { display: inline-block; }
}
@media (max-width: 720px) {
  .p1-card { padding: 22px 16px; margin-top: 20px; border-radius: 24px; }
  .p1-card h2 { font-size: 21px; }
  .p1-notice { font-size: 14px; padding: 12px 14px 12px 44px; }
  .p1-notice::before { left: 12px; top: 13px; }
  .p1-status { font-size: 16px; }
  /* Tables become stacked cards on phones */
  .p1-tt thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .p1-tt caption { display: block; width: 100%; }
  .p1-tt, .p1-tt tbody, .p1-tt tr, .p1-tt tbody th, .p1-tt td { display: block; width: 100%; }
  .p1-tt tr { margin-bottom: 12px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(15, 44, 110, .12); background: #fff; }
  .p1-tt tbody th, .p1-tt td { border-bottom: 0; padding: 6px 14px; }
  .p1-tt tbody th { padding-top: 12px; font-size: 17px; }
  .p1-tt td:last-child { padding-bottom: 12px; }
  .p1-tt td[data-label]::before { content: attr(data-label); display: block; font: 700 12px var(--head); color: var(--soft); }
  .p1-tt tr.st-now th, .p1-tt tr.st-next th { box-shadow: none; }
  .p1-tt tr.st-now { border-left: 5px solid var(--blue); }
  .p1-tt tr.st-next { border-left: 5px solid var(--gold); }
  .p1-schools, .p1-links { grid-template-columns: 1fr; }
  .p1-search input { font-size: 16px; padding: 13px 16px 13px 46px; background-position: 15px center; }
  .p1-mini { flex-basis: 100%; }
  .p1-gcal { padding: 16px 12px; }
  .p1-gcal li { grid-template-columns: 1fr; padding: 12px 14px; }
  .p1-gbtn { justify-self: start; margin-top: 4px; padding: 10px 16px; }
  .p1-tips li { padding-left: 52px; }
  .p1-count { margin-left: 0; flex-basis: 100%; }
}

/* /p1/data: bar chart and fact list */
.p1-bars { display: grid; gap: 10px; margin: 14px 0 6px; }
.p1-bar { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 10px; font-size: 15px; }
.p1-bar-k { font-weight: 800; color: var(--navy); }
.p1-bar-track { height: 22px; border-radius: 999px; background: var(--gold-soft); overflow: hidden; }
.p1-bar-track span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), #eea400); }
.p1-bar-v { font-weight: 800; color: var(--navy); white-space: nowrap; }
@media (max-width: 560px) { .p1-bar { grid-template-columns: 56px 1fr; } .p1-bar-v { grid-column: 2; font-size: 14px; } }
.p1-facts { margin: 10px 0 0; padding-left: 1.2em; display: grid; gap: 8px; }
.p1-facts b { color: var(--navy); font-size: 1.12em; }
.p1-src { margin: 12px 0 0; font-size: 13px; color: var(--soft); }
