:root {
  --primary: #0b4f6c;
  --primary-dark: #083a50;
  --accent: #20a39e;
  --text: #1f2933;
  --muted: #616e7c;
  --bg: #f5f7fa;
  --card: #ffffff;
  --border: #dde3ea;
  --ok: #1e7f4f;
  --ok-bg: #e3f5ec;
  --warn: #8a5a00;
  --warn-bg: #fff3d6;
  --err: #a12a2a;
  --err-bg: #fde8e8;
  --radius: 10px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-wrap: break-word; /* long emails / file names don't push the page wider than the screen */
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(1.5rem, 5vw, 2rem); }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
code { background: #eef2f6; padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.muted { color: var(--muted); }
small { color: var(--muted); font-weight: normal; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.section { padding: 36px 16px; }

/* Header */
.site-header { background: #00525e; color: #fff; } /* same teal as the logo */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1.2rem; text-decoration: none; }
.brand img { display: block; width: 48px; height: 47px; }
.nav nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 8px 0; }
.nav nav a, .nav nav .link { color: #dbeaf2; text-decoration: none; font-size: .95rem; }
.nav nav a:hover, .nav nav a.active, .nav nav .link:hover { color: #fff; }
.nav nav a.btn { color: #fff; }
/* Committees dropdown: opens on hover / keyboard focus (no JavaScript) */
.nav-group { position: relative; }
.nav-parent::after { content: " ▾"; font-size: .8em; }
.nav nav .nav-group.active > .nav-parent { color: #fff; }
.nav-sub {
  display: none; position: absolute; top: 100%; left: -16px; z-index: 20; min-width: 230px; padding: 8px 0;
  background: #00525e; border-radius: 0 0 8px 8px; box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
}
.nav-group:hover .nav-sub, .nav-group:focus-within .nav-sub { display: block; }
.nav nav .nav-sub a { display: block; padding: 8px 16px; white-space: nowrap; }
.nav nav .nav-sub a:hover { background: rgba(255, 255, 255, .08); }
.inline { display: inline; margin: 0; }
.link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-btn { display: none; }
.demo-banner { background: var(--warn-bg); color: var(--warn); text-align: center; padding: 6px 16px; font-size: .9rem; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%); color: #fff; padding: 72px 0 80px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); max-width: 760px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; opacity: .85; margin: 0 0 8px; }
.hero-meta { font-size: 1.15rem; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
/* Logo and text always side by side; the logo shrinks on narrow screens */
.hero-grid { display: flex; align-items: center; gap: clamp(16px, 4vw, 40px); }
.hero-grid > div { min-width: 0; }
.hero-logo { flex: none; width: clamp(110px, 26vw, 260px); height: auto; border-radius: 12px; box-shadow: 0 8px 28px rgba(0, 0, 0, .25); }

/* Buttons */
.btn {
  display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: 11px 20px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(.95); }
.btn-small { padding: 6px 14px; font-size: .9rem; }
.btn-ghost { background: transparent; border: 2px solid rgba(255,255,255,.8); }
.btn-ghost-dark { background: transparent; color: var(--primary); border: 2px solid var(--border); }

/* Committees (layout as on tapconference.org: 3 / 2 / 1 columns, small photo left, text right) */
.section.page-title { padding-bottom: 4px; }
.people-band { background: #eef2f6; padding: 32px 0 40px; }
.people { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 24px; }
.person { display: flex; align-items: flex-start; gap: 16px; height: 100%; padding: 10px 8px; border-radius: 8px; color: var(--text); text-decoration: none; }
a.person:hover { background: rgba(255, 255, 255, .7); }
a.person:hover .person-name { text-decoration: underline; }
.person-photo { flex: none; width: 50px; height: 50px; margin-top: 4px; border-radius: 6px; object-fit: cover; }
.person-initials { display: flex; align-items: center; justify-content: center; background: var(--primary); color: #fff; font-weight: 700; font-size: .95rem; }
.person-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.person-name { font-weight: 700; font-size: 1.05rem; color: var(--primary); line-height: 1.3; }
.person-affiliation { font-style: italic; color: var(--muted); font-size: .93rem; line-height: 1.4; }
@media (max-width: 900px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .people { grid-template-columns: 1fr; } .people-band { padding: 20px 0 28px; } }

/* Previous editions */
.editions td { font-size: .92rem; }
.edition-date { white-space: nowrap; }
.edition-links a { display: block; white-space: nowrap; }
@media (max-width: 860px) { .edition-date { white-space: normal; } .edition-links a { display: inline-block; margin-right: 14px; } }

/* Cards & grids */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 20px; }
.about-lead { font-size: 1.15rem; font-weight: 600; color: var(--primary); }
/* Scientific themes: 3 columns on wide screens, one under the other below 900px */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 16px; }
.pillars li { margin-bottom: 6px; }
.pillar-no { margin: 0 0 2px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pillars h3 { margin-top: 0; }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr; } }
.program { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 20px; }
.card ul { margin: 0; padding-left: 20px; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 6px 0; border-bottom: 1px solid var(--border); }
ul.plain li:last-child { border-bottom: 0; }
ul.plain li span { display: inline-block; min-width: 56px; font-weight: 600; color: var(--primary); }

/* Important dates: 8 boxes = 4 per row on desktop, 2 on tablet, 1 on small phones */
.dates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .dates { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .dates { grid-template-columns: 1fr; } }
.date { background: var(--card); border-left: 4px solid var(--accent); border-radius: 6px; padding: 14px 16px; }
.date span { display: block; font-weight: 700; color: var(--primary); }

.fee { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.fee > div:first-child { flex: 1 1 320px; min-width: 0; }
.fee-box { text-align: center; }
.fee-amount { font-size: 2.2rem; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.steps { padding-left: 20px; }
.steps li { margin-bottom: 8px; }

/* Forms */
.form-page { max-width: 560px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .95rem; }
.form input:not([type=checkbox]):not([type=radio]), .form textarea, .form select {
  font: inherit; padding: 9px 11px; border: 1px solid var(--border); border-radius: 6px; background: #fff; width: 100%;
}
.form input:disabled { background: #eef2f6; color: var(--muted); }
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form h2, .form h3 { margin: 6px 0 0; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: normal; }
.form .btn { align-self: flex-start; }
.row-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.generated-password { display: flex; flex-direction: column; gap: 6px; background: var(--ok-bg); color: var(--ok); border-radius: 8px; padding: 12px 14px; }
.generated-password code { font-size: 1.25rem; font-weight: 700; letter-spacing: .04em; color: var(--text); background: #fff; border-radius: 6px; padding: 6px 10px; word-break: break-all; user-select: all; }
.generated-password small { color: var(--muted); }
/* Confirmation dialog (no JavaScript): hidden until its id is the page's #target */
.modal { display: none; position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center; padding: 16px; }
.modal:target { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 30, 40, .55); }
.modal-box { position: relative; background: var(--card); color: var(--text); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; padding: 24px; border-top: 5px solid var(--err); }
.modal-box h2 { margin: 0 0 10px; }
/* "To be announced" (programme, fees) */
.tba { display: inline-block; margin: 0 0 10px; font-size: 1.05rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary); background: #e6f4f3; border: 1px solid #bfe3e0; border-radius: 999px; padding: 4px 14px; }
.tba-card { border-left: 5px solid var(--accent); }
.tba-card p:last-child { margin-bottom: 0; }
.program-outline h3 { margin-top: 0; }
.program-outline p { margin-bottom: 0; }
/* Privacy notice */
.privacy h2 { font-size: 1.2rem; margin: 28px 0 8px; }
.privacy li { margin-bottom: 6px; }
.confirm-email-form { margin-top: 10px; gap: 6px; }
.confirm-email-form .check { font-size: .9rem; }
/* Show/hide password (eye button added by js/password-toggle.js) */
.pw-wrap { position: relative; display: block; }
.form .pw-wrap input { padding-right: 46px; }
.pw-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); display: flex; align-items: center; justify-content: center;
  width: 38px; height: 34px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.pw-toggle:hover { color: var(--primary); background: #eef2f6; }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 14px; }
.form-card { max-width: 720px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); text-decoration: underline; cursor: pointer; }
.service-actions { white-space: nowrap; }
.service-actions form { margin-left: 12px; }

/* Registration fees */
.fee-table { width: 100%; max-width: 520px; border-collapse: collapse; margin: 12px 0 0; }
.fee-table th, .fee-table td { padding: 8px 0; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.fee-table th { background: none; font-weight: 600; color: var(--text, inherit); }
.fee-table th small { display: block; font-weight: normal; }
.fee-table td.num { text-align: right; font-weight: 700; color: var(--primary); white-space: nowrap; padding-left: 16px; }
.fee-choice { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.fee-choice legend { font-weight: 600; font-size: .95rem; margin-bottom: 6px; padding: 0; }
.form label.fee-option { align-items: flex-start; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: #fff; }
.fee-option input { margin-top: 4px; }

/* Abstract submission page */
.lead-text { font-size: 1.05rem; max-width: 760px; }
/* Desktop: form left, template + info right. Narrow: template above the form, info below. */
.abstract-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "form template" "form info" "form ."; grid-template-rows: auto auto 1fr; gap: 16px 24px; align-items: start; }
.abstract-grid .abstract-form { grid-area: form; }
.abstract-grid .template-card { grid-area: template; }
.abstract-grid .info-card { grid-area: info; }
.abstract-aside { display: contents; }
.abstract-form h2 { font-size: 1.15rem; margin: 0; }
.abstract-grid aside h2 { font-size: 1.1rem; margin: 0 0 8px; }
.abstract-grid aside .btn { display: block; text-align: center; }
.template-card { border-top: 4px solid var(--accent); }
.deadline-note { margin: 0; background: var(--warn-bg); color: var(--warn); border-left: 4px solid var(--warn); border-radius: 6px; padding: 10px 14px; }
.deadline-note span { font-size: .9rem; }
.plain-list { margin: 0; padding-left: 18px; }
.plain-list li { margin-bottom: 6px; }
.abstract-page .flash { margin: 0 0 16px; }
@media (max-width: 900px) { .abstract-grid { grid-template-columns: 1fr; grid-template-areas: "template" "form" "info"; grid-template-rows: auto; } }

/* Roadmap: steps from abstract to conference (a row on wide screens, a list below 900px) */
.roadmap { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; counter-reset: none; }
.roadmap li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 6px; }
.roadmap li::before { content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 3px; background: var(--border); z-index: 0; }
.roadmap li:first-child::before { display: none; }
.roadmap li.done::before, .roadmap li.current::before { background: var(--ok); }
.roadmap-no { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #fff; border: 3px solid var(--border); color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.roadmap li.done .roadmap-no { background: var(--ok); border-color: var(--ok); color: #fff; }
.roadmap li.current .roadmap-no { border-color: var(--accent); color: var(--primary); box-shadow: 0 0 0 4px rgba(32, 164, 154, .18); }
.roadmap-text strong { display: block; font-size: .92rem; color: var(--primary); line-height: 1.3; }
.roadmap-text small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.4; margin-top: 4px; }
.roadmap li.current .roadmap-text strong::after { content: " · you are here"; color: var(--accent); font-weight: 600; font-size: .8rem; }
@media (max-width: 900px) {
  .roadmap { grid-template-columns: 1fr; gap: 0; }
  .roadmap li { flex-direction: row; align-items: flex-start; text-align: left; gap: 12px; padding: 0 0 16px; }
  .roadmap li::before { display: none; }
  .roadmap li:not(:last-child)::after { content: ""; position: absolute; left: 16px; top: 38px; bottom: 2px; width: 3px; background: var(--border); }
  .roadmap li.done:not(:last-child)::after { background: var(--ok); }
  .roadmap-no { flex: none; margin: 0; }
  .roadmap-text { padding-top: 6px; }
}

/* Additional services */
.services-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.services-list li { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; background: #fff; }
.service-text { min-width: 0; }
.form label.service-qty { flex: none; width: 96px; font-size: .85rem; }
@media (max-width: 480px) { .services-list li { flex-direction: column; } .form label.service-qty { width: 100%; } }

.flash { border-radius: 8px; padding: 12px 16px; margin: 20px 0 0; }
.flash-success { background: var(--ok-bg); color: var(--ok); }
.flash-info { background: var(--warn-bg); color: var(--warn); }
.flash-error { background: var(--err-bg); color: var(--err); }
.form-page .flash { margin: 0 0 16px; }

/* Dashboard */
.status-steps { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 16px; }
.status-steps > li { background: var(--card); border: 1px solid var(--border); border-left: 5px solid var(--border); border-radius: var(--radius); padding: 20px 24px; }
.status-steps > li.done { border-left-color: var(--ok); }
.status-steps > li.current { border-left-color: var(--accent); }
.status-steps > li.locked { opacity: .65; }
.step-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.step-head h2 { margin: 0; font-size: 1.2rem; }
.status-steps .form { max-width: 520px; margin-top: 12px; }
.submitted { background: var(--bg); border-radius: 8px; padding: 12px 16px; margin: 12px 0; }
.submitted p { margin: 0 0 4px; }

.badge { display: inline-block; font-size: .8rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-todo { background: var(--warn-bg); color: var(--warn); }
.badge-locked { background: #e6e9ee; color: var(--muted); }
.badge-bad { background: var(--err-bg); color: var(--err); }

/* Admin */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 22px; }
.stat span { display: block; font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: #eef2f6; font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.stack-table td[data-label="Account"], .stack-table td[data-label="When"] { white-space: nowrap; }

/* Admin: toolbar, participant page */
.title-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.title-row h1 { margin: 0; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; }
.section-card { margin-top: 20px; }
table.details th { width: 38%; background: none; padding-left: 0; }
table.details td { padding-right: 0; }
.card table.details tr:last-child td, .card table.details tr:last-child th { border-bottom: 0; }
.card .table-wrap { margin-top: 8px; }
.radio-row { border: 0; padding: 0; margin: 0; display: flex; gap: 20px; flex-wrap: wrap; }
.radio-row legend { font-weight: 600; font-size: .95rem; margin-bottom: 6px; padding: 0; }
.inline-form { margin-top: 12px; }
.danger { border-color: #f0c4c4; }
.btn-danger { background: var(--err); }
.review-comment { background: #fff; border-left: 3px solid var(--accent); padding: 8px 12px; margin-top: 8px; }
.small { font-size: .85rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
ul.plain li span { min-width: 150px; }

/* Receipt */
.receipt { max-width: 820px; }
.receipt-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-bottom: 2px solid var(--primary); padding-bottom: 16px; margin-bottom: 20px; }
.receipt-meta h1 { font-size: 1.6rem; margin-bottom: 8px; }
.receipt-meta table th { background: none; padding: 2px 12px 2px 0; border: 0; }
.receipt-meta table td { padding: 2px 0; border: 0; }
.receipt-to { margin-bottom: 20px; }
.receipt-items { margin-bottom: 16px; border: 1px solid var(--border); }
.receipt-items .num { text-align: right; white-space: nowrap; }
.receipt-items tfoot th { background: #eef2f6; border-top: 2px solid var(--border); }

@media print {
  .site-header, .site-footer, .demo-banner, .flash, .no-print { display: none !important; }
  body { background: #fff; }
  .section { padding: 0; }
  .receipt { border: 0; padding: 0; max-width: none; }
}

/* Footer */
.site-footer { background: var(--primary-dark); color: #c9d8e2; padding: 24px 0; margin-top: 40px; font-size: .92rem; }
.site-footer a { color: #fff; }
.site-footer p { margin: 4px 0; }

/* ---------- Tablets and phones ---------- */

/* Header: menu button instead of the full link row */
@media (max-width: 1100px) {
  .nav { min-height: 60px; }
  .nav-toggle-btn {
    display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    border: 1px solid rgba(255,255,255,.35); border-radius: 8px; cursor: pointer;
  }
  .nav-toggle:focus-visible + .nav-toggle-btn { outline: 2px solid #fff; outline-offset: 2px; }
  .nav-toggle-icon, .nav-toggle-icon::before, .nav-toggle-icon::after {
    display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; position: relative;
  }
  .nav-toggle-icon::before, .nav-toggle-icon::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-icon::before { top: -6px; }
  .nav-toggle-icon::after { top: 6px; }
  .nav-toggle:checked + .nav-toggle-btn .nav-toggle-icon { background: transparent; }
  .nav-toggle:checked + .nav-toggle-btn .nav-toggle-icon::before { top: 0; transform: rotate(45deg); }
  .nav-toggle:checked + .nav-toggle-btn .nav-toggle-icon::after { top: 0; transform: rotate(-45deg); }

  .nav nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 0 0 12px; }
  .nav-toggle:checked ~ nav { display: flex; }
  .nav nav > a, .nav nav .link { display: block; width: 100%; text-align: left; padding: 12px 4px; font-size: 1rem; border-top: 1px solid rgba(255,255,255,.15); }
  .nav nav a.btn { margin-top: 12px; text-align: center; padding: 11px 20px; border-top: 0; }
  /* Committees: sub-items always listed, indented, in the phone menu */
  .nav nav .nav-parent { display: block; padding: 12px 4px; font-size: 1rem; border-top: 1px solid rgba(255,255,255,.15); }
  .nav-parent::after { content: ""; }
  .nav-sub { display: block; position: static; min-width: 0; padding: 0 0 6px; background: none; box-shadow: none; }
  .nav nav .nav-sub a { padding: 7px 4px 7px 20px; font-size: .95rem; white-space: normal; }
  .nav nav .nav-sub a:hover { background: none; }
}

/* Tables: each row becomes a small card */
@media (max-width: 860px) {
  /* Admin lists: each row becomes a small card, column name above each value */
  .table-wrap:has(.stack-table) { background: none; border: 0; }
  .stack-table thead { display: none; }
  .stack-table, .stack-table tr, .stack-table td { display: block; width: 100%; }
  .stack-table tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; }
  .stack-table tr { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }
  .stack-table td { border: 0; padding: 4px 0; overflow-wrap: anywhere; }
  .stack-table td[data-label]::before { content: attr(data-label); display: block; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
  .stack-table td.stack-link { padding-top: 8px; font-weight: 600; }
}

@media (max-width: 640px) {
  .hero { padding: 40px 0 48px; }
  .hero-meta { font-size: 1rem; margin-bottom: 20px; }
  .section { padding: 28px 16px; }
  .card { padding: 18px; }
  .status-steps > li { padding: 16px 18px; }
  .fee-box { width: 100%; }
  .fee-amount { font-size: 1.9rem; }
  .stat { padding: 12px 16px; }
  .stat span { font-size: 1.5rem; }
  th, td { padding: 9px 10px; }

  /* Label/value tables (participant details, receipt): label above value */
  table.details, table.details tbody, table.details tr, table.details th, table.details td { display: block; width: 100%; }
  table.details tr { border-bottom: 1px solid var(--border); padding: 8px 0; }
  .card table.details tr:last-child { border-bottom: 0; }
  table.details th, table.details td { border: 0; padding: 0; }
  table.details td { overflow-wrap: anywhere; }

  /* Program / lists: time or label above the text */
  ul.plain li span { display: block; min-width: 0; }

  /* Full-width buttons are easier to tap */
  .hero-actions .btn, .form .btn, .row-actions .btn { width: 100%; text-align: center; }
  .form .btn { align-self: stretch; }
}
