/* The owner's own screen. Only what is special to this page lives here: everything else comes
   from portal.css. No colors and no font names in this file: every piece reads the names the
   four looks fill in. Computer first, then 899px and down, then 699px and down.
   Text sizes are in rem (16px = 1rem), so the font size a person sets in the browser changes them
   (decision 7, Oct 15). The shared sizes still come from portal.css (see SHARED-REQUESTS.md). */

/* nothing shows before the first answer is in (owner.js puts ow-on on <body> then) */
body:not(.ow-on) main [data-view] {
  display: none !important;
}

/* ==========================================================================
   The header: the company picker, QuickBooks style
   ========================================================================== */
.ow-pick {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 470px;
  min-height: 56px;
  margin-left: 12px;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--line);
  border-radius: var(--btn-radius);
  background: var(--btn2-bg);
  box-shadow: var(--btn2-shadow);
  color: var(--ink);
  font: var(--w-menu-on) 1.375rem/1.15 var(--font-brand);
  text-align: left;
  cursor: pointer;
  transition: filter .12s ease;
}

.ow-pick:hover {
  filter: brightness(1.12);
}

.ow-pick > .icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.ow-pick-name {
  min-width: 0;
}

.ow-pick-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  min-height: 42px;
  margin-left: 4px;
  padding: 0 6px 0 14px;
  border-left: 1px solid var(--line);
  color: var(--soft);
  font: var(--w-menu) 1.125rem/1 var(--font-ui);
}

.ow-pick-change .icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  transform: rotate(90deg);
}

/* the first computer layout: a little smaller, and a long company name wraps inside the button */
@media (max-width: 1099px) {
  .ow-pick {
    max-width: 330px;
    margin-left: 4px;
    padding-left: 12px;
    gap: 10px;
    font-size: 1.25rem;
  }
}

/* ==========================================================================
   Loading, or something could not load
   ========================================================================== */
.ow-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

/* ==========================================================================
   All companies: what needs you today
   ========================================================================== */
/* the set carries the lake engraving in the two engraved looks: it needs a box of its own to sit in */
.ow-today {
  position: relative;
}

.ow-todos {
  display: flex;
  flex-direction: column;
}

/* A row that needs the owner: words on the left, its one button on the right. The first row leads
   (is-first): a larger heading and the main button. */
.ow-todo {
  display: flex;
  align-items: center;
  gap: 12px 22px;
  padding: 15px 0;
  border-top: 1px solid var(--rule);
}

.ow-todo.is-top {
  padding-top: 2px;
  border-top: 0;
}

.ow-todo.is-end {
  padding-bottom: 2px;
}

.ow-todo-words {
  flex: 1 1 0;
  min-width: 0;
}

.ow-todo-words p {
  margin-top: 2px;
  color: var(--soft);
}

.ow-todo > .btn {
  flex: none;
  min-width: 236px;
}

.ow-todo.is-first {
  padding-bottom: 20px;
}

.ow-todo.is-first .h3 {
  font-size: 1.75rem;
  line-height: 1.18;
}

.ow-todo.is-first .ow-todo-words p {
  margin-top: 4px;
  color: var(--ink);
}

.ow-todo.is-first > .btn {
  min-height: 64px;
}

.ow-todo.is-first > .ring {
  width: 64px;
  height: 64px;
}

.ow-todo-panel > .btn-quiet {
  margin-top: 6px;
}

/* "Skip to the page" moves the focus to the page itself: no ring around the whole page */
#main:focus {
  outline: none;
}

/* The same link while it is parked above the window. Some owner states open scrolled down
   (at=papers, at=waiting, at=checks). There the measuring tool takes the parked link for a drawn
   one. Clipped to nothing while parked, the tool leaves it alone. With the focus on it, it shows
   exactly as before. */
.skip:not(:focus) {
  clip-path: inset(50%);
}

/* A status tag gets a solid ground under its tint. On the frosted panels of Northern lights the
   bright part of the sky can show through a tag and wash out its words. */
.page .tag,
.popup .tag {
  background: var(--pop-bg);
}

.page .tag.good,
.popup .tag.good {
  background: linear-gradient(var(--good-bg), var(--good-bg)), var(--pop-bg);
}

.page .tag.warn,
.popup .tag.warn {
  background: linear-gradient(var(--warn-bg), var(--warn-bg)), var(--pop-bg);
}

.page .tag.bad,
.popup .tag.bad {
  background: linear-gradient(var(--bad-bg), var(--bad-bg)), var(--pop-bg);
}

/* a heading on the left, its one button on the right */
.ow-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.ow-cos {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ow-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ow-table .act .btn {
  min-width: 112px;
}

.ow-table .lead .tag {
  margin-left: 8px;
  vertical-align: 2px;
}

/* ==========================================================================
   My business: what Stingray Bookkeeping charged its clients
   ========================================================================== */
.ow-money,
.ow-money-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ow-money-note {
  margin-top: -6px;
}

.ow-money-duo {
  align-items: start;
}

/* month by month: the name, a bar as long as the month's fees, the amount, and the year so far */
.ow-months {
  display: flex;
  flex-direction: column;
}

/* the same three columns in every row, so every bar runs on the same track and the lengths compare */
.ow-month {
  display: grid;
  grid-template-columns: 8.5rem minmax(60px, 1fr) minmax(8rem, auto);
  grid-template-areas:
    "name bar n"
    "name run run";
  align-items: center;
  gap: 2px 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}

.ow-month:last-child {
  border-bottom: 0;
}

.ow-month-name {
  grid-area: name;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-weight: var(--w-strong);
}

.ow-month-bar {
  grid-area: bar;
  position: relative;
  display: block;
  height: 14px;
  border-radius: 999px;
  background: var(--rule);
  overflow: hidden;
}

.ow-month-bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: var(--accent);
}

.ow-month-n {
  grid-area: n;
  justify-self: end;
  font-weight: var(--w-strong);
  text-align: right;
}

.ow-month-run {
  grid-area: run;
  justify-self: end;
  color: var(--quiet);
  font-size: var(--text-quiet);
  text-align: right;
}

/* this month: a mark on the left edge */
.ow-month.is-now {
  margin-left: -12px;
  padding-left: 8px;
  border-left: 4px solid var(--on);
}

/* a narrow computer window shows My business in two columns: there the month rows stack as on a phone */
@media (min-width: 900px) and (max-width: 1099px) {
  .ow-month {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name n"
      "bar bar"
      "run run";
    gap: 6px 12px;
  }

  .ow-month-run {
    justify-self: start;
    text-align: left;
  }
}

.ow-money-sum {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  text-align: right;
}

.ow-client-rows .row {
  align-items: center;
}

.ow-client-rows .link {
  font-weight: var(--w-strong);
}

/* a fee: who and what on the left, the amount, its buttons */
.ow-fee-list {
  display: flex;
  flex-direction: column;
}

.ow-fee {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.ow-fee:first-child {
  padding-top: 2px;
}

.ow-fee:last-child {
  padding-bottom: 2px;
  border-bottom: 0;
}

.ow-fee-words {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ow-fee-n {
  justify-self: end;
}

.ow-fee-acts,
.ow-fee-sure {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  grid-column: 1 / -1;
}

.ow-fee-sure {
  gap: 8px 16px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--box-bg, transparent);
}

.ow-fee-sure p {
  font-weight: var(--w-strong);
}

/* every fee (the wide pop-up): the buttons stay on the line of the fee */
@media (min-width: 900px) {
  .ow-fee-list.is-full .ow-fee {
    grid-template-columns: minmax(0, 1fr) auto 21.5rem;
  }

  .ow-fee-list.is-full .ow-fee-acts {
    grid-column: auto;
    justify-content: flex-end;
  }

  .ow-fee-list.is-full .ow-fee-sure {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   One company
   ========================================================================== */
.ow-co-facts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ow-co-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 32px;
}

.ow-co-top .btn {
  flex: none;
}

.ow-co-name {
  min-width: 0;
}

/* a company name written as one long word ("FairbanksPlumbingAndHeating") breaks inside the word on a phone, never sideways */
.ow-co-name, .ow-done-head .h1, .ow-head .h1, .head-row, .back-row .btn, .ow-done .btn { overflow-wrap: anywhere; }

.ow-co-name .lead {
  margin-top: 6px;
}

/* "Waiting on you": the sentence, and a button for each thing in it */
.ow-wait {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
}

.ow-wait-words {
  flex: 1 1 340px;
  min-width: 0;
  font-size: 1.375rem;
  line-height: 1.4;
}

.ow-wait > .actions {
  flex: none;
}

.ow-rhythm,
.ow-rhythm-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
}

/* the one-line form of "Reports come" with its Change button: a phone only (see below) */
.ow-rhythm-fold {
  display: none;
}

.ow-rhythm-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ow-rhythm-btns .btn {
  padding-left: 20px;
  padding-right: 20px;
}

.ow-rhythm-said {
  flex: 1 1 100%;
}

/* two columns, each stacking its own parts, so no part is stretched to match its neighbour */
.ow-col {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
}

@media (min-width: 900px) {
  .ow-cols {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  }

  /* the two columns end together: the last part of the shorter one takes what is left */
  .ow-col > :last-child {
    flex: 1 1 auto;
  }

  /* The papers engraving keeps to a band beside the heading and its opening line, so no
     paper, tag or button ever lies on top of it. */
  .ow-papers.has-papers::after,
  .ow-attached.has-papers::after {
    background-position: right -22px top -22px;
    background-size: auto 172px;
  }

  .ow-duo-c {
    grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
  }

  /* The lake engraving of the first screen stands beside the greeting and the row that leads.
     It is pulled up and ends above the second row, so no heading and no line of words ever lies on
     it: only the first button stands in front of it, on its own ground. */
  .ow-today.has-lake.art-top::after {
    background-position: right -6px top -40px;
    background-size: auto 232px;
  }
}

/* a narrow computer window: the words of the first row reach further right, so the lake is smaller */
@media (min-width: 900px) and (max-width: 1099px) {
  .ow-today.has-lake.art-top::after {
    background-position: right -6px top -30px;
    background-size: auto 184px;
  }
}

.ow-drafts,
.ow-papers,
.ow-needs,
.ow-hours,
.ow-notes,
.ow-log,
.ow-attached,
.ow-checks,
.ow-people,
.ow-waiting,
.ow-extra,
.ow-notices,
.ow-doors,
.ow-pub,
.ow-letter-panel,
.ow-remove-draft,
.ow-reads {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ow-reads > .btn-quiet,
.ow-papers > .btn-quiet,
.ow-needs > .btn-quiet,
.ow-drafts > .btn-quiet,
.ow-waiting > .btn-quiet {
  align-self: flex-start;
}

.ow-report-rows .row {
  align-items: center;
  padding: 11px 0;
}

.ow-report-rows .row > :first-child {
  flex: 1 1 11rem;
}

/* a narrow column (a computer about 900 wide): the tag and Open move under the words before a word is
   squeezed to a few letters per line (measure.mjs, "a word is broken over 3 lines: Published") */
.ow-report-rows .row {
  flex-wrap: wrap;
}

.ow-report-rows .tag,
.ow-report-rows .btn {
  flex: none;
}

.ow-sub {
  display: block;
  color: var(--quiet);
  font-size: var(--text-quiet);
  line-height: 1.45;
}

/* papers: what it is, when it came, what you can do with it */
.ow-paper-list,
.ow-item-list {
  display: flex;
  flex-direction: column;
}

.ow-paper,
.ow-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
}

.ow-paper:first-child,
.ow-item:first-child {
  padding-top: 2px;
}

.ow-paper:last-child,
.ow-item:last-child {
  padding-bottom: 2px;
  border-bottom: 0;
}

.ow-paper-acts,
.ow-item-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 2 / -1;
}

.ow-item-acts:empty {
  display: none;
}

.ow-paper-acts .btn,
.ow-item-acts .btn {
  padding-left: 20px;
  padding-right: 20px;
}

/* a paper with no tag: its buttons sit on its own line, under the words */
.ow-paper.one .ow-paper-acts {
  grid-column: 2 / -1;
}

/* decision 468: a photo in "Papers they sent" shows big (portal.css .paper-shot). On a computer it sits left of
   the words and buttons; on a phone on top, full width (the phone part below). No photo to show: .preview-none,
   the row as before with its icon. */
.ow-paper.has-shot:not(.preview-none) {
  grid-template-columns: clamp(160px, 38%, 220px) minmax(0, 1fr);
  align-items: start;
}

/* one row more than the words, tag, filing lines and buttons take, so a tall photo's height goes to that empty
   last row and never spreads gaps between them */
.ow-paper.has-shot:not(.preview-none) > .paper-shot {
  grid-column: 1;
  grid-row: 1 / span 5;
}

.ow-paper.has-shot:not(.preview-none) > .file-icon,
.ow-paper.has-shot.preview-none > .paper-shot {
  display: none;
}

.ow-paper.has-shot:not(.preview-none) > .file-words {
  grid-column: 2;
  grid-row: 1;
}

/* "Papers they sent" is half the screen wide on a computer: the tag goes under the words, so they keep room */
.ow-paper.has-shot:not(.preview-none) > .tag {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
}

.ow-paper.has-shot:not(.preview-none) > .ow-paper-file,
.ow-paper.has-shot:not(.preview-none) > .ow-paper-acts {
  grid-column: 2;
}

/* a phone, a tablet, and a computer up to 1099 px wide (where "Papers they sent" is only a narrow half): the
   photo on top, full width; the words under it with the tag on their right; the filing lines and buttons under
   them */
@media (max-width: 1099px) {
  .ow-paper.has-shot:not(.preview-none) {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .ow-paper.has-shot:not(.preview-none) > .paper-shot {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .ow-paper.has-shot:not(.preview-none) > .file-words {
    grid-column: 1;
    grid-row: 2;
  }

  .ow-paper.has-shot:not(.preview-none) > .tag {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  .ow-paper.has-shot:not(.preview-none) > .ow-paper-file,
  .ow-paper.has-shot:not(.preview-none) > .ow-paper-acts {
    grid-column: 1 / -1;
  }
}

.ow-item-words {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ow-sum {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.ow-sum > .btn {
  margin-top: auto;
}

.ow-sum > .actions {
  margin-top: auto;
}

/* change 017: the QuickBooks feed card (the same card as its neighbours; its switch and choices take the full width) */
.ow-feed > .actions {
  margin-top: 0;
}

.ow-feed > .oq-band,
.ow-feed-pick,
.ow-feed-row {
  align-self: stretch;
}

.ow-feed-pick {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ow-feed .ow-switch-row {
  border-top: 1px solid var(--rule);
}

.ow-feed-row:not(.ow-switch-row) {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ow-from-qb {
  margin-top: 4px;
}

/* notes: theirs, and ours with the gold line in front */
.ow-note-form {
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.ow-note-form textarea.input {
  min-height: 7.5rem;
}

.ow-log-rows .row {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0 20px;
  padding: 11px 0;
}

/* in the narrow column the time sits over its line */
.ow-when {
  flex: 1 1 100%;
  color: var(--quiet);
  font-size: var(--text-quiet);
}

/* ==========================================================================
   One paper, large
   ========================================================================== */
.ow-viewer {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--box-bg, transparent);
}

.ow-viewer-img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.ow-viewer-frame {
  display: block;
  width: 100%;
  height: 70vh;
  border: 0;
}

/* the drawn stand-in of a sample paper (no words in it) */
.ow-sample {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(100%, 320px);
  padding: 28px 26px 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--pop-bg);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}

.ow-sample.is-receipt {
  width: min(100%, 250px);
  border-bottom-style: dashed;
}

.ow-sample-line {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: var(--rule);
}

.ow-sample-total {
  display: block;
  width: 46%;
  height: 16px;
  margin-top: 10px;
  margin-left: auto;
  border-radius: 999px;
  background: var(--accent);
}

.ow-attach .send-row .input {
  min-width: 0;
}

/* ==========================================================================
   One report
   ========================================================================== */
.ow-pub .actions {
  margin-top: -2px;
}

/* where it stands, with the one button that goes with it */
.ow-ready {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

.ow-ready-words {
  flex: 1 1 280px;
  min-width: 0;
}

.ow-ready-words p {
  margin-top: 2px;
  color: var(--soft);
}

.ow-ready > .actions {
  flex: none;
}

.ow-sheet {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ow-sheet-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
}

.ow-sheet .lead {
  margin-top: -12px;
}

.ow-boxes .box {
  display: flex;
  flex-direction: column;
}

.ow-boxes .rows {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.ow-boxes .row.total {
  margin-top: auto;
}

/* one rule above the sum, not two */
.ow-boxes .row:nth-last-child(2) {
  border-bottom: 0;
}

.ow-bank {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 28px;
}

.ow-bank-l {
  font: var(--w-head) 1.5625rem/1.2 var(--font-head);
}

.ow-check-list {
  display: flex;
  flex-direction: column;
}

.ow-check-list .tick {
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
}

.ow-check-list .tick:first-child {
  padding-top: 4px;
}

.ow-proof {
  display: block;
  margin-top: 2px;
  color: var(--soft);
  font-size: var(--text-quiet);
  line-height: 1.5;
}

.ow-publish {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

/* the reason next to Publish, in words */
.ow-why {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ow-why .icon {
  width: 26px;
  height: 26px;
  margin-top: 1px;
  color: var(--accent);
}

.ow-why .ow-why-on,
.ow-why.is-ready .ow-why-off {
  display: none;
}

.ow-why.is-ready .ow-why-on {
  display: inline-block;
  color: var(--good);
}

/* the lines of a draft: a name, an amount and Remove on one line */
.ow-editor {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ow-editor-part {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.ow-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: stretch;
}

.ow-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 10rem auto;
  align-items: center;
  gap: 10px;
}

.ow-line-n {
  text-align: right;
}

.ow-bank-fields,
.ow-two-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  align-self: stretch;
}

.ow-editor-sums {
  font-weight: var(--w-strong);
}

/* ==========================================================================
   Add a company, a welcome letter
   ========================================================================== */
@media (min-width: 900px) and (max-width: 1099px) {
  .ow-two {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 1100px) {
  .ow-two {
    grid-template-columns: minmax(0, .82fr) minmax(0, 1fr);
    grid-template-areas: "form letter" "go letter";
    grid-template-rows: auto 1fr;
    align-items: start;
  }

  .ow-two > .ow-form { grid-area: form; }
  .ow-two > .ow-letter-panel { grid-area: letter; }
  .ow-two > .ow-go { grid-area: go; }
}

.ow-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ow-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ow-fieldset legend {
  padding: 0;
  margin-bottom: 2px;
}

.ow-go {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.ow-letter-go {
  gap: 10px 18px;
}

/* the button inside the letter preview is a picture of the client's button: nothing to press here */
.ow-letter-btn,
.ow-letter-btn:hover,
.ow-letter-btn:active {
  cursor: default;
  filter: none;
  transform: none;
}

.ow-mail {
  overflow-wrap: anywhere;
}

/* a "done" line may hold a long email address: its words may shrink and wrap, never push the page wide */
.page .thanks > span,
.popup .thanks > span,
.page .notice > span,
.popup .notice > span {
  min-width: 0;
}

/* the head of the letter: a line that wraps stays beside its label, not under it */
.ow-letter-panel .letter-head p {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
}

.ow-letter-panel .letter-l {
  min-width: 0;
}

/* done */
.ow-done {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ow-done-head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.ow-done-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
  align-items: start;
  gap: 20px 44px;
}

.ow-only {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  overflow-wrap: anywhere;
}

.ow-only .icon {
  width: 24px;
  height: 24px;
  margin-top: 2px;
  color: var(--accent);
}

/* ==========================================================================
   Logins
   ========================================================================== */
.ow-person-list {
  display: flex;
  flex-direction: column;
}

.ow-person {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  padding: 15px 0 2px;
}

/* a rule between two people, never under the last one */
.ow-person + .ow-person {
  margin-top: 13px;
  border-top: 1px solid var(--rule);
}

.ow-person:first-child {
  margin-top: 0;
  padding-top: 2px;
  border-top: 0;
}

.ow-person-words {
  display: flex;
  flex: 1 1 260px;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}

.ow-person-name {
  font: var(--w-head) 1.4375rem/1.25 var(--font-head);
}

.ow-initials {
  font: var(--w-fig) 1.3125rem/1 var(--font-fig);
  letter-spacing: .02em;
}

/* a line that asks for attention: the same shape as a "done" line, with the warning color on its sign */
.ow-alert > .icon {
  color: var(--warn);
}

.ow-person > .btn {
  flex: none;
}

.ow-person-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* the large code needs room: side by side only on a wide window */
@media (max-width: 1099px) {
  .ow-done-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   Email notices: a switch with its word
   ========================================================================== */
.ow-notice-duo .box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ow-switch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 22px;
  padding: 15px 0;
  border-bottom: 1px solid var(--rule);
}

.ow-switch-row:last-child {
  padding-bottom: 4px;
  border-bottom: 0;
}

.ow-switch-row p {
  margin-top: 2px;
  color: var(--soft);
}

.ow-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 128px;
  min-height: 56px;
  padding: 6px 18px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--box-bg, transparent);
  color: var(--ink);
  font: 600 var(--text)/1 var(--font-ui);
  cursor: pointer;
}

.ow-switch-track {
  position: relative;
  flex: none;
  width: 58px;
  height: 34px;
  border: 1.5px solid var(--field-line);
  border-radius: 999px;
  background: var(--field-bg);
}

.ow-switch-knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--quiet);
  transition: transform .15s ease;
}

.ow-switch[aria-checked="true"] .ow-switch-track {
  border-color: var(--tick-bg);
  background: var(--tick-bg);
}

.ow-switch[aria-checked="true"] .ow-switch-knob {
  background: var(--tick-ink);
  transform: translateX(24px);
}

@media (prefers-reduced-motion: reduce) {
  .ow-switch-knob {
    transition: none;
  }
}

/* ==========================================================================
   See it as the client
   ========================================================================== */
.ow-seeing {
  display: flex;
  align-items: center;
  gap: 16px 24px;
  border-top-width: 5px;
  border-top-color: var(--accent);
}

.ow-seeing-words {
  flex: 1 1 0;
  min-width: 0;
}

.ow-seeing-words p {
  margin-top: 6px;
}

.ow-seeing > .btn {
  flex: none;
}

.ow-door-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ow-door-list .big {
  grid-column: 1 / -1;
}

/* ==========================================================================
   The company list (pop-up): name, what waits, and the last figures
   ========================================================================== */
.ow-pick-list .row {
  flex-wrap: wrap;
  gap: 2px 18px;
  padding: 10px 8px 10px 14px;
}

.ow-pick-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ow-pick-row .icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.ow-pick-note {
  margin-left: auto;
  color: var(--soft);
  font-size: var(--text-quiet);
  text-align: right;
}

.ow-pick-total {
  flex: 1 1 100%;
  margin-left: 38px;
  color: var(--quiet);
  font-size: var(--text-quiet);
}

.ow-pick-list .row[aria-current="true"] {
  box-shadow: inset 4px 0 0 var(--on);
}

.ow-here {
  flex: none;
  margin-left: 38px;
}

/* The two dark bands above and below a pop-up on a computer carry an empty "lid" each (owner.html).
   A line that scrolls out of the pop-up's box is cut off there and nobody sees it; the lid makes the
   measuring tool see that too (without it, the tool reads such a cut-off line against the dark band and
   reports it as unreadable). A press on a lid closes the pop-up, as a press on the dark band does. On a
   phone the pop-up is a full sheet with no band, so there is no lid. */
.ow-pop-lid {
  display: none;
}

@media (min-width: 700px) {
  .ow-pop-lid {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 1;
    display: block;
    height: 20px;
  }

  .ow-pop-lid.is-top {
    top: 0;
  }

  .ow-pop-lid.is-bottom {
    bottom: 0;
  }
}

@media (min-width: 900px) {
  /* the company list hangs under the picker: its band above is as tall as the header */
  .ow-pick-pop .ow-pop-lid.is-top {
    height: var(--pick-top, 96px);
  }
}

/* The words of a pop-up get a box of their own, as tall as the words. Without it the measuring
   tool takes the scrolling pop-up as their box and reports the part below the fold as "words
   leave their own box". The line is the color of the pop-up, so it does not show. */
.ow-pop-body {
  border-bottom: 1px solid var(--pop-bg);
}

/* on a computer the list drops down right under the picker (owner.js says where that is) */
@media (min-width: 900px) {
  .ow-pick-pop {
    align-items: flex-start;
    justify-content: flex-start;
    padding: var(--pick-top, 96px) 20px 20px var(--pick-left, 20px);
  }

  .ow-pick-pop .popup-box {
    width: min(100%, 620px);
  }
}

/* ==========================================================================
   899px and down: one column, the bar at the bottom
   ========================================================================== */
@media (max-width: 899px) {
  /* the picker gets a row of its own under the firm's name */
  .ow-pick {
    flex: 1 1 100%;
    max-width: none;
    margin: 4px 0 2px;
    font-size: 1.25rem;
  }

  .ow-pick-name {
    flex: 1 1 auto;
  }

  .brand .firm-logo.small {
    width: 44px;
    height: 44px;
  }

  /* one row for every entry (pass 3 run 1: All companies, Books, Their QuickBooks, Money and the Ask Claude button
     that owner.js moves in). The icons stay in one line when a name takes two lines. */
  .ow-bar {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(min-content, 1fr);   /* a long word ("companies", "QuickBooks") gets its room */
  }

  .ow-bar a {
    justify-content: flex-start;
    padding-top: 7px;
  }

  .ow-tags {
    justify-content: flex-end;
  }

  .ow-door-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* the opening line of a panel with the papers engraving stays clear of the drawing */
  [data-theme^="engraved"] .has-papers > .clear-art {
    max-width: 66%;
  }

  .ow-co-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .ow-wait > .actions {
    flex: 1 1 100%;
  }

  /* one column, in the order of what needs the owner first: Papers, Reports, Questions, Notes, Hours, then the
     rest. Pass 3 run 1: owner.js (phoneOrder) MOVES Reports after Papers in the page, so no CSS order is used
     and the keyboard order is the screen order (WCAG 2.4.3). */
  .ow-col {
    display: contents;
  }
}

/* ==========================================================================
   699px and down: a phone
   ========================================================================== */
@media (max-width: 699px) {
  /* On a phone the greeting fills its line from edge to edge, so there is no free corner for the
     lake: it would lie under the last words of the greeting. It shows from a tablet up. */
  .ow-today.has-lake::after {
    content: none;
  }

  .ow-todo {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 16px 0;
  }

  .ow-todo .ring {
    width: 48px;
    height: 48px;
  }

  /* the button gets a line of its own: beside the words it would squeeze them to nothing */
  .ow-todo > .btn {
    flex: 1 1 100%;
    min-width: 0;
  }

  .ow-todo.is-first .h3 {
    font-size: 1.5rem;
  }

  .ow-todo.is-first > .ring {
    width: 52px;
    height: 52px;
  }

  .ow-wait-words {
    flex-basis: 100%;
    font-size: 1.25rem;
  }

  /* "Reports come" is set once per contract: here it is one line with "Change", and the choices
     open under it */
  .ow-rhythm,
  .ow-rhythm-body,
  .ow-rhythm-btns {
    flex-direction: column;
    align-items: stretch;
  }

  .ow-rhythm > .h3 {
    display: none;
  }

  .ow-rhythm-fold {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .ow-rhythm-fold p {
    flex: 1 1 0;
    min-width: 0;
  }

  .ow-rhythm:not(.is-open) .ow-rhythm-body {
    display: none;
  }

  .ow-ready .ring {
    width: 48px;
    height: 48px;
  }

  .ow-ready > .actions {
    flex: 1 1 100%;
  }

  .ow-co-top .btn {
    align-self: stretch;
  }

  .ow-sum {
    align-items: stretch;
  }

  .ow-paper,
  .ow-paper.one,
  .ow-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ow-paper > .tag,
  .ow-item > .tag {
    grid-column: 2;
    justify-self: start;
  }

  .ow-paper-acts,
  .ow-paper.one .ow-paper-acts,
  .ow-item-acts {
    grid-column: 1 / -1;
    flex-direction: column;
  }

  .ow-log-rows .row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .ow-report-rows .row {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px 12px;
  }

  .ow-report-rows .row > :first-child {
    flex: 1 1 100%;
  }

  .ow-report-rows .btn {
    flex: 1 1 100%;
  }

  .ow-when {
    flex: none;
  }

  .ow-bank-l {
    font-size: 1.375rem;
  }

  .ow-go {
    align-items: stretch;
  }

  .ow-go .btn-quiet {
    align-self: center;
  }

  .ow-person {
    align-items: flex-start;
  }

  .ow-person > .btn,
  .ow-person-acts {
    flex: 1 1 100%;
  }

  .ow-person-acts {
    flex-direction: column;
  }

  .ow-person .ring {
    width: 48px;
    height: 48px;
  }

  .ow-person-name {
    font-size: 1.3125rem;
  }

  .ow-switch-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .ow-letter-panel .letter-head p {
    grid-template-columns: minmax(0, 1fr);
  }

  .ow-switch {
    justify-self: start;
  }

  .ow-seeing {
    flex-wrap: wrap;
  }

  .ow-seeing .ring {
    width: 48px;
    height: 48px;
  }

  .ow-seeing > .btn {
    flex: 1 1 100%;
  }

  .ow-door-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .ow-pick-note {
    flex: 1 1 100%;
    margin-left: 38px;
    text-align: left;
  }

  /* month by month: the name and the amount on one line, the bar under them, then the year so far */
  .ow-month {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name n"
      "bar bar"
      "run run";
    gap: 6px 12px;
  }

  .ow-month-run {
    justify-self: start;
    text-align: left;
  }

  .ow-money-sum {
    text-align: left;
  }

  .ow-fee-acts,
  .ow-fee-sure .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ow-fee-acts .btn {
    width: 100%;
  }

  /* a line of a draft: the name on its own line, then the amount and Remove */
  .ow-line {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rule);
  }

  .ow-line > [data-line-label] {
    grid-column: 1 / -1;
  }

  .ow-bank-fields,
  .ow-two-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .ow-viewer {
    min-height: 180px;
    padding: 8px;
  }

  .ow-viewer-frame {
    height: 60vh;
  }
}

/* A small phone (under 380px): a slightly smaller mark and name, so the firm's name, "Your look"
   and "Sign out" share one row where the look's letters allow it. */
@media (max-width: 379px) {
  .brand {
    gap: 8px;
  }

  .brand .firm-logo.small {
    width: 40px;
    height: 40px;
  }

  .brand-name {
    font-size: 1.125rem;
  }
}

/* The engraved looks on a phone are one sheet, and the kit closes every gap in a two-column row.
   Boxes that sit side by side inside one part still need air between them. */
@media (max-width: 699px) {
  [data-theme^="engraved"] .page:not(.framed) .ow-boxes,
  [data-theme^="engraved"] .page:not(.framed) .ow-notice-duo,
  [data-theme^="engraved"] .page:not(.framed) .ow-money-duo {
    gap: 16px;
  }
}

/* ==========================================================================
   Papers to check: the colored review cards (one per paper we read)
   The photo is the hero. Its light word (GREEN, YELLOW, RED) sits on its corner on a solid chip of its
   own, so it reads the same on every photo and in every look; the reason sits right under the photo.
   ========================================================================== */
.ow-read {
  --light-c: #f2c879;
  --light-ink: #3a2604;
  --light-text: var(--warn);
  --light-bg: var(--warn-bg);
  --light-line: var(--warn-line);
}

.ow-read.is-green {
  --light-c: #8fe0b4;
  --light-ink: #06301b;
  --light-text: var(--good);
  --light-bg: var(--good-bg);
  --light-line: var(--good-line);
}

.ow-read.is-red {
  --light-c: #ffad9f;
  --light-ink: #4a0d05;
  --light-text: var(--bad);
  --light-bg: var(--bad-bg);
  --light-line: var(--bad-line);
}

.ow-reads-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ow-reads-head .h2 {
  margin: 0;
}

.ow-reads-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
}

.ow-reads-qb {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  color: var(--quiet);
  font-size: var(--text-quiet);
}

.ow-reads-qb > .icon {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  color: var(--accent);
}

.ow-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  vertical-align: middle;
}

.ow-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 13px;
  border-radius: 999px;
  font: 700 var(--text-quiet)/1.35 var(--font-ui);
  white-space: nowrap;
  background: #f2c879;
  color: #3a2604;
}

.ow-chip.is-green {
  background: #8fe0b4;
  color: #06301b;
}

.ow-chip.is-red {
  background: #ffad9f;
  color: #4a0d05;
}

.ow-todo-words .ow-chips {
  margin-right: 6px;
}

.ow-read-list {
  display: flex;
  flex-direction: column;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.ow-read {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}

.ow-read:first-child {
  padding-top: 14px;
  border-top: 0;
}

.ow-read:last-child {
  padding-bottom: 4px;
}

.ow-read-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.ow-read-pic {
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 3px solid var(--light-c);
  border-radius: 10px;
  background: #16110d;
  box-shadow: 0 22px 44px -24px rgba(0, 0, 0, .85);
}

.ow-read-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ow-read-nopic {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 18px;
  background: #16110d;
  color: #f2ece0;
  text-align: center;
}

.ow-read-nopic p {
  margin: 0;
}

.ow-read-nopic .ow-sample {
  width: 62%;
}

/* a PDF paper on its card (pass 2): a drawn page and one line, read in "See it large" */
.ow-read-doc {
  align-content: center;
  gap: 12px;
}

.ow-read-doc .ow-sample {
  width: 46%;
  gap: 8px;
  padding: 14px 12px 16px;
}

/* the light word on the photo's corner */
.ow-light {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--light-c);
  color: var(--light-ink);
  font: 800 1.1875rem/1.2 var(--sans);
  letter-spacing: .08em;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .5);
}

.ow-read-why {
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--light-line);
  border-left: 5px solid var(--light-c);
  border-radius: 8px;
  background: var(--light-bg);
  color: var(--ink);
}

.ow-read-why b {
  color: var(--light-text);
}

.ow-read-large {
  align-self: flex-start;
}

.ow-read-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.ow-read-name {
  margin: 0;
  overflow-wrap: anywhere;
}

.ow-read-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin: -6px 0 0;
}

.ow-read-total {
  color: var(--fig);
  font-family: var(--font-fig);
  font-size: var(--fig-size);
  font-weight: var(--w-fig);
  line-height: 1.1;
}

.ow-read-total.is-none {
  color: var(--light-text);
  font-family: var(--font-ui);
  font-size: var(--text);
  font-weight: 700;
}

.ow-read-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
  align-self: center;
}

.ow-read-sent {
  margin: -8px 0 0;
}

.ow-read-label {
  margin: 0 0 6px;
  color: var(--soft);
  font: 700 var(--text-quiet)/1.3 var(--font-ui);
}

.ow-read-entry p {
  margin: 0;
}

.ow-read-lines {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.ow-read-lines li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}

.ow-read-cat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ow-read-lines .amt {
  font-weight: 700;
}

.ow-read-guess {
  margin: 0;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--accent);
  color: var(--soft);
  font-style: italic;
}

.ow-compare {
  padding: 14px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--box-bg, transparent);
}

/* as many readers side by side as the width allows (also with the Ask Claude panel open), never a word cut */
.ow-cmp-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
  gap: 12px;
}

.ow-cmp-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 10px 14px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.ow-cmp-col p {
  margin: 0;
}

.ow-cmp-title {
  margin: 0;
  color: var(--ink);
  font: 700 var(--text-quiet)/1.3 var(--font-ui);
}

.ow-cmp-big {
  color: var(--ink);
  font-weight: 700;
}

.ow-read-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
}

.ow-read-acts {
  margin-top: 2px;
}

/* a phone: the photo stays a photo, not a poster */
@media (max-width: 699px) {
  .ow-read-pic {
    max-width: 440px;
  }
}

/* side by side from a tablet on: the photo on the left, what we read on the right */
@media (min-width: 700px) {
  .ow-read {
    grid-template-columns: minmax(230px, 36%) minmax(0, 1fr);
    gap: 30px;
    align-items: start;
  }
}

@media (min-width: 1100px) {
  .ow-read {
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 40px;
  }
}

/* Fix it */
.ow-fix-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ow-fix-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.ow-fix-lines > p {
  margin: 0;
}

.ow-fix-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(7rem, 9rem) auto;
  align-items: center;
  gap: 10px;
}

.ow-fix-sum {
  margin: 12px 0 0;
}

.ow-fix-sum.is-off {
  color: var(--warn);
  font-weight: 700;
}

@media (max-width: 699px) {
  .ow-fix-line {
    grid-template-columns: minmax(0, 1fr) minmax(0, 8rem);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rule);
  }

  .ow-fix-line > .btn {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

/* the question to the client and the fix note: two lines are enough to start with */
#ask-question,
#fix-note {
  min-height: 96px;
}

/* ======================================================================================================
   PASS 3 RUN 1 (Oct 17): compact review cards, as in picture A (his "so much to read no?"). A landscape photo,
   tighter gaps, and Claude's guess, the sent time and "what each reader saw" behind one press (details/summary).
   ====================================================================================================== */
.ow-read-pic {
  aspect-ratio: 4 / 3;
}

.ow-read-side {
  gap: 10px;
}

.ow-read-main {
  gap: 12px;
}

.ow-read-sent {
  margin: 0;
}

.ow-read-more {
  margin: 0;
}

.ow-read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin: 0;
  padding: 4px 12px 4px 4px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--link);
  text-align: left;
  cursor: pointer;
  font: var(--w-ui) var(--text-quiet)/1.3 var(--font-ui);
  list-style: none;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.ow-read-more-btn::-webkit-details-marker {
  display: none;
}

.ow-read-more-btn::marker {
  content: "";
}

.ow-read-more-i {
  flex: none;
  transition: transform .15s ease;
}

.ow-read-more-btn[aria-expanded="true"] .ow-read-more-i {
  transform: rotate(90deg);
}

.ow-read-more-in[hidden] {
  display: none;
}



.ow-read-more-in {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .ow-read-more-i {
    transition: none;
  }
}

/* the card's places: photo | words, then Why | buttons, then the closed "see more" under the buttons */
.ow-read-side {
  position: relative;
}

.ow-read-why {
  align-self: center;
}

.ow-read-acts {
  align-self: center;
  margin: 0;
}

/* "See it large" sits on the photo's lower corner (a dark button with its word), so the photo stays short. Its
   focus ring is drawn INSIDE the button, on the dark, so it shows on a light receipt too. */
.ow-read-large {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  background: var(--pop-bg);          /* the look's own solid pop-up ground: dark, or cream in engraved-cream */
}

.ow-read-large:focus-visible {
  outline-offset: -6px;
}

@media (min-width: 700px) {
  .ow-read {
    grid-template-areas:
      "side main"
      "why acts"
      "more acts";
    grid-template-rows: auto auto 1fr;
    row-gap: 12px;
  }

  .ow-read-acts {
    align-self: start;
  }

  .ow-read-why {
    align-self: start;
  }

  .ow-read-side { grid-area: side; }
  .ow-read-main { grid-area: main; }
  .ow-read-why { grid-area: why; }
  .ow-read-acts { grid-area: acts; }
  .ow-read-more { grid-area: more; }

  .ow-read-pic {
    aspect-ratio: 16 / 10;
  }
}

/* pass 3 run 1: the company picker keeps a long name on one line where it can ("Northbound Auto Glass" split over
   two lines on a phone and at 1000px): from 1099px down the building icon steps aside (the word Change and the
   name stay), and between 900 and 1099px the name is a little smaller. A very long name still wraps, never cut. */
@media (max-width: 1099px) {
  .ow-pick > .icon:first-child {
    display: none;
  }
}

@media (min-width: 900px) and (max-width: 1099px) {
  .ow-pick {
    max-width: 360px;
    font-size: 1.125rem;
  }
}

/* ---------------------------------------------------------------------------------------------------------------
   JOINING STEP (Oct 17 2026): the Customize opener in the top bar, "Customize what they see" next to the client's
   name, client folders ("Done for the month", the Archive) and the filing row on each review card.
   --------------------------------------------------------------------------------------------------------------- */
.ow-customize-btn .icon {
  flex: none;
  width: 22px;
  height: 22px;
}

.ow-customize-btn[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--ink);
}

/* the two buttons stack, so the company name keeps its room (900 to 1099px with the larger engraved buttons) */
.ow-co-acts {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.ow-co-acts .btn {
  flex: none;
}

@media (max-width: 899px) {
  .ow-co-acts {
    flex-direction: column;
    align-self: stretch;
  }

  .ow-co-acts .btn {
    align-self: stretch;
  }
}

/* the filing row of a review card: the folder, then "Checked, file it" or "Filed: ..." and "Undo filing" */
.ow-file {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.ow-file[hidden] {
  display: none;
}

.ow-file p,
.ow-folders-body > p {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
}

.ow-file .icon,
.ow-folders-body > p > .icon {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
}

.ow-file .actions {
  margin: 0;
}

.ow-file-pick {
  max-width: 420px;
}

/* the red stop line: the read-back did not match what he approved */
.ow-file-stop {
  padding: 12px 14px;
  border: 1px solid var(--bad-line);
  border-radius: 12px;
  background: var(--bad-bg);
  color: var(--bad);
}

/* client folders: one row per month that is over, and the Archive */
.ow-folders-body {
  display: grid;
  gap: 14px;
}

.ow-folders-body > .h3 {
  margin: 6px 0 0;
}

.ow-folders-months {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ow-folders-month {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}

.ow-folders-words {
  display: grid;
  gap: 2px;
  min-width: 0;
}

@media (max-width: 699px) {
  .ow-folders-month .btn {
    flex: 1 1 100%;
  }
}

/* the folders build (Oct 24 2026): every paper has its filing row, on a review card, in the paper pop-up and in the
   Papers list ("Goes in: ..." or "Filed: ...", its step line, the yellow note of a not-sure paper). "Change folder"
   opens its type and month inside the pop-up's row. */
.ow-file-yellow .icon,
.ow-file-hint .icon {
  color: var(--warn);
}

.ow-file-help {
  margin: 0;
}

.ow-file.is-popup .ow-file-where {
  font-weight: 600;
}

.ow-paper .ow-file-where {
  display: block;
  margin-top: 4px;
  font-size: var(--text-quiet);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ow-paper-file {
  display: grid;
  grid-column: 2 / -1;
  gap: 8px;
  min-width: 0;
}

.ow-paper-file p {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
}

.ow-paper-file .icon {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
}

.ow-move {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.ow-move-title {
  flex-wrap: wrap;
}

.ow-move-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.ow-move-fields .field {
  margin: 0;
  min-width: 0;
}

@media (max-width: 699px) {
  .ow-paper-file {
    grid-column: 1 / -1;
  }

  .ow-move {
    padding: 12px;
  }

  .ow-move-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Oct 17 2026: the owner's top row (Customize, Change theme, Phone code, Sign out) is wider than a phone
   since "Phone code" came in, and it pushed the whole page sideways. On a phone it wraps onto a second
   line instead. */
@media (max-width: 699px) {
  .top-tools {
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 4px;
    min-width: 0;
    max-width: 100%;
  }
}

/* =====================================================================================================
   THE MONEY RIVER BAND (Oct 20 2026, PC 1; strategy\MONEY-RIVER-BUILD.md; pictures B-owner-pc.jpg and
   B-owner-phone.jpg): the top of the company page. The river itself is money-river.css; this is the band
   around it: the header, the river card with Owed, then Reports | Our invoices to them | Statements.
   Words 18px and up (the page's own --text sizes), 48px buttons with words, chips with words (never colour
   only): Open and Draft gold with navy words, Paid and Published deep teal #157F78 with white words (4.8:1),
   Late coral with navy words (CHECKS.md). The cards are the page's own glass panels.
   ===================================================================================================== */
.ow-river-band {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
}
.mrb-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 28px;
  min-width: 0;
}
.mrb-head-words { min-width: 0; }
.mrb-name { overflow-wrap: anywhere; }
.mrb-when {
  margin-top: 4px;
  color: var(--accent);
  font: var(--w-head, 600) clamp(1.375rem, 2.2vw, 1.75rem)/1.25 var(--font-head);
}
.mrb-head-acts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
}
.mrb-refreshed {
  color: var(--soft);
  font-size: var(--text-quiet);
}
.mrb-refresh { min-height: 52px; }
.mrb-refresh .mrb-short { display: none; }
.mrb-busy, .mrb-said { margin: 0; }
.mrb-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
  gap: var(--gap);
  align-items: stretch;
}
.mrb-grid.no-owed { grid-template-columns: minmax(0, 1fr); }
.mrb-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  align-items: stretch;
}
.mrb-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.mrb-card-h { margin: 0; }
.mrb-card-h .icon { width: 30px; height: 30px; color: var(--accent); }
.mrb-mark {
  color: var(--soft);
  font-size: var(--text-quiet);
  line-height: 1.4;
}
.mrb-river { min-width: 0; }
.mrb-note, .mrb-sub {
  color: var(--soft);
  font-size: var(--text-quiet);
  line-height: 1.45;
}

/* Owed */
.mrb-owed-part {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule, var(--line));
}
.mrb-owed-part:last-of-type { border-bottom: 0; padding-bottom: 0; }
.mrb-owed-h {
  font: var(--w-head, 600) 1.3125rem/1.25 var(--font-head);
  color: var(--ink);
}
.mrb-big b {
  font: 700 clamp(2.25rem, 3.4vw, 3rem)/1.1 var(--font-head);
  color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
}
.mrb-owed-rows {
  display: grid;
  gap: 4px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.mrb-owed-rows li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--text-quiet);
  color: var(--soft);
}
.mrb-owed-rows .mrb-row-n { color: var(--ink); font-variant-numeric: tabular-nums; }

/* the chips: always words */
.mrb-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 2px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 700 1.0625rem/1.2 var(--font-ui);
  white-space: nowrap;
  vertical-align: middle;
}
.mrb-chip.is-open, .mrb-chip.is-draft { background: #f2c766; border-color: #f7dc9c; color: #1c1405; }
.mrb-chip.is-paid { background: #157f78; border-color: #3fb0a5; color: #ffffff; }
.mrb-chip.is-late { background: #f08c7f; border-color: #f6b2a8; color: #0b1a2a; }

/* Reports */
.mrb-rr { display: flex; flex-direction: column; gap: 16px; }
.mrb-rep {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mrb-rep-pub {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--rule, var(--line));
}
/* the report's name and its chip stay on ONE row (B-owner-pc): the name may wrap inside its own box, the chip
   stays beside it; only in a card narrower than about 300px do they go on two rows */
.mrb-rep { container-type: inline-size; }
.mrb-rep-name {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px 10px;
  min-width: 0;
  font-size: var(--text);
  line-height: 1.35;
}
.mrb-rep-name b { min-width: 0; overflow-wrap: anywhere; }
.mrb-rep-name .mrb-chip { flex: none; margin-left: 0; }
@container (max-width: 299px) {
  .mrb-rep-name { flex-wrap: wrap; }
}
.mrb-checks {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mrb-checks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-quiet);
}
.mrb-tick { width: 28px; height: 28px; flex: none; }
.mrb-tick circle { fill: #157f78; stroke: #3fb0a5; stroke-width: 1.2; }
.mrb-tick path { fill: none; stroke: #ffffff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.mrb-tick.is-open circle { fill: none; stroke: var(--quiet); stroke-width: 1.8; }
.mrb-checks li.is-open { color: var(--soft); }
.mrb-rep-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}
.mrb-rep-acts .btn { flex: 1 1 auto; }
.mrb-publish[disabled] { opacity: .62; cursor: not-allowed; }
.mrb-why { color: var(--soft); font-size: var(--text-quiet); line-height: 1.4; }

/* Our invoices to them: number, due or paid day, a chip with words. Never our prices here. */
.mrb-inv {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mrb-inv-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule, var(--line));
  font-size: var(--text-quiet);
}
.mrb-inv-row:last-child { border-bottom: 0; }
.mrb-inv-no { font-weight: 700; color: var(--ink); white-space: nowrap; }
.mrb-inv-when { color: var(--soft); min-width: 0; }

/* Statements */
.mrb-st-btns { display: grid; gap: 12px; }
.mrb-st-btns .btn { width: 100%; justify-content: center; min-height: 52px; }

@media (max-width: 1099px) {
  .mrb-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mrb-row > .mrb-statements { grid-column: 1 / -1; }
}
@media (max-width: 899px) {
  .mrb-grid, .mrb-row { grid-template-columns: minmax(0, 1fr); }
  .mrb-row > .mrb-statements { grid-column: auto; }
}
/* a phone (B-owner-phone.jpg): the header on two lines, the round Refresh says "Refresh", cards stacked, 18px+ */
@media (max-width: 600px) {
  .mrb-head { align-items: flex-start; }
  .mrb-head-acts { width: 100%; justify-content: space-between; }
  .mrb-refresh .mrb-long { display: none; }
  .mrb-refresh .mrb-short { display: inline; }
  .mrb-refresh { min-height: 48px; }
  .mrb-chip { font-size: 1.125rem; }
  .mrb-inv-row { grid-template-columns: auto minmax(0, 1fr) auto; }
}
@media (forced-colors: active) {
  .mrb-chip { border-color: CanvasText; forced-color-adjust: auto; }
}
/* the three cards under the river keep their names on one line on a computer ("Our invoices to them") */
@media (min-width: 1100px) {
  /* as B-owner-pc: Reports widest, Statements narrowest */
  .mrb-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.3fr) minmax(0, 1fr); }
  .mrb-row .mrb-card-h { font-size: 1.5rem; }
  .mrb-row .mrb-card-h .icon { width: 26px; height: 26px; }
}

/* ==========================================================================
   PHASE 2 (Oct 24 2026, Stingray QuickBooks Pipe Pt8): the "What we did for them" hint, the hours warning
   ========================================================================== */
/* the hint in "What we did for them" reads as a hint, not as words already typed (Pt8 picture 6) */
.ow-work-box::placeholder {
  font-style: italic;
  opacity: 0.8;
}

/* "It is after 6 PM ..." in the hours pop-up: the words and the two buttons take the room beside the icon */
.ow-hr-late > .stack {
  flex: 1 1 auto;
  min-width: 0;
}

/* polish (Oct 24 2026): the status chips of Today ("New", "Sync problem", "Kicked back", "All clear") are 18px on a
   phone, his 18px phone rule (measure.mjs: 16px there). owner-aurora.css loads after this file and sets 1rem, so
   the rule names the chip twice to win. */
@media (max-width: 700px) {
  .ow-status.ow-status {
    font-size: 1.125rem;
  }
}
