:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #262626;
  background: #f3f3f3;
  font-synthesis: none;
  --gray-950: #303030;
  --gray-800: #444;
  --gray-700: #5a5a5a;
  --gray-100: #e5e5e5;
  --ink: #262626;
  --muted: #686868;
  --line: #d8d8d8;
  --surface: #fff;
  --danger: #a43b3b;
  --shadow: 0 0.8rem 2.2rem rgb(35 35 35 / 9%);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 18rem;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top right, rgb(100 100 100 / 8%), transparent 28rem),
    #f3f3f3;
}

a {
  color: var(--gray-700);
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-width {
  width: min(100% - 2rem, 64rem);
  margin-inline: auto;
}

.topbar {
  color: #fff;
  background: linear-gradient(140deg, var(--gray-950), var(--gray-700));
  box-shadow: 0 0.25rem 1.2rem rgb(20 20 20 / 18%);
}

.topbar__content {
  display: flex;
  min-height: 4.6rem;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.75rem;
}

.brand {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.brand__name {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.brand__office {
  margin-top: 0.3rem;
  font-size: 0.7rem;
  line-height: 1.25;
  letter-spacing: 0.04em;
  opacity: 0.78;
}

.brand__office span {
  display: block;
}

.office-logo {
  display: block;
  width: auto;
  height: 3.7rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.account {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.account__name {
  display: none;
  max-width: 12rem;
  overflow: hidden;
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-main {
  padding-block: 1.5rem 2rem;
}

.app-footer {
  padding-block: 0.5rem 2rem;
  color: var(--muted);
  text-align: center;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.7rem, 7vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
  line-height: 1.25;
}

p,
li,
dd {
  line-height: 1.55;
}

.eyebrow,
.section-kicker {
  margin-bottom: 0.35rem;
  color: var(--gray-700);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.button {
  display: inline-flex;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  align-items: center;
  justify-content: center;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.record-row:focus-visible {
  outline: 0.2rem solid #999;
  outline-offset: 0.15rem;
}

.button--primary {
  color: #fff;
  background: var(--gray-700);
}

.button--primary:hover {
  background: var(--gray-800);
}

.button--secondary {
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
}

.button--danger {
  border-color: #e5bcbc;
  color: #8b3030;
  background: #fff6f6;
}

.button--quiet {
  border-color: rgb(255 255 255 / 38%);
  color: #fff;
  background: rgb(255 255 255 / 8%);
}

.button--small {
  min-height: 2.35rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.8rem;
}

.button--full {
  width: 100%;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-page {
  background:
    radial-gradient(circle at 80% 0, rgb(140 140 140 / 24%), transparent 30rem),
    var(--gray-950);
}

.login-page .topbar {
  box-shadow: none;
  background: transparent;
}

.login-page .app-footer {
  color: rgb(255 255 255 / 60%);
}

.login-main {
  display: grid;
  min-height: calc(100vh - 9rem);
  place-items: center;
}

.login-card,
.form-card {
  width: min(100%, 34rem);
  padding: 1.4rem;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 1.1rem;
  background: var(--surface);
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 22%);
}

.login-help {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.stacked-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

.form-field {
  display: grid;
  gap: 0.38rem;
}

.form-field label {
  font-size: 0.86rem;
  font-weight: 750;
}

.optional {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #c3c3c3;
  border-radius: 0.65rem;
  color: var(--ink);
  background: #fff;
}

.form-field select {
  width: 100%;
}

.form-field textarea {
  resize: vertical;
}

.form-alert,
.message {
  padding: 0.8rem 0.9rem;
  border-radius: 0.65rem;
  color: #742b2b;
  background: #fbe6e6;
}

.field-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.8rem;
}

.messages {
  margin-bottom: 1rem;
}

.message {
  margin: 0;
  color: var(--gray-950);
  background: var(--gray-100);
}

.message--error {
  color: #742b2b;
  background: #fbe6e6;
}

.dashboard-heading,
.project-heading,
.management-heading {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.35rem;
}

.heading-actions,
.button-group {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.live-clock {
  display: block;
  max-width: 13rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: right;
}

.panel,
.form-card {
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  overflow: hidden;
}

.compact-panel {
  padding: 1.2rem;
}

.panel__heading {
  display: flex;
  min-height: 4.6rem;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.panel__heading--actions {
  align-items: flex-end;
}

.count-badge {
  display: inline-grid;
  min-width: 2rem;
  height: 2rem;
  padding-inline: 0.45rem;
  border-radius: 999px;
  place-items: center;
  color: var(--gray-800);
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--gray-100);
}

.count-badge--muted {
  color: #606060;
  background: #e9e9e9;
}

.record-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.record-list li + li {
  border-top: 1px solid var(--line);
}

.record-row {
  display: flex;
  min-height: 4.5rem;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  color: var(--ink);
  text-decoration: none;
}

.record-row:hover {
  background: #f8f8f8;
}

.record-row > span:first-child {
  display: grid;
  min-width: 0;
  gap: 0.22rem;
}

.record-row strong,
.record-row small {
  overflow-wrap: anywhere;
}

.record-row small {
  color: var(--muted);
  line-height: 1.35;
}

.record-row--static:hover {
  background: transparent;
}

.management-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.management-list li + li {
  border-top: 1px solid var(--line);
}

.management-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
}

.management-row__title {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 0.2rem;
  color: var(--ink);
  text-decoration: none;
}

.management-row__title small {
  color: var(--muted);
}

.management-row__actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex: 0 0 auto;
}

.management-row__actions form {
  margin: 0;
}

.row-arrow {
  color: #858585;
  font-size: 1.7rem;
}

.status {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 1.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  align-items: center;
  color: #494949;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--gray-100);
}

.status--closed {
  color: #606060;
  background: #e9e9e9;
}

.empty-state {
  padding: 1.5rem 1.1rem;
  text-align: center;
}

.empty-state p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.breadcrumb {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 1.2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.project-heading .muted {
  margin-bottom: 0;
}

.detail-list {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 0;
}

.detail-list div {
  display: grid;
  gap: 0.2rem;
}

.detail-list dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
}

.form-card {
  margin-inline: auto;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.form-actions--split {
  justify-content: space-between;
}

.btb-heading .muted {
  margin-bottom: 0;
}

.date-selection {
  margin-top: 1.25rem;
}

.date-selection > .muted {
  margin: 0.7rem 0 0;
}

.weekday-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.weekday-strip span {
  display: grid;
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  place-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  background: #f8f8f8;
}

.weekday-strip span.is-active {
  border-color: var(--gray-700);
  color: #fff;
  background: var(--gray-700);
  box-shadow: 0 0.35rem 0.8rem rgb(60 60 60 / 20%);
}

.weekday-strip--fixed {
  margin-bottom: 1rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #fff;
}

.btb-form {
  display: grid;
  gap: 1rem;
}

.btb-form .panel {
  margin-bottom: 0;
}

.btb-section__heading {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.section-number {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  border-radius: 0.65rem;
  place-items: center;
  color: var(--gray-700);
  font-size: 0.75rem;
  font-weight: 850;
  background: var(--gray-100);
}

.btb-section__heading .section-kicker {
  margin-bottom: 0.2rem;
}

.btb-section__body {
  padding: 1.1rem;
}

.field-grid {
  display: grid;
  gap: 1rem;
}

.field-label {
  font-size: 0.86rem;
  font-weight: 750;
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.weather-option {
  position: relative;
  display: flex;
  min-height: 3.15rem;
  padding: 0.7rem;
  border: 1px solid #c3c3c3;
  border-radius: 0.7rem;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 750;
  background: #fff;
  cursor: pointer;
}

.weather-option:has(input:checked) {
  border-color: var(--gray-700);
  color: var(--gray-950);
  background: var(--gray-100);
}

.weather-option input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--gray-700);
}

.temperature-field {
  max-width: 14rem;
  margin-top: 1rem;
}

.input-with-unit {
  position: relative;
}

.input-with-unit input {
  padding-right: 3rem;
}

.input-with-unit span {
  position: absolute;
  top: 50%;
  right: 0.85rem;
  color: var(--muted);
  transform: translateY(-50%);
}

.repeatable-list {
  display: grid;
  gap: 0.8rem;
}

.repeatable-item {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: #f8f8f8;
}

.repeatable-item__fields {
  display: grid;
  gap: 0.8rem;
}

.company-fields {
  grid-template-columns: minmax(0, 1fr) 6.5rem;
}

.remove-row {
  min-height: 2.5rem;
  margin-top: 0.7rem;
  padding: 0.4rem 0;
  border: 0;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 750;
  background: transparent;
  cursor: pointer;
}

.add-row {
  display: inline-flex;
  min-height: 2.85rem;
  margin-top: 0.9rem;
  padding: 0.6rem 0.85rem;
  border: 1px dashed #9b9b9b;
  border-radius: 0.7rem;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-800);
  font-weight: 750;
  background: #f8f8f8;
  cursor: pointer;
}

.add-row span {
  font-size: 1.35rem;
  line-height: 1;
}

.hidden-delete {
  display: none;
}

.field-help {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.photo-grid,
.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.9rem;
}

.photo-grid--editable {
  margin-bottom: 1rem;
}

.photo-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: #f8f8f8;
}

.photo-card__image-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--gray-100);
}

.photo-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-overlay {
  position: absolute;
  z-index: 1;
  top: 0.55rem;
  right: 0.55rem;
  display: grid;
  max-width: calc(100% - 1.1rem);
  padding: 0.45rem 0.55rem;
  border-radius: 0.35rem;
  color: #fff;
  font-size: clamp(0.58rem, 2.2vw, 0.72rem);
  line-height: 1.35;
  text-align: right;
  overflow-wrap: anywhere;
  background: rgb(20 20 20 / 76%);
  box-shadow: 0 0.15rem 0.45rem rgb(0 0 0 / 22%);
  pointer-events: none;
}

.photo-overlay[hidden] {
  display: none;
}

.photo-overlay strong,
.photo-overlay time,
.photo-overlay span {
  display: block;
}

.photo-overlay [data-overlay-extra] {
  margin-top: 0.2rem;
  padding-top: 0.2rem;
  border-top: 1px solid rgb(255 255 255 / 45%);
}

.photo-card__overlay-fields {
  display: grid;
  gap: 0.75rem;
  margin: 0.75rem 0.8rem 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.photo-overlay-toggle {
  display: flex;
  min-height: 2.6rem;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
}

.photo-card .photo-overlay-toggle input {
  width: 1.2rem;
  height: 1.2rem;
  min-height: auto;
  margin: 0;
  padding: 0;
  accent-color: var(--gray-700);
}

.remove-row--photo {
  border: 1px solid #e5bcbc;
  border-radius: 0.6rem;
  background: #fff6f6;
}

.photo-card .form-field,
.photo-card__caption,
.photo-card__meta {
  margin: 0;
  padding: 0.75rem 0.8rem 0;
}

.photo-card__caption {
  padding-bottom: 0.8rem;
  line-height: 1.45;
}

.photo-card__meta {
  color: var(--muted);
  font-size: 0.75rem;
}

.photo-card .remove-row {
  width: calc(100% - 1.6rem);
  margin-inline: 0.8rem;
}

.photo-upload {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px dashed #9b9b9b;
  border-radius: 0.8rem;
  background: #fafafa;
}

.photo-upload h3,
.photo-upload p {
  margin: 0;
}

.photo-upload > div:first-child {
  display: grid;
  gap: 0.35rem;
}

.photo-upload__choices {
  display: grid;
  gap: 0.8rem;
}

.photo-upload__choice {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #fff;
}

.photo-picker-button {
  width: 100%;
}

.photo-input-status {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.photo-upload__choice input[type="file"] {
  min-height: auto;
  padding: 0.55rem;
  font-size: 0.82rem;
}

.photo-selection {
  display: grid;
  gap: 0.7rem;
}

.photo-selection[hidden] {
  display: none;
}

.photo-selection__status {
  font-weight: 750;
}

.photo-preview {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #fff;
}

.photo-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-preview figcaption {
  overflow: hidden;
  padding: 0.55rem 0.65rem;
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-preview__media {
  position: relative;
}

.photo-preview__controls {
  display: grid;
  gap: 0.7rem;
  padding: 0.75rem;
  border-top: 1px solid var(--line);
}

.photo-preview__controls input[type="datetime-local"],
.photo-preview__controls textarea {
  width: 100%;
  min-height: 2.7rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #c3c3c3;
  border-radius: 0.55rem;
  background: #fff;
}

.photo-preview__controls textarea {
  resize: vertical;
}

.photo-processing-note {
  color: var(--gray-700);
  font-size: 0.78rem;
}

.btb-edit-page .messages {
  position: fixed;
  z-index: 40;
  top: 5.5rem;
  right: max(1rem, calc((100vw - 64rem) / 2));
  width: min(calc(100% - 2rem), 25rem);
  filter: drop-shadow(0 0.65rem 1.2rem rgb(0 0 0 / 18%));
}

.sketch-editor {
  overflow: hidden;
  border: 1px solid #aaa;
  border-radius: 0.8rem;
  background: #fafafa;
}

.sketch-form-row > .form-field {
  margin-bottom: 0.9rem;
}

.saved-sketch + .saved-sketch {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.saved-sketch__heading {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.sketch-toolbar {
  display: flex;
  gap: 0.65rem;
  padding: 0.75rem;
  border-bottom: 1px solid #d0d0d0;
  flex-wrap: wrap;
  background: #f4f4f4;
}

.sketch-toolbar__group {
  display: flex;
  min-height: 2.75rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  align-items: center;
  gap: 0.3rem;
  background: #fff;
}

.sketch-toolbar__group--actions {
  flex-wrap: wrap;
}

.sketch-toolbar__label {
  padding-inline: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.sketch-control,
.width-control,
.color-swatch {
  min-width: 2.6rem;
  min-height: 2.6rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 750;
  background: #f1f1f1;
  cursor: pointer;
}

.sketch-control.is-active,
.width-control.is-active {
  border-color: var(--gray-700);
  color: #fff;
  background: var(--gray-700);
}

.sketch-control--danger {
  color: var(--danger);
  background: #fff1f1;
}

.color-swatch {
  position: relative;
  width: 2.6rem;
  padding: 0;
  border-color: transparent;
  background: transparent;
}

.color-swatch::before {
  display: block;
  width: 1.45rem;
  height: 1.45rem;
  margin: auto;
  border: 0.16rem solid #fff;
  border-radius: 999px;
  background: var(--swatch-color);
  box-shadow: 0 0 0 1px #aaa;
  content: "";
}

.color-swatch.is-active {
  border-color: var(--gray-700);
  background: var(--gray-100);
}

.sketch-toolbar__group--background {
  padding-inline: 0.55rem;
}

.sketch-toolbar__group--background .form-field {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.sketch-toolbar__group--background .form-field label {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.sketch-toolbar__group--background select {
  min-height: 2.6rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid #c3c3c3;
  border-radius: 0.55rem;
  color: var(--ink);
  background: #fff;
}

.sketch-canvas-wrap {
  padding: 0.6rem;
  background: #e2e2e2;
  overscroll-behavior: contain;
}

.sketch-canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #b3b3b3;
  background: #fff;
  box-shadow: 0 0.35rem 1rem rgb(35 35 35 / 12%);
  cursor: crosshair;
  touch-action: none;
}

.sketch-editor--readonly .sketch-canvas {
  pointer-events: none;
}

.sketch-status {
  min-height: 2.2rem;
  margin: 0;
  padding: 0.5rem 0.8rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  background: #fff;
}

.sketch-fullscreen-readonly {
  margin: 0.75rem;
}

.sketch-editor:fullscreen {
  display: flex;
  height: 100vh;
  padding: 0.75rem;
  border: 0;
  border-radius: 0;
  flex-direction: column;
  background: #e9e9e9;
}

.sketch-editor:fullscreen .sketch-toolbar {
  max-height: 42vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 0.7rem 0.7rem 0 0;
}

.sketch-editor:fullscreen .sketch-canvas-wrap {
  display: flex;
  min-height: 0;
  flex: 1;
  align-items: center;
  justify-content: center;
}

.sketch-editor:fullscreen .sketch-canvas {
  width: auto;
  max-width: 100%;
  max-height: 100%;
}

.sketch-editor:fullscreen .sketch-status {
  flex: 0 0 auto;
}

.save-bar {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--line);
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 -0.6rem 1.8rem rgb(30 30 30 / 10%);
  backdrop-filter: blur(0.6rem);
}

.save-bar__inner {
  display: flex;
  width: min(100%, 64rem);
  margin-inline: auto;
  gap: 0.55rem;
  justify-content: flex-end;
}

.button--close {
  border-color: #d1b879;
  color: #674e0f;
  background: #fff8e5;
}

.btb-edit-page .app-main {
  padding-bottom: 6.5rem;
}

.detail-list--columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.read-section__body {
  display: grid;
  gap: 0.8rem;
  padding: 1.1rem;
}

.read-section__body > p {
  margin: 0;
}

.read-entry {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.read-entry:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.read-entry--text,
.read-entry--stacked {
  display: grid;
  justify-content: stretch;
}

.linked-entry-grid {
  display: grid;
  gap: 0.8rem;
}

.linked-entry-grid__description {
  grid-column: 1 / -1;
}

.history-control {
  margin-bottom: 1rem;
}

.history-toggle {
  display: flex;
  justify-content: flex-end;
}

.history-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--muted);
  cursor: pointer;
}

.history-toggle input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--ink);
}

.history-panel {
  margin-top: 0.75rem;
}

.history-list {
  display: grid;
  margin: 0;
  padding: 0 1.1rem 1.1rem;
  gap: 0.85rem;
  list-style: none;
}

.history-entry {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fafafa;
}

.history-entry__heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1rem;
}

.history-entry__heading span {
  font-size: 0.8rem;
  color: var(--muted);
}

.history-changes {
  display: grid;
  margin: 0.75rem 0 0;
  gap: 0.65rem;
}

.history-changes > div {
  display: grid;
  gap: 0.25rem;
}

.history-changes dt {
  font-weight: 700;
}

.history-changes dd,
.history-value {
  display: block;
  margin: 0;
}

.history-value {
  padding: 0.35rem 0.5rem;
  border-left: 0.2rem solid var(--gray-700);
  font-size: 0.84rem;
}

.history-value--before {
  color: var(--muted);
}

.participant-overview small {
  color: var(--muted);
}

.form-field > ul {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 0.4rem;
  list-style: none;
}

.form-field > ul label,
.form-field--checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-field > ul input,
.form-field--checkbox input {
  width: 1.15rem;
  height: 1.15rem;
}

@media (min-width: 40rem) {
  .account__name {
    display: inline;
  }

  .app-main {
    padding-top: 2.25rem;
  }

  .login-card,
  .form-card {
    padding: 2rem;
  }

  .panel__heading,
  .record-row {
    padding-inline: 1.4rem;
  }

  .btb-section__heading,
  .btb-section__body {
    padding-inline: 1.4rem;
  }

  .field-grid--two,
  .discussion-fields,
  .linked-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .linked-entry-grid__fallback {
    grid-column: 1 / -1;
  }

  .linked-entry-grid__count {
    max-width: 8rem;
  }

  .weather-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .photo-upload__choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 34rem) {
  .office-logo {
    height: 3.15rem;
  }

  .brand__office {
    display: none;
  }

  .dashboard-heading {
    display: block;
  }

  .management-heading {
    display: grid;
  }

  .management-heading .button {
    width: 100%;
  }

  .live-clock {
    max-width: none;
    margin-top: 0.8rem;
    text-align: left;
  }

  .panel__heading--actions {
    align-items: stretch;
    flex-direction: column;
  }

  .panel__heading--actions .button {
    width: 100%;
  }

  .record-row {
    align-items: flex-start;
  }

  .project-heading {
    display: grid;
  }

  .heading-actions {
    justify-content: flex-start;
  }

  .management-row {
    align-items: stretch;
    flex-direction: column;
  }

  .management-row__actions,
  .management-row__actions form,
  .management-row__actions .button {
    width: 100%;
  }

  .form-actions--split {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .form-actions--split .button {
    width: 100%;
  }

  .company-fields {
    grid-template-columns: minmax(0, 1fr) 5.5rem;
  }

  .detail-list--columns {
    grid-template-columns: 1fr;
  }

  .save-bar__inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .save-bar__inner .button {
    min-height: 2.6rem;
    padding-inline: 0.45rem;
    font-size: 0.76rem;
  }

  .save-bar__inner .button--primary {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .btb-edit-page .app-main {
    padding-bottom: 10rem;
  }

  .sketch-toolbar__group--background,
  .sketch-toolbar__group--actions {
    width: 100%;
  }

  .sketch-toolbar__group--background .form-field {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .sketch-toolbar__group--actions .sketch-toolbar__label {
    width: 100%;
  }

  .sketch-toolbar__group--actions .sketch-control {
    flex: 1 1 7rem;
  }
}
