:root {
  --background: #f6f3ec;
  --panel: #fffdf8;
  --text: #1f2933;
  --muted: #52606d;
  --border: #d9d2c3;
  --accent: #367073;
  --accent-dark: #24595c;
  --action: #be5940;
  --action-dark: #943f2f;
  --highlight: #c68a38;
  --highlight-soft: #f5ead7;
  --success-bg: #e3f0ef;
  --error-bg: #f7e3dd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--accent);
}

a:hover,
a:focus {
  color: var(--accent-dark);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 0.4rem;
  background: var(--action);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 0.7rem 1rem;
}

button:hover,
button:focus {
  background: var(--action-dark);
}

.form-row .file-picker-button {
  background: var(--action);
  border-radius: 0.4rem;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  margin-bottom: 0;
  padding: 0.7rem 1rem;
}

.form-row .file-picker-button:hover,
.form-row .file-picker-button:focus {
  background: var(--action-dark);
}

input.visually-hidden {
  block-size: 1px;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  inline-size: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
}

.site-header {
  background: var(--accent);
  border-bottom: 3px solid var(--highlight);
  color: var(--panel);
}

.site-header__inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: flex-start;
  margin: 0 auto;
  max-width: 72rem;
  padding: 0.85rem 1rem;
}

.site-title {
  align-items: center;
  color: var(--panel);
  display: inline-flex;
  font-size: 1.25rem;
  font-weight: 800;
  gap: 0.55rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.site-title:hover,
.site-title:focus {
  color: var(--panel);
  text-decoration: none;
}

.site-title__icon {
  display: block;
  height: 2rem;
  width: 2rem;
}

.member-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.logout-form {
  align-items: center;
  display: flex;
  margin: 0;
}

.nav-link,
.nav-link-button {
  background: transparent;
  border-radius: 999px;
  color: var(--panel);
  display: inline-flex;
  line-height: 1.2;
  padding: 0.35rem 0.55rem;
  text-decoration: none;
}

.nav-link:hover,
.nav-link:focus,
.nav-link-button:hover,
.nav-link-button:focus {
  background: rgb(255 253 248 / 16%);
  color: var(--panel);
  text-decoration: none;
}

.nav-link-button {
  border: 0;
  cursor: pointer;
  font-weight: inherit;
}

.page-shell {
  margin: 0 auto;
  max-width: 72rem;
  padding: 2rem 1rem;
}

.page-heading {
  margin-bottom: 1.5rem;
}

.page-heading h1,
.content-card h1,
.content-card h2 {
  margin-top: 0;
}

.content-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  scroll-margin-top: 1rem;
}

.narrow-card {
  max-width: 30rem;
}

.messages {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.message {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.75rem 1rem;
}

.message-success {
  background: var(--success-bg);
}

.message-error {
  background: var(--error-bg);
}

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

.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  display: block;
  max-width: 100%;
  padding: 0.6rem 0.7rem;
  width: 100%;
}

.form-row select[hidden] {
  display: none;
}

.form-row input[type="file"] {
  background: #fff;
  padding: 0.5rem;
}

.form-row input.visually-hidden {
  block-size: 1px;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  inline-size: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
}

.compact-fieldset {
  margin-bottom: 1rem;
}

.compact-fieldset .form-row {
  margin-bottom: 0;
}

.input-with-button {
  align-items: stretch;
  display: flex;
  gap: 0.75rem;
}

.input-with-button input {
  flex: 1 1 auto;
}

.input-with-button .secondary-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.choice-inline-form {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(10rem, 1fr) minmax(10rem, 1fr) auto;
}

.choice-inline-form .form-row {
  margin-bottom: 0;
}

.choice-inline-form button {
  align-self: end;
  white-space: nowrap;
}

.form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.form-actions .help-text {
  margin: 0;
}

.help-text[data-status-type="error"] {
  color: #9b1c1c;
  font-weight: 700;
}

.help-text[data-status-type="success"] {
  color: #2f6b45;
  font-weight: 700;
}

.combobox {
  position: relative;
}

.combobox-list {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  box-shadow: 0 10px 24px rgba(60, 45, 28, 0.12);
  left: 0;
  list-style: none;
  margin: 0.25rem 0 0;
  max-height: 16rem;
  overflow-y: auto;
  padding: 0.25rem 0;
  position: absolute;
  right: 0;
  z-index: 20;
}

.combobox-list[hidden] {
  display: none;
}

.combobox-option {
  cursor: pointer;
  padding: 0.55rem 0.7rem;
}

.combobox-option:hover,
.combobox-option[aria-selected="true"] {
  background: var(--highlight-soft);
}

.combobox-option-empty {
  color: var(--muted);
  cursor: default;
}

.combobox-status {
  margin-bottom: 0;
}

.errorlist {
  color: #9b1c1c;
  margin: 0.35rem 0 0;
  padding-left: 1.25rem;
}

.help-text {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.35rem 0 0;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  margin: 1rem 0;
  padding: 1rem;
}

legend {
  font-weight: 800;
}

.profile-photo {
  border-radius: 0.5rem;
  max-height: 14rem;
  max-width: 100%;
}

.profile-photo-empty {
  align-items: center;
  background: var(--highlight-soft);
  border: 1px dashed var(--highlight);
  border-radius: 0.5rem;
  color: var(--muted);
  display: flex;
  font-weight: 700;
  justify-content: center;
  min-height: 8rem;
  max-width: 18rem;
  padding: 1rem;
}

.markdown-page {
  max-width: 48rem;
}

.markdown-body {
  overflow-wrap: anywhere;
}

.markdown-body img {
  height: auto;
  max-width: 100%;
}

.markdown-body pre,
.markdown-body table {
  overflow-x: auto;
}

.markdown-body pre {
  background: #f1ede4;
  border-radius: 0.4rem;
  padding: 1rem;
}

.markdown-body table {
  border-collapse: collapse;
  display: block;
  max-width: 100%;
}

.markdown-body th,
.markdown-body td {
  border: 1px solid var(--border);
  padding: 0.5rem;
}

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

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

.menu-list a {
  display: block;
  padding: 0.75rem 0;
}

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

.option-list li {
  border-top: 1px solid var(--border);
  padding: 0.75rem 0;
}

.option-list li:first-child {
  border-top: 0;
}

.option-list p {
  color: var(--muted);
  margin: 0.25rem 0 0;
}

.tax-tier-grid,
.tax-add-on-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.tax-tier-card,
.tax-add-on-card {
  background: #fffaf0;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  cursor: pointer;
  display: flex;
  gap: 0.8rem;
  padding: 1rem;
}

.tax-tier-card {
  flex-direction: column;
}

.tax-tier-card:hover,
.tax-tier-card:focus-within,
.tax-add-on-card:hover,
.tax-add-on-card:focus-within {
  border-color: var(--highlight);
  box-shadow: 0 0 0 3px rgb(198 138 56 / 18%);
}

.tax-tier-card--selected {
  background: var(--success-bg);
  border-color: var(--accent);
}

.tax-add-on-card--selected {
  background: var(--success-bg);
  border-color: var(--accent);
}

.tax-add-on-card--selected input {
  accent-color: var(--accent);
}

.tax-tier-card__choice {
  align-self: flex-start;
  border: 1px solid var(--highlight);
  border-radius: 999px;
  color: var(--highlight);
  font-weight: 800;
  padding: 0.2rem 0.6rem;
}

.tax-tier-card--selected .tax-tier-card__choice {
  border-color: var(--accent);
  color: var(--accent);
}

.tax-tier-card__name,
.tax-tier-card__amount {
  display: block;
  font-weight: 800;
}

.tax-tier-card__name {
  font-size: 1.15rem;
}

.tax-tier-card__amount {
  color: var(--accent-dark);
  font-size: 1.35rem;
}

.tax-tier-card__description,
.tax-add-on-card__description {
  color: var(--muted);
  display: block;
}

.tax-add-on-card input {
  flex: 0 0 auto;
  margin-top: 0.25rem;
}

.tax-add-on-card__body,
.tax-add-on-card__heading {
  display: grid;
  gap: 0.25rem;
}

.tax-add-on-card__heading {
  grid-template-columns: 1fr auto;
}

.tax-summary-card {
  border-color: var(--highlight);
}

.tax-amount-row {
  max-width: 18rem;
}

.tax-summary-list {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tax-summary-list div {
  align-items: baseline;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.tax-summary-list dt {
  color: var(--muted);
  font-weight: 700;
}

.tax-summary-list dd {
  font-weight: 800;
  margin: 0;
}

.tax-summary-list__total {
  border-top: 1px solid var(--border);
  font-size: 1.15rem;
  padding-top: 0.5rem;
}

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

.status-list li {
  align-items: center;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr auto auto;
  padding: 0.75rem 0;
}

.status-list li:first-child {
  border-top: 0;
}

.dashboard-list {
  display: grid;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dashboard-item {
  align-items: center;
  border: 1px solid var(--border);
  border-left: 0.45rem solid var(--border);
  border-radius: 0.6rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr auto;
  padding: 1rem;
}

.dashboard-item--current {
  background: var(--error-bg);
  border-left-color: var(--action);
}

.dashboard-item--complete {
  background: var(--success-bg);
  border-left-color: var(--accent);
}

.dashboard-item--locked {
  background: #f1ede4;
  color: var(--muted);
}

.dashboard-item__heading {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.dashboard-item__heading h3 {
  margin: 0;
}

.dashboard-item__symbol {
  font-weight: 800;
}

.dashboard-item__status {
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
}

.dashboard-item p {
  margin: 0;
}

.dashboard-button {
  background: var(--action);
  border-radius: 0.4rem;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  padding: 0.7rem 1rem;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-button:hover,
.dashboard-button:focus {
  background: var(--action-dark);
  color: #fff;
  text-decoration: none;
}

.dashboard-button--complete {
  background: var(--accent);
}

.dashboard-button--complete:hover,
.dashboard-button--complete:focus {
  background: var(--accent-dark);
}

.dashboard-complete-message {
  background: var(--highlight-soft);
  border: 1px solid var(--highlight);
  border-radius: 0.6rem;
  font-weight: 800;
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
}

.phagebook-list {
  display: grid;
  gap: 1rem;
}

.phagebook-entry {
  display: grid;
  gap: 0.75rem;
}

.phagebook-entry__name {
  margin-bottom: 0;
}

.phagebook-entry__photo {
  border-radius: 0.75rem;
  max-height: 18rem;
  max-width: 100%;
}

.phagebook-entry__email {
  font-weight: 800;
  margin: 0;
}

.phagebook-entry__bio > :first-child {
  margin-top: 0;
}

.phagebook-entry__bio > :last-child {
  margin-bottom: 0;
}

@media (max-width: 40rem) {
  .dashboard-item {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .dashboard-button {
    white-space: normal;
  }
}

table {
  border-collapse: collapse;
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.truncated-cell {
  max-width: 34rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-tools {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.table-tools label {
  font-weight: 700;
}

.table-tools input[type="search"] {
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  min-width: min(20rem, 100%);
  padding: 0.55rem 0.65rem;
}

.table-count {
  color: var(--muted);
  margin: 0;
}

.checkbox-list {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.checkbox-list label {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  font-weight: 700;
}

.secondary-button,
.sort-button {
  background: var(--highlight);
  color: var(--accent);
}

.secondary-button {
  border: 1px solid var(--highlight);
  border-radius: 0.4rem;
  color: var(--text);
  display: inline-flex;
  font-weight: 700;
  padding: 0.55rem 0.75rem;
  text-decoration: none;
}

.secondary-button:hover,
.secondary-button:focus {
  background: #b5772f;
  border-color: #b5772f;
  color: var(--text);
}

.danger-card {
  border-color: var(--action);
}

.danger-button {
  background: var(--action);
  border: 1px solid var(--action);
  border-radius: 0.4rem;
  color: #fff;
  display: inline-flex;
  font-weight: 700;
  padding: 0.55rem 0.75rem;
  text-decoration: none;
}

.danger-button:hover,
.danger-button:focus {
  background: var(--action-dark);
  border-color: var(--action-dark);
  color: #fff;
}

.sort-button:hover,
.sort-button:focus {
  background: var(--highlight-soft);
  color: var(--accent-dark);
}

.sort-button {
  background: transparent;
  border-radius: 0.25rem;
  color: var(--accent);
  padding: 0.2rem 0.35rem;
  text-align: left;
}

.sort-button[data-sort-direction="asc"],
.sort-button[data-sort-direction="desc"] {
  color: var(--text);
}

th,
td {
  border: 1px solid var(--border);
  padding: 0.5rem;
  text-align: left;
}

.inline-form {
  display: inline;
}

.inline-form button {
  margin-left: 0.5rem;
  padding: 0.35rem 0.6rem;
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.order-actions .inline-form button {
  margin-left: 0;
}

.icon-button {
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  padding: 0.45rem 0.65rem;
}

@media (max-width: 700px) {
  .site-header__inner {
    align-items: flex-start;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .input-with-button {
    flex-direction: column;
  }

  .choice-inline-form {
    grid-template-columns: 1fr;
  }

  .choice-inline-form button {
    justify-self: start;
  }

  .status-list li {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }
}
