:root {
  --ink: #14202b;
  --muted: #5b6874;
  --paper: #fbf8f1;
  --card: #ffffff;
  --line: #ddd5c6;
  --sea: #0f4c5c;
  --sea-dark: #0a3540;
  --rust: #b4532a;
  --warn: #a3261b;
  --ok: #1d6b3a;
  --rev: #ffffff;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --serif: "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html[data-revision="white"] { --rev: #ffffff; }
html[data-revision="blue"] { --rev: #bcd7ff; }
html[data-revision="pink"] { --rev: #ffc9de; }
html[data-revision="yellow"] { --rev: #fff1a6; }
html[data-revision="green"] { --rev: #c8f0c2; }
html[data-revision="goldenrod"] { --rev: #f2c45a; }
html[data-revision="buff"] { --rev: #f0dcb4; }
html[data-revision="salmon"] { --rev: #ffb69a; }
html[data-revision="cherry"] { --rev: #f08a96; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); }
#office { max-width: 1040px; margin: 0 auto; padding: 20px 16px 40px; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-bottom: 3px double var(--ink); padding-bottom: 12px; }
.brand { display: flex; gap: 14px; align-items: center; }
.logo { width: 64px; height: 40px; color: var(--sea); flex: none; }
h1 { font: 700 2rem/1.1 var(--serif); margin: 0; letter-spacing: .01em; }
.sub { margin: 2px 0 0; color: var(--muted); font-size: .95rem; }
.rev { margin: 0; display: flex; align-items: center; gap: 8px; font: 600 .9rem var(--mono); text-transform: uppercase; }
.chip { width: 22px; height: 28px; background: var(--rev); border: 1px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.demo-note { background: #fff; border-left: 4px solid var(--rust); padding: 8px 12px; margin: 14px 0; font-size: .9rem; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 18px; }
.tabs button { border: 1px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 999px; font: 600 .92rem var(--sans); color: var(--ink); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--sea); border-color: var(--sea); color: #fff; }

h2 { font: 700 1.5rem var(--serif); margin: 0 0 4px; }
h3 { font: 700 1.2rem var(--serif); margin: 18px 0 6px; }
main h4 { font: 700 .8rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--sea); margin: 18px 0 6px; }
.muted { color: var(--muted); }

.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-top: 14px; }
.strip { background: var(--card); border: 1px solid var(--line); border-top: 8px solid #f6d05a; border-radius: 6px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.strip.night { border-top-color: #233a6b; }
.strip.reserve { border-top-color: #b9b2a3; border-style: dashed; }
.strip.has-conflict { outline: 2px solid var(--warn); }
.strip header { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.strip header b { font: 700 1.05rem var(--serif); }
.strip .light { margin-left: auto; font: 600 .72rem var(--mono); letter-spacing: .08em; color: var(--muted); }
.strip p { margin: 0; }
.meta { font: .85rem var(--mono); color: var(--muted); }
.scenes { display: flex; flex-wrap: wrap; gap: 4px; }
.sc { font: 700 .85rem var(--mono); border: 1px solid var(--ink); padding: 1px 7px; border-radius: 3px; background: var(--rev); }
.cast { font-size: .88rem; }
.warn { color: var(--warn); font-weight: 600; }
.warn-inline { color: var(--warn); font-weight: 700; font-size: .85rem; }
.ok { color: var(--ok); font-weight: 600; }

main button { font: 600 .92rem var(--sans); border-radius: 6px; border: 1px solid var(--sea); background: var(--sea); color: #fff; padding: 8px 12px; cursor: pointer; }
main button:hover { background: var(--sea-dark); }
main button.small { padding: 3px 10px; font-size: .82rem; background: #fff; color: var(--sea); }
main button.small.done { background: var(--ok); border-color: var(--ok); color: #fff; }
footer button.link { background: none; border: none; color: var(--sea); text-decoration: underline; padding: 0; }
.strip button { align-self: flex-start; margin-top: 4px; background: #fff; color: var(--sea); }

.sheet { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; margin-top: 12px; box-shadow: inset 0 10px 0 var(--rev); }
.sheet-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 8px; }
.sheet-head h3 { margin: 0; }
.sheet-head p { margin: 0; color: var(--muted); font: .85rem var(--mono); }
.calls { display: flex; gap: 14px; flex-wrap: wrap; font: .9rem var(--mono); }
.calls b { font-size: 1.15rem; }
main table { width: 100%; border-collapse: collapse; font-size: .9rem; }
main th, main td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
main th { font: 700 .72rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
main td b { font-family: var(--mono); }
.cont { font-size: .8rem; color: var(--rust); margin-top: 2px; }
.sheet ul { padding-left: 18px; margin: 4px 0; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.dept { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 6px 14px 10px; }
.dept ul { list-style: none; padding: 0; margin: 0; }
.dept li { padding: 2px 0; font-size: .92rem; }

main form { display: grid; gap: 10px; max-width: 520px; margin: 12px 0; }
main label { display: grid; gap: 4px; font-weight: 600; font-size: .92rem; }
main select, main textarea, main input { font: 1rem var(--sans); padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
main form button { justify-self: start; }
.options { padding-left: 20px; }
.options li { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; }
.options p { margin: 0 0 8px; }
#sheet-day { max-width: 360px; }

footer { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 10px; color: var(--muted); font-size: .85rem; }

@media (max-width: 640px) {
  h1 { font-size: 1.6rem; }
  main th:nth-child(4), main td:nth-child(4) { display: none; }
}
/* Assistant layout. Append to the site's stylesheet and set the colors to the site's palette. */
.assistant { margin-top: 48px; }

/* The runtime reads these variables for its chat, settings and agent panels.
   The chat background below also uses --ns-bg. White text sits on --ns-primary (the
   visitor's messages, Send, and the chat form and settings buttons) and on --ns-accent
   (Send while a turn is steered), so give both at least 4.5:1 contrast with white.
   --ns-accent also underlines the chat header. */
#agent-app {
  --ns-font: system-ui, sans-serif;
  --ns-bg: #ffffff;
  --ns-fg: #14202b;
  --ns-primary: #0f4c5c;
  --ns-accent: #b4532a;
  --ns-border: #ddd5c6;
  --ns-panelbg: #ffffff;
  --ns-msgbg: #f3eee3;
  --ns-muted: #59636e;
}

.assistant-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 16px;
  margin-top: 16px;
}

/* Set the height once the runtime has mounted the chat, so a failed load leaves no
   empty box. */
#agent-app.ns-composed-app [data-ns-slot="chat"] { height: 720px; }
/* The runtime gives the chat no background of its own. Keep --ns-msgbg different from
   --ns-bg, or bot replies lose their bubble. */
#agent-app .ns-chat { background: var(--ns-bg); }

/* Site-wide form rules often stretch the runtime's own controls. Undo them here. */
#agent-app input[type="checkbox"],
#agent-app input[type="radio"] { width: auto; }
#agent-app .ns-header { flex-wrap: wrap; }
/* Site label rules add margins and bold text, and the inputs inside the labels inherit
   the weight. */
#agent-app .ns-settings-body label { margin: 4px 0; font-weight: 400; }
/* Chat forms label radio groups with a legend, so site legend fonts would reach them. */
#agent-app .ns-w-label { font-family: inherit; }
/* Site label rules add margins to chat form fields and make their options bold. */
#agent-app .ns-widget label { margin: 0; }
#agent-app .ns-w-radio label,
#agent-app .ns-w-multi label,
#agent-app .ns-w-toggle { font-weight: 400; }
/* The runtime sizes radio and multi-choice options but not the checkbox label. */
#agent-app .ns-w-toggle { font-size: 13px; }
/* The runtime spaces its buttons with gap. A site's button margin pushes Send below the input. */
#agent-app button { margin: 0; }
/* Chat choices are buttons with a light background. A site's button color can hide their
   titles. */
#agent-app .ns-w-choice { color: var(--ns-fg); }
/* A site's button:hover background also reaches the runtime's plain buttons, behind
   their dark text. Keep the runtime's own backgrounds. */
#agent-app .ns-devtoggle:not(.on):hover,
#agent-app .ns-modal-close:hover { background: transparent; }
#agent-app .ns-w-choice:disabled:hover { background: #fafbfc; }
/* The runtime's message rule hides the partner consent card's own background, and its
   Decline label then has too little contrast. */
#agent-app .ns-consent { background: #fffbeb; }
/* While a consent card waits, the status line above it already says "Contacting", though
   nothing has been sent. Hide it until the visitor answers. */
#agent-app .ns-msgs:has(.ns-consent-actions) > .ns-turn-status { display: none; }
/* Long links in a reply would run out of the bubble on a phone. "anywhere" would also
   let the consent card's buttons shrink and split their labels. */
#agent-app .ns-msg { overflow-wrap: break-word; }
/* On a phone the consent card is too narrow for its three buttons in one row, and
   "Always allow" breaks onto two lines. Keep each label whole and wrap the row. */
#agent-app .ns-consent-actions { flex-wrap: wrap; }
#agent-app .ns-consent-actions button { white-space: nowrap; }

/* site.js and the runtime add their confirmation dialogs to <body>, outside #agent-app.
   Site h2 rules reach the heading, and the two buttons touch. A right margin keeps
   wrapped buttons lined up on the left. */
body > dialog h2 { margin: 0 0 12px; font: 700 1.25em system-ui, sans-serif; }
body > dialog button { margin-right: 8px; }
/* site.js's dialog: the details in two columns, and a plain decline button, so the two
   choices do not look the same. */
.assistant-review { max-width: 640px; width: 85%; max-height: 85vh; overflow: auto; border: 1px solid #888; border-radius: 12px; padding: 24px; font: 16px system-ui, sans-serif; }
.assistant-review dl { display: grid; grid-template-columns: fit-content(40%) 1fr; gap: 4px 16px; margin: 12px 0; }
.assistant-review dt { font-weight: 600; }
.assistant-review dd { margin: 0; overflow-wrap: anywhere; }
.assistant-review details { margin: 12px 0; }
.assistant-review pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-review .assistant-decline { background: transparent; color: inherit; border: 1px solid currentColor; }

@media (max-width: 760px) {
  .assistant-panels { grid-template-columns: 1fr; }
  /* On a phone, each detail goes under its label, so an email is not split. */
  .assistant-review dl { grid-template-columns: 1fr; gap: 0; }
  .assistant-review dd { margin-bottom: 8px; }
}

main button.small:hover, .strip button:hover { background: #e8f1f2; }
main button.small.done:hover { background: #17552e; }
.assistant { border-top: 3px double var(--ink); padding-top: 18px; }

dialog.assistant-review { max-width: 520px; border: 1px solid var(--line); border-top: 8px solid var(--rev, #fff); border-radius: 8px; padding: 18px 20px; color: var(--ink); background: #fff; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
dialog.assistant-review h2 { font: 700 1.3rem var(--serif); margin: 0 0 6px; }
dialog.assistant-review dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: .92rem; }
dialog.assistant-review dt { font-weight: 700; }
dialog.assistant-review dd { margin: 0; }
dialog.assistant-review button { font: 600 .95rem var(--sans); border-radius: 6px; border: 1px solid var(--sea); background: var(--sea); color: #fff; padding: 8px 14px; margin: 12px 8px 0 0; cursor: pointer; }
dialog.assistant-review button.assistant-decline { background: #fff; color: var(--sea); }
dialog.assistant-review summary { cursor: pointer; color: var(--muted); font-size: .85rem; margin-top: 8px; }
