/* Page frame: masthead, event slate, day strip, workspace columns, footer, mobile nav. */

.skip { position: fixed; top: -100px; left: 10px; z-index: 20; background: var(--sheet); padding: 14px; }
.skip:focus { top: 10px; }

main { max-width: 1760px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------------------------------------------------------------- masthead */

.masthead {
  min-height: var(--masthead);
  padding: 12px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border-bottom: 1px solid var(--rule);
}
.brand { display: block; width: 230px; flex-shrink: 0; }
.brand img { display: block; width: 100%; height: auto; }
.masthead-tools { display: flex; align-items: center; gap: 20px; }
.masthead-tools select { width: 180px; min-height: 38px; background: transparent; border-color: transparent; }
.masthead-tools select:hover { border-color: var(--rule); }
.save-indicator { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--fs-s); }
.save-indicator i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: none; }
.save-indicator.error { color: var(--danger); }
.save-indicator.error i { background: var(--danger); }

/* ---------------------------------------------------------------- slate */

.slate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px 48px;
  padding: 36px 0 28px;
}
.product { font: 600 var(--fs-s)/1.5 var(--display); letter-spacing: .01em; }
.product > span[aria-hidden] { color: var(--cue); }
.product-line { margin-left: 10px; font: 400 var(--fs-s) var(--body); color: var(--muted); letter-spacing: 0; }

#event-title {
  margin-top: 14px;
  font: 800 clamp(30px, 4.6vw, 68px)/1.04 var(--display);
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.slate-meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: var(--fs-s); color: var(--muted); }
#event-meta { color: var(--ink-soft); font-weight: 600; }

.slate-tools { width: 300px; display: grid; gap: 6px; }

/* ---------------------------------------------------------------- day strip */

.day-strip {
  display: flex; align-items: stretch; gap: 8px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.day-tabs { display: flex; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.day-tab {
  display: flex; align-items: center; gap: 10px;
  min-height: 64px;
  padding: 8px 20px 8px 16px;
  border: 0; border-right: 1px solid var(--rule); border-radius: 0;
  background: transparent;
  white-space: nowrap; text-align: left;
}
.day-tab:hover { background: var(--hover); }
.day-tab[aria-pressed=true] { background: var(--ink); color: var(--paper); }
.day-num { font: 700 28px/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.day-sub { display: flex; flex-direction: column; font-size: var(--fs-s); line-height: 1.3; }
.day-sub small { font-size: var(--fs-xs); font-weight: 500; opacity: .7; }
.add-day { flex: none; align-self: center; border-color: transparent; background: transparent; color: var(--blue-ink); }
.day-tools { margin-left: auto; display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.inline-field { flex-direction: row; align-items: center; gap: 10px; }
.inline-field input { width: auto; min-height: 38px; }

/* ---------------------------------------------------------------- workspace */

.workspace {
  display: grid;
  grid-template-columns: minmax(330px, 400px) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding-top: 8px;
}
.output { min-width: 0; padding-top: 20px; scroll-margin-top: 12px; }
.editor { min-width: 0; scroll-margin-top: 12px; }

/* ---------------------------------------------------------------- footer */

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px;
  margin-top: 56px; padding: 28px 0 32px;
  border-top: 1px solid var(--ink);
  color: var(--muted); font-size: var(--fs-xs);
}
.footer-note { display: flex; align-items: center; gap: 12px; }
.footer-note img { border-radius: 8px; }
.footer-note p { font-size: var(--fs-s); color: var(--ink-soft); }
.footer-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.footer-actions button { font-size: var(--fs-s); }
.footer-contact {
  flex: 0 0 100%;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  padding-top: 20px; border-top: 1px solid var(--rule);
}
.footer-contact p { flex-shrink: 0; }
.footer-contact nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 20px; }
.footer-contact a { color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.footer-contact a:hover { color: var(--blue-ink); text-decoration: underline; }

/* ---------------------------------------------------------------- mobile nav */

.mobile-nav { display: none; }

/* ---------------------------------------------------------------- responsive */

/* Desktop: keep the board in view while a long running order scrolls past. */
@media (min-width: 1181px) and (min-height: 720px) {
  .output { position: sticky; top: 0; }
  .board-scroll { max-height: calc(100vh - 250px); }
}

@media (min-width: 1600px) {
  .workspace { grid-template-columns: 420px minmax(0, 1fr); }
}

@media (max-width: 1180px) {
  .workspace { grid-template-columns: minmax(300px, 340px) minmax(0, 1fr); gap: 28px; }
  .save-indicator { max-width: 200px; }
}

@media (max-width: 900px) {
  :root { --masthead: 56px; }
  body { padding-bottom: 76px; }
  .brand { width: min(190px, 46vw); }
  .masthead-tools select { width: 128px; font-size: var(--fs-s); padding: 6px; }
  .save-indicator { display: none; }

  .slate { grid-template-columns: 1fr; padding: 24px 0 20px; }
  .product-line { display: block; margin: 2px 0 0; }
  .slate-tools { width: 100%; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .slate-tools > .field { display: none; }

  .day-strip { flex-wrap: wrap; }
  .day-tabs { flex: 1 1 auto; }
  .day-tools { flex: 1 0 100%; margin: 0; padding: 10px 0; border-top: 1px solid var(--rule-soft); justify-content: space-between; }
  .day-tab { min-height: 56px; padding: 8px 14px 8px 12px; }
  .day-num { font-size: 22px; }

  .workspace { grid-template-columns: 1fr; gap: 8px; }
  .output { padding-top: 12px; }

  .site-footer { flex-direction: column; text-align: center; }
  .footer-actions { justify-content: center; }
  .footer-contact { flex-direction: column; align-items: center; }
  .footer-contact nav { justify-content: center; gap: 12px 18px; }
  .footer-contact a { line-height: 1.8; }

  .mobile-nav {
    position: fixed; z-index: 9; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom));
    display: grid; grid-template-columns: 1fr 1fr;
    padding: 4px;
    background: var(--ink); border-radius: 12px;
    box-shadow: 0 6px 24px rgb(10 10 13 / .22);
  }
  .mobile-nav a {
    display: flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 6px;
    color: var(--paper); font-size: var(--fs-s); font-weight: 600; text-decoration: none; text-align: center;
    border-radius: 9px;
  }
  .mobile-nav a:active { background: rgb(255 255 255 / .12); }
  .mobile-nav a:focus-visible { outline-color: var(--cue); outline-offset: -2px; }
}
