/* The masthead face: Fraunces (SIL OFL) with all four axes, built by
   tools/phasic-masthead-2026-11-18/build_masthead_font.py in two files split by unicode-range. The first
   holds the space, the letters and the apostrophe every shipped name uses, and every room preloads it; the
   second (digits and other punctuation) is fetched only when a name draws one of its characters. Block, not
   swap: the preloaded file is normally there before the first paint, and an unready mark stays blank
   rather than Georgia. */
@font-face {
  font-family: "PHASIC Masthead";
  src: url("/fonts/phasic/Fraunces-masthead.146f7166.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
  unicode-range: U+0020,U+0041-005A,U+0061-007A,U+2019;
}
@font-face {
  font-family: "PHASIC Masthead";
  src: url("/fonts/phasic/Fraunces-masthead-extra.7807aa09.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
  unicode-range: U+0021-0023,U+0026-0029,U+002B-003B,U+003F-0040,U+00B7,U+2013-2014,U+2018,U+201C-201D;
}
/* The mark's own face (20 November 2026): the six capitals of PHASIC, each a static Fraunces (SIL OFL) cut at its
   own axes, the setting's spacing in the advances, baked by tools/phasic-mark-2026-11-20/make-mark-font.py, which
   also writes this URL. Only the mark names it, first; the masthead face stays behind it, so a browser without
   this file draws today's mark. */
@font-face {
  font-family: "PHASIC Mark";
  src: url("/fonts/phasic/PHASIC-Mark.ba19fb71.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
  unicode-range: U+0041,U+0043,U+0048-0049,U+0050,U+0053;
}

/* ##dev-note## Stage 1 A1 only; finish the room, editor and export slices in docs/brigade/2026-11-21/PHASIC-STUDIO-STAGE-1-KICKOFF.md before calling PHASIC Gill-free. */
/* PHASIC's interface face, 21 November 2026. Quiet Fraunces keeps its full character coverage;
   the mark and room name retain their separately authored axes and metrics. */
@font-face {
  font-family: "PHASIC Text";
  src: url("/fonts/phasic/Fraunces-text.d31f20a5.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Fira Sans Regular from the PHASIC secondary type study. The local asset
   includes its OFL notice and retains combining marks and tabular numerals. */
@font-face {
  font-family: "Fira Sans";
  src: url("/fonts/phasic/FiraSans-Regular.79cbf51e.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --phasic-ui-face: "Fira Sans", system-ui, sans-serif;
  --phasic-text-face: "PHASIC Text", Georgia, serif;
  --phasic-suite-height: 64px;
  --phasic-suite-ease: cubic-bezier(.23, 1, .32, 1);
}

/* Cover the departing document while the browser requests the next room. */
dialog[data-phasic-departure] {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  max-height: none;
  margin: auto;
  border: 0;
  padding: 24px;
  background: #171918;
  color: #f0ede5;
  text-align: center;
  font: 450 1.25rem/1.35 var(--phasic-text-face);
}
dialog[data-phasic-departure]::backdrop { background: #171918; }
dialog[data-phasic-departure] p { margin: 0 0 .6rem; }
dialog[data-phasic-departure] p:focus { outline: 0; }
dialog[data-phasic-departure] button {
  min-height: 44px;
  padding: 0 .8rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}
@media (horizontal-viewport-segments: 2) {
  dialog[data-phasic-departure] { max-width: env(viewport-segment-width 0 0, 48vw); margin-inline: env(viewport-segment-left 0 0, 0px) auto; }
}
@media (vertical-viewport-segments: 2) {
  dialog[data-phasic-departure] { margin-block: 0; height: env(viewport-segment-height 0 0, 48vh); align-content: center; }
}

:root .phasic-suite-header {
  --suite-ink: #f5f0e8;
  --suite-muted: #c4bfb7;
  --suite-rule: rgb(245 240 232 / .18);
  --suite-gutter: clamp(16px, 3.75vw, 48px);
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  width: 100%;
  max-width: none;
  min-height: var(--phasic-suite-height);
  padding: max(5px, env(safe-area-inset-top)) max(var(--suite-gutter), env(safe-area-inset-right))
           5px max(var(--suite-gutter), env(safe-area-inset-left));
  margin: 0;
  border-bottom: 1px solid var(--suite-rule);
  color: var(--suite-ink);
  font: 430 14px/1.2 var(--phasic-text-face);
  font-size-adjust: .45;
  font-synthesis: none;
  font-variation-settings: normal;
font-optical-sizing:auto;font-synthesis:none;}
/* The slot: one place for the mark in every bar. The location starts at the bar's top padding plus half of
   what the bar has beyond 55px, so a wrapped nav, a taller @ or a missing rule never nudges the mark. */
.phasic-suite-header .phasic-suite-location {
  display: flex;
  align-items: baseline;
  align-self: flex-start;
  column-gap: 12px;
  min-width: 0;
  margin-block: max(0px, calc((var(--phasic-suite-height) - 55px) / 2)) 0;
}
/* The mark: Home's resting PHASIC in every room, in Home's 73 x 44 link. */
.phasic-suite-header .phasic-suite-brand {
  box-sizing: border-box;
  display: inline-flex;
  flex: none;
  align-items: center;
  inline-size: 73px;
  min-inline-size: 73px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  color: inherit;
  font: 590 18px/20px "PHASIC Masthead", Georgia, serif;
  font-size-adjust: none;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 126, "SOFT" 20, "WONK" 1;
  font-synthesis: none;
  letter-spacing: .055em;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  /* Home's rendering in every room: Writing, Magneatosphere, Photoplate and Waybill set antialiased smoothing
     (and Waybill optimizeLegibility) on the page, which draws the mark about a fifth thinner on a Mac. */
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  text-rendering: auto;
}
/* The word PHASIC draws from the mark's face; the font shorthand above, its size, line and letter-spacing stay. */
.phasic-suite-header .phasic-suite-brand:not([data-project-brand]) { font-family: "PHASIC Mark", "PHASIC Masthead", Georgia, serif; }
/* A family project names itself in the mark's place (Account); its name may be longer than PHASIC. */
.phasic-suite-header .phasic-suite-brand[data-project-brand] { inline-size: auto; }
/* The room name: the same Fraunces at its text optical size, muted, on the mark's baseline after a rule. */
.phasic-suite-header .phasic-suite-context {
  position: static;
  min-width: 0;
  margin: 0;
  padding: 0 0 0 12px;
  border: 0;
  border-inline-start: 1px solid var(--suite-rule);
  color: var(--suite-muted);
  font: 400 14px/1.2 "PHASIC Masthead", Georgia, serif;
  font-size-adjust: none;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  font-synthesis: none;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  pointer-events: auto;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  text-rendering: auto;
}
.phasic-suite-header .phasic-suite-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: end;
  gap: 0 4px;
  min-width: 0;
  max-width: none;
  margin-inline-start: auto;
}
.phasic-suite-header .phasic-suite-nav :is(a, button) {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
}
.phasic-suite-header .phasic-suite-nav [hidden] { display: none; }
.phasic-suite-header :is(.phasic-suite-nav a, .phasic-suite-nav button):is(:hover, :focus-visible) {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}
/* The mark's underline is Home's: 1px at 3px, in every room. */
.phasic-suite-header .phasic-suite-brand:is(a:hover, :focus-visible) {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.phasic-suite-header :is(a, button):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}
.phasic-suite-header .phasic-suite-nav .phasic-suite-account { font-size: 22px; }
[data-phasic-guidance="hidden"] [data-phasic-guide] { display: none !important; }
.phasic-identity {
  --identity-line: #565652;
  --identity-focus: #83b8ed;
  --identity-panel: #191b1b;
  --identity-muted: #a49e94;
  --identity-ink: #f5f0e8;
  position: relative;
  z-index: 30;
}
.phasic-identity > summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--identity-muted);
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  list-style: none;
  font-size: 23px;
  touch-action: manipulation;
}
/* The @ is 44 x 44 in every bar, even where a room gives every summary 46px (Receipts, Ledger, CDMX). */
.phasic-suite-header .phasic-identity > summary {
  box-sizing: border-box;
  block-size: 44px;
  min-block-size: 44px;
  padding: 0;
}
.phasic-identity > summary::-webkit-details-marker { display: none; }
.phasic-identity[data-signed-in] > summary { color: var(--identity-ink); }
.phasic-identity[open] > summary { border-color: var(--identity-line); }
.phasic-identity:not([open]) .phasic-identity-panel { display: none; }
.phasic-identity-panel {
  position: absolute;
  inset: calc(100% + 4px) 0 auto auto;
  display: grid;
  width: max-content;
  min-width: 0;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  max-height: calc(100vh - var(--phasic-suite-height) - 12px);
  max-height: calc(100dvh - var(--phasic-suite-height) - 12px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 4px 6px;
  border-radius: 2px;
  border: 1px solid var(--identity-line);
  background: var(--identity-panel);
  color: var(--identity-ink);
}
.phasic-suite-header .phasic-identity-panel :is(a, label) {
  display: flex;
  justify-content: start;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  padding: 4px 8px;
  color: inherit;
  text-align: start;
  text-underline-offset: .25em;
}
.phasic-identity-panel label { cursor: pointer; }
.phasic-suite-header .phasic-identity-panel input[type="checkbox"] {
  flex: none;
  width: 16px;
  height: 16px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--identity-focus);
}
.phasic-identity-panel svg { width: 22px; height: 22px; }
.phasic-suite-header .phasic-identity :focus-visible { outline: 2px solid var(--identity-focus); }
@keyframes phasic-disclosure-in {
  from { clip-path: inset(0 6% calc(100% - 9px) 83% round 66% 18% 60% 35%); }
  to { clip-path: inset(0 round 2px); }
}
@media (prefers-reduced-motion: no-preference) {
  .phasic-suite-header .phasic-room-doors[open] > .phasic-room-doors-panel,
  .phasic-identity[open] > .phasic-identity-panel {
    animation: phasic-disclosure-in 420ms var(--phasic-suite-ease) both;
  }
}
/* Light's room actions fit the labels they contain. Native details owns the
   open state, including when the optional keyboard and Guide scripts are absent. */
.phasic-room-doors { position: relative; z-index: 31; }
.phasic-room-doors > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding-inline: 7px;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}
.phasic-room-doors > summary::-webkit-details-marker { display: none; }
.phasic-suite-header .phasic-suite-nav > .phasic-room-question {
  font: 500 22px/1 var(--phasic-text-face);
  font-size-adjust: none;
}
.phasic-room-doors-panel {
  box-sizing: border-box;
  position: absolute;
  inset-block-start: calc(100% + 4px);
  inset-inline-end: 0;
  inline-size: max-content;
  max-inline-size: calc(100vw - 32px);
  max-block-size: calc(100vh - var(--phasic-suite-height) - 12px);
  max-block-size: calc(100dvh - var(--phasic-suite-height) - 12px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 4px 6px;
  border: 1px solid #565652;
  border-radius: 2px;
  color: #f5f0e8;
  background: #191b1b;
}
.phasic-room-doors:not([open]) > .phasic-room-doors-panel { display: none; }
.phasic-suite-header :is(.phasic-room-doors-panel, .phasic-identity-panel) > :is(a, button, label) {
  box-sizing: border-box;
  display: flex;
  justify-content: start;
  align-items: center;
  min-block-size: 44px;
  max-inline-size: 100%;
  margin: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  text-align: start;
  overflow-wrap: anywhere;
  font: 430 16px/1.25 var(--phasic-text-face);
  letter-spacing: normal;
}
.phasic-suite-header :is(.phasic-room-doors-panel, .phasic-identity-panel) > :is(a, button, label):not([hidden]) ~ :is(a, button, label) {
  border-block-start: 1px solid var(--suite-rule);
}
.phasic-suite-header :is(.phasic-room-doors-panel, .phasic-identity-panel) > [hidden] { display: none; }
.phasic-suite-header :is(.phasic-room-doors > summary, .phasic-room-doors-panel a):focus-visible {
  outline: 2px solid #83b8ed;
  outline-offset: -2px;
}
.phasic-suite-header .phasic-launcher-mark {
  display: inline-grid;
  flex: none;
  gap: 5px;
  align-content: center;
  width: 24px;
  height: 18px;
}
.phasic-suite-header .phasic-launcher-mark > span {
  position: static;
  display: block;
  width: 100%;
  height: 1.5px;
  background: currentColor;
}
.phasic-suite-header details[open] > summary > .phasic-launcher-mark > :first-child { transform: translateY(6.5px) rotate(45deg); }
.phasic-suite-header details[open] > summary > .phasic-launcher-mark > :nth-child(2) { opacity: 0; }
.phasic-suite-header details[open] > summary > .phasic-launcher-mark > :last-child { transform: translateY(-6.5px) rotate(-45deg); }
.phasic-suite-header details:not([open]) > summary > .phasic-launcher-mark > span { transform: none; }
.phasic-suite-header .phasic-launcher-panel {
  width: max-content;
  min-width: min(14rem, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  background: #191b1b;
}
.phasic-suite-header .phasic-launcher-panel :is(input, p) { contain: inline-size; min-inline-size: 0; }
@media (horizontal-viewport-segments: 2) {
  .phasic-suite-header .phasic-launcher-panel {
    max-width: calc(env(viewport-segment-width 1 0, 50vw) - 32px);
    min-width: min(14rem, calc(env(viewport-segment-width 1 0, 50vw) - 32px));
  }
}
@media (prefers-reduced-motion: no-preference) {
  .phasic-suite-header .phasic-launcher[open] > .phasic-launcher-panel { animation: phasic-disclosure-in 420ms var(--phasic-suite-ease) both; }
  .phasic-suite-header .phasic-launcher-mark > span { transition: transform 300ms var(--phasic-suite-ease), opacity 300ms var(--phasic-suite-ease); }
}
@media (forced-colors: active) {
  .phasic-suite-header .phasic-launcher-panel, .phasic-room-doors-panel { background: Canvas; color: CanvasText; border-color: ButtonText; }
  .phasic-suite-header :is(.phasic-room-doors > summary, .phasic-room-doors-panel a):focus-visible { outline-color: Highlight; }
}
/* The shared account document also serves standalone family projects. */
.phasic-suite-header:has(#site-brand[data-project-brand]) :is(.phasic-suite-context, .phasic-suite-studio) { display: none; }

@media (max-width: 760px) { :root { --phasic-suite-height: 56px; } }
@media (max-width: 470px) {
  :root .phasic-suite-header { column-gap: 8px; }
  .phasic-suite-header .phasic-suite-nav { gap: 0; }
  .phasic-suite-header .phasic-suite-nav :is(a, button) { padding-inline: 5px; }
}
/* Every phone, and each pane of a two-pane fold, stacks the name under the mark inside the mark's 44px
   link, with the mark held at the same place whether or not a name shows. Each pane is phone-sized, so the
   mark takes the phone's 16px gutter there too: one place on the fold in every room, the place Tickerfield,
   Waybill and Photoplate already gave it. */
@media (max-width: 470px), (horizontal-viewport-segments: 2) and (max-width: 940px) {
  :root .phasic-suite-header { --suite-gutter: 16px; }
  /* Start, not the desktop row's baseline: each grid row holds one item, so there is no baseline to share, and
     under baseline WebKit floors the name's ascent at zero when its negative margin passes its baseline, which
     adds the name's descent (5.1px) to the bar and drops the name by as much. Start places each margin box at
     its row's top, the same in every engine. */
  .phasic-suite-header .phasic-suite-location {
    display: grid;
    align-content: start;
    align-items: start;
    justify-items: start;
    min-height: 44px;
    column-gap: 0;
  }
  .phasic-suite-header .phasic-suite-brand {
    align-items: flex-start;
    padding-top: 4px;
  }
  /* The name starts 2px below the mark's line box, so its text box clears the mark's (Fraunces draws taller
     than its 20px line), and still ends inside the 44px link. */
  .phasic-suite-header .phasic-suite-context {
    position: relative;
    pointer-events: none;
    margin-top: -18px;
    padding: 0 0 2px;
    border: 0;
    font-size: 13px;
  }
}
@media (forced-colors: active) {
  :root .phasic-suite-header { --suite-ink: CanvasText; --suite-muted: CanvasText; --suite-rule: CanvasText; }
  .phasic-suite-header :is(.phasic-suite-brand, .phasic-suite-nav a) { color: LinkText; }
  .phasic-identity {
    --identity-line: CanvasText;
    --identity-focus: Highlight;
    --identity-panel: Canvas;
    --identity-muted: ButtonText;
    --identity-ink: CanvasText;
  }
}
@media print { :root .phasic-suite-header { display: none; } }

/* Screen controls share one secondary face. The room titles, documents,
   receipts and the numerical readouts retain their own type settings. */
@media screen {
  :root .phasic-suite-header .phasic-suite-nav a,
  :root .phasic-suite-header :is(.phasic-identity-panel, .phasic-launcher) :is(a, button, summary, label, input),
  :root #calendar :is([data-calendar-months] button, #dpback),
  :root dialog[data-phasic-departure] button,
  :root :is(.photo-inbox, .photo-editor, .photos-main, .music, .capture-desk, .event-room,
            .viewer-controls, .looks, .registers, .guide-sheet, .auth, .typewriter,
            [data-admin-overview], [data-decision-room], [data-visits-overview], [data-ledger-app],
            [data-studio-shelf], [data-owner-show], [data-darkside-curator], [data-cdmx-app],
            #products, #quick-split)
    :is(button, label, select, summary, input:is([type="text"], [type="search"], [type="email"], [type="password"])):not(:where(.lockup, [data-phasic-identity] > summary, [data-phasic-communique] *, [data-phasic-miniplayer-system-type] *)),
  :root :is(.home-panel .home-word, .guide-back, .guide-open, .guide-related a, .guide-topics span, .music-modes a,
            .inbox-row-name, .upload-manager-intro, .upload-manager-caption, .upload-manager-caption label,
            .photo-editor-status, .viewer-controls a, [data-phasic-choice-trigger], [data-phasic-option]) {
    font-family: var(--phasic-ui-face);
    font-size-adjust: none;
    font-variation-settings: normal;
  }
}
