/* Calm black and white, red only for actions, with a nod to the early Macintosh:
   menu bar, striped title bars, hard 1-bit shadows and the default-button ring. */

:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --ink: #1c1b1a;
  --muted: #6b6863;
  --line: #e6e2dc;
  --soft: #f3f1ed;
  --red: #c4392d;
  --red-hover: #a92f25;
  --red-tint: #fbeae7;
  --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-soft: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 3px 3px 0 var(--ink);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* The hidden attribute wins over display rules like .button or .feedback-form. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 3.5rem;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  /* The classic desktop pattern, faded right down. */
  background-color: var(--bg);
  background-image: radial-gradient(rgb(28 27 26 / 0.07) 1px, transparent 1px);
  background-size: 6px 6px;
}

a {
  color: inherit;
  text-decoration-color: rgb(28 27 26 / 0.35);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-soft);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.wrap {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1rem;
}

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

.skip {
  position: absolute;
  z-index: 10;
  left: 1rem;
  top: -3rem;
  background: var(--surface);
  padding: 0.5rem 1rem;
  border: 1px solid var(--ink);
}

.skip:focus {
  top: 3rem;
}

.small {
  font-size: 0.9375rem;
}

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

/* Menu bar */

.menubar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface);
  border-bottom: 1px solid var(--ink);
}

/* The bar is wider than the content column, like the old Mac menu bar across the screen. */
.menubar-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 72rem;
  height: 2.5rem;
  margin: 0 auto;
  padding: 0 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.brand-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--red);
}

.menu {
  display: flex;
  gap: 1rem;
  min-width: 0;
  margin-right: auto;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.menu::-webkit-scrollbar {
  display: none;
}

/* Items drop out as the bar gets narrower, so nothing wraps: first the date, then
   Kalender and Mail, and on phones the name next to the dot. */
@media (max-width: 56rem) {
  .menubar-status {
    display: none;
  }
}

@media (max-width: 44rem) {
  .menu-wide {
    display: none;
  }
}

.menu a {
  text-decoration: none;
  font-weight: 500;
}

.menu a:hover {
  text-decoration: underline;
}

/* The current page is shown like a highlighted menu title on the old Mac. */
.menu a[aria-current="page"] {
  padding: 0.1rem 0.4rem;
  background: var(--ink);
  color: var(--surface);
  border-radius: 3px;
}

.menubar-status {
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

/* EN/DA, at the right end of the menu bar. */
.lang-switch {
  flex: 0 0 auto;
  padding: 0.05rem 0.45rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: 4px;
}

.lang-switch:hover {
  background: var(--ink);
  color: var(--surface);
}

/* English visitors see the page once the English text is in place (at most two seconds). */
.i18n-pending body {
  visibility: hidden;
}

/* A short excerpt in Danish shown on the English page. */
.lang-tag {
  margin-right: 0.4rem;
  padding: 0 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 3px;
}

/* Intro */

.intro {
  padding-top: 3.5rem;
  padding-bottom: 2.5rem;
}

.intro h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 7vw, 2.75rem);
  max-width: 16ch;
}

.lede {
  margin: 0 0 1rem;
  font-size: 1.1875rem;
  color: var(--muted);
  max-width: 36rem;
}

.calm {
  margin: 0 0 2rem;
}

.notice {
  margin: 0;
  padding: 0.9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Filters */

.filters {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.field {
  display: block;
  flex: 1 1 10rem;
}

.orgs {
  min-width: 0;
  margin: 0 0 0.25rem;
  padding: 0;
  border: 0;
}

.org-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip > span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}

/* Selected items were shown inverted on the old Mac. */
.chip input:checked + span {
  background: var(--ink);
  color: var(--surface);
}

.chip input:focus-visible + span {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.chip-count {
  font-size: 0.8125rem;
  color: var(--muted);
}

.filter-label {
  margin-bottom: 0.25rem;
  padding: 0;
  font-weight: 600;
}

.filter-hint {
  margin: 0 0 0.6rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.chip input:checked + span .chip-count {
  color: rgb(255 255 255 / 0.7);
}

input[type="search"],
input[type="email"],
select {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 6px;
  -webkit-appearance: none;
  appearance: none;
}

/* Pop-up menus had a one-pixel shadow. */
select {
  padding-right: 2.5rem;
  box-shadow: 2px 2px 0 var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1h10L6 7z' fill='%231c1b1a'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 0.65rem;
}

input::placeholder {
  color: var(--muted);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3rem;
  font-size: 1rem;
  cursor: pointer;
  user-select: none;
}

.check input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--ink);
}

.count {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* The count, and the switch between grid and list. */
.list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1.25rem;
}

.list-head .count {
  margin: 0;
}

/* Like a segmented control on the old Mac: the chosen side is inverted. Phones always get
   the list, so the switch only shows where a grid fits. */
.view-switch {
  display: none;
}

.view-switch button {
  min-height: 2.25rem;
  padding: 0 0.85rem;
  font: inherit;
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  cursor: pointer;
}

.view-switch button + button {
  border-left: 1px solid var(--ink);
}

.view-switch button[aria-pressed="true"] {
  color: var(--surface);
  background: var(--ink);
}

.view-switch button:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: -3px;
}

@media (min-width: 48rem) {
  .view-switch {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid var(--ink);
    border-radius: 8px;
  }

  /* The grid gets more room than the reading column, centred on the page. */
  #list.layout-grid {
    width: min(72rem, calc(100vw - 3rem));
    margin-left: calc(50% - min(36rem, 50vw - 1.5rem));
  }

  .layout-grid .funds {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
  }

  /* A card: date and Gem on top, then the text, with the links at the bottom so they line
     up across a row. The lines between cards are shadows, clipped at the window's edge. */
  .layout-grid .fund {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto 1fr;
    padding: 1rem 1.1rem 1.1rem;
    border-top: 0;
    box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line);
  }

  .layout-grid .window-note + .funds .fund:first-child {
    margin-top: 0;
  }

  .layout-grid .fund .date {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    padding-top: 0;
    text-align: left;
  }

  .layout-grid .fund .save {
    grid-column: 2;
    grid-row: 1;
    flex-direction: row;
    gap: 0.4rem;
    margin: -0.35rem -0.4rem 0 0;
  }

  .layout-grid .fund > .fund-body {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    margin-top: 0.45rem;
  }

  .layout-grid .fund.database > .fund-body {
    grid-row: 1 / -1;
    margin-top: 0;
  }

  .layout-grid .fund .links {
    margin-top: auto;
    padding-top: 0.6rem;
  }

  .layout-grid .summary {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}

@media (min-width: 64rem) {
  .layout-grid .funds {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Windows */

.window {
  margin: 0 0 2rem;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.titlebar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 1.9rem;
  padding: 0 0.5rem;
  border-bottom: 1px solid var(--ink);
  background:
    repeating-linear-gradient(to bottom, var(--ink) 0 1px, transparent 1px 3px)
    center / calc(100% - 1rem) 13px no-repeat,
    var(--surface);
}

.titlebar .title {
  margin: 0;
  padding: 0 0.6rem;
  background: var(--surface);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 3rem);
}

.titlebar .title::first-letter {
  text-transform: uppercase;
}

.closebox {
  position: absolute;
  left: 0.85rem;
  width: 13px;
  height: 13px;
  background: var(--surface);
  border: 1px solid var(--ink);
  box-shadow: 0 0 0 3px var(--surface);
}

.window-body {
  padding: 1.25rem;
}

.window-body > p {
  margin: 0 0 1.25rem;
  color: var(--muted);
  max-width: 34rem;
}

.window-note {
  margin: 0;
  padding: 0.9rem 1.25rem 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Fund rows */

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

/* Date and the "Gem" checkbox share the left column; the text gets the rest. */
.fund {
  position: relative;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 1rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
  transition: background-color 0.2s ease;
}

.fund:first-child {
  border-top: 0;
}

.window-note + .funds .fund:first-child {
  margin-top: 0.4rem;
}

.fund:hover {
  background: var(--soft);
}

.date {
  grid-column: 1;
  grid-row: 1;
  text-align: center;
  line-height: 1.1;
  padding-top: 0.1rem;
}

.date .day {
  display: block;
  font-family: var(--font-soft);
  font-size: 1.55rem;
  font-weight: 600;
}

.date .month {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
}

.date.text {
  padding-top: 0.3rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.past .date .day {
  color: var(--muted);
}

.fund-body {
  flex: 1;
  min-width: 0;
}

.fund > .fund-body {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.fund h4 {
  margin: 0 0 0.2rem;
  font-size: 1.0625rem;
  overflow-wrap: anywhere;
}

.fund h4 a {
  text-decoration: none;
}

.fund h4 a:hover {
  text-decoration: underline;
}

.meta {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

.org {
  color: var(--ink);
  font-weight: 600;
}

/* Two lines keep the list scannable. The full text is one tap away on the fund's page. */
.summary {
  display: -webkit-box;
  margin: 0.35rem 0 0;
  max-width: 34rem;
  overflow: hidden;
  font-size: 0.9375rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0.6rem 0 0;
  font-size: 0.9375rem;
  font-weight: 500;
}

.links .apply {
  color: var(--red);
  font-weight: 600;
  text-decoration-color: rgb(196 57 45 / 0.4);
}

.links .apply::after {
  content: " \2192";
}

.when {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
}

.when.close {
  font-weight: 600;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.badge {
  padding: 0 0.55rem;
  font-size: 0.8125rem;
  line-height: 1.5rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
}

.badge.changed {
  border-color: var(--red);
  background: var(--red-tint);
}

.badge.cost-pay {
  background: var(--soft);
}

.badge.paid-camp {
  border-color: var(--red);
  background: var(--red-tint);
  font-weight: 600;
}

.note,
.cost-text {
  margin: 0.4rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.calm + .calm {
  margin-top: -1.25rem;
}

.fund.database {
  grid-template-columns: minmax(0, 1fr);
}

.fund.database > .fund-body {
  grid-column: 1;
  grid-row: 1;
}

/* "Gem" is drawn as an old Mac checkbox: a square that fills with a cross when checked. */
.save {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  margin: 0.6rem 0 0;
  padding: 0.3rem 0.25rem;
  font: inherit;
  font-size: 0.75rem;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.save .box {
  position: relative;
  width: 1.1rem;
  height: 1.1rem;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
}

.save[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 600;
}

.save[aria-pressed="true"] .box::before,
.save[aria-pressed="true"] .box::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.3rem;
  height: 1.5px;
  background: var(--ink);
}

.save[aria-pressed="true"] .box::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.save[aria-pressed="true"] .box::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.save[aria-pressed="true"] .box {
  overflow: hidden;
}

/* Min liste */

#min-liste {
  margin-bottom: 1rem;
}

.mine-empty {
  margin: 0;
  padding: 1.1rem 1.25rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.mine-calendar {
  margin: 0;
  padding: 0.85rem 1.25rem;
  font-size: 0.9375rem;
  border-top: 1px solid var(--line);
}

.mine-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--line);
}

.mine-row:first-child {
  border-top: 0;
}

.mine-row .fund-body {
  flex: 1 1 16rem;
}

.mine-row h3 {
  margin: 0 0 0.15rem;
  font-size: 1rem;
}

.mine-row h3 a {
  text-decoration: none;
}

.mine-row h3 a:hover {
  text-decoration: underline;
}

.mine-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mine-actions select {
  width: auto;
  min-height: 2.5rem;
  padding: 0.4rem 2.25rem 0.4rem 0.75rem;
  font-size: 0.9375rem;
}

.remove {
  min-height: 2.5rem;
  padding: 0 0.9rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 10px;
  cursor: pointer;
}

.remove:hover {
  background: var(--soft);
}

.window-foot {
  margin: 0;
  padding: 0.75rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.menu-count {
  font-weight: 600;
}

.titlebar .title:focus {
  outline: none;
}

.quiet {
  margin: 0 0 2rem;
}

/* Later months, folded: an outlined button with a disclosure triangle, as in the old Finder. */
.later {
  margin: 0 0 2rem;
}

.later > summary {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 10px;
  cursor: pointer;
  list-style: none;
}

.later > summary::-webkit-details-marker {
  display: none;
}

.later > summary::before {
  content: "\25B8\00a0";
}

.later[open] > summary::before {
  content: "\25BE\00a0";
}

.later > summary:hover {
  background: var(--soft);
}

.quiet > summary {
  cursor: pointer;
  padding: 0.5rem 0;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.empty {
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--muted);
}

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

/* Calendar and mail */

.panel {
  margin-top: 2.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin: 3px;
  padding: 0.6rem 1.4rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--red);
  border: 0;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  /* The default-button ring from the old dialogs. */
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink);
  transition: background-color 0.2s ease;
}

.button:hover {
  background: var(--red-hover);
}

.window-body details {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
}

.window-body details + details {
  margin-top: 0;
}

.window-body summary {
  cursor: pointer;
  padding: 0.75rem 0;
}

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

.copy-link {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.copy-link input {
  flex: 1 1 14rem;
  min-width: 0;
  min-height: 2.5rem;
  padding: 0 0.75rem;
  font: inherit;
  font-size: 0.875rem;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
}

/* About */

/* A link right under the paragraph it belongs to, as in Henrik's bio. */
.window-body .about-link {
  margin-top: -0.6rem;
}

.window-body .about-link + .about-link {
  margin-top: 1rem;
}

.about-link a {
  font-weight: 600;
}

/* Feedback */

.feedback-form {
  display: grid;
  gap: 1rem;
  margin-top: 0.5rem;
}

.feedback-form .actions,
.feedback-form .small {
  margin: 0;
}

.feedback-form textarea {
  width: 100%;
  resize: vertical;
}

.feedback-thanks {
  margin: 0.5rem 0 0;
  font-weight: 600;
}

details ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--muted);
}

code {
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.signup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.signup .field {
  flex: 1 1 14rem;
}

/* Ansøgninger */

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 999px;
}

.subnav a[aria-current="page"] {
  background: var(--ink);
  color: var(--surface);
}

#view:focus {
  outline: none;
}

.view-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.view-head h2 {
  margin: 0;
  font-size: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.form-field {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.form-field > span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

input[type="text"],
input[type="date"],
textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.6rem 0.8rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 6px;
}

textarea {
  line-height: 1.55;
  resize: vertical;
}

.form-field select,
.section-actions select,
.section-head select {
  min-height: 2.75rem;
  padding: 0.5rem 2.25rem 0.5rem 0.8rem;
}

input.bare {
  border-color: transparent;
  background: transparent;
  padding-inline: 0.3rem;
}

input.bare:hover {
  border-color: var(--line);
}

input.bare:focus {
  border-color: var(--ink);
  background: var(--surface);
}

input.app-title {
  margin-bottom: 1rem;
  font-family: var(--font-soft);
  font-size: 1.5rem;
  font-weight: 600;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

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

/* A plain outlined button, like the old Mac buttons that were not the default. */
.button-plain {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 1rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 10px;
  cursor: pointer;
}

.button-plain:hover {
  background: var(--soft);
}

.button-plain.danger[data-armed] {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.button[disabled] {
  opacity: 0.45;
  cursor: default;
}

.file-button {
  cursor: pointer;
}

.file-button:focus-within {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.app-list,
.section-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
}

.app-row:first-child {
  border-top: 0;
}

.app-row h4 {
  margin: 0 0 0.2rem;
  font-size: 1.0625rem;
}

.app-row h4 a {
  text-decoration: none;
}

.app-row h4 a:hover {
  text-decoration: underline;
}

.app-side {
  display: grid;
  grid-template-columns: 7rem 8rem;
  gap: 0.6rem;
  align-items: end;
}

.status-select.status-submitted {
  background-color: var(--soft);
}

.status-select.status-granted {
  font-weight: 600;
}

.section-row {
  display: grid;
  gap: 0.6rem;
  padding: 1.1rem 1.25rem;
  border-top: 1px solid var(--line);
}

.section-row:first-child {
  border-top: 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

input.section-label {
  flex: 1 1 16rem;
  font-weight: 600;
}

.section-head select {
  width: auto;
}

.limit {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.limit input {
  width: 5rem;
  min-height: 2.25rem;
  text-align: right;
}

.meter {
  height: 4px;
  overflow: hidden;
  background: var(--line);
  border-radius: 2px;
}

.meter i {
  display: block;
  height: 100%;
  background: var(--ink);
}

.meter.over i {
  background: var(--red);
}

.section-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.section-foot .source {
  flex: 1 1 14rem;
  min-height: 2.5rem;
  font-size: 0.9375rem;
}

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

.section-actions select {
  width: auto;
  font-size: 0.9375rem;
}

.chars {
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.chars.over {
  color: var(--red);
  font-weight: 600;
}

.fundbox {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.fundbox summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 600;
}

.fundbox ul {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.9375rem;
}

.fundbox .badge {
  font-weight: 400;
}

.confirm-box {
  padding: 1rem;
  background: var(--red-tint);
  border-radius: 6px;
}

.confirm-box p {
  margin: 0 0 0.5rem;
}

@media (max-width: 30rem) {
  .app-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-side {
    grid-template-columns: 1fr 1fr;
  }
}

/* Footer */

.site-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  padding-bottom: 3rem;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--ink);
}

.site-footer p {
  margin: 0 0 0.75rem;
  max-width: 36rem;
}

@media (max-width: 30rem) {
  .menubar-status,
  .menu-wide,
  .brand-name {
    display: none;
  }

  .menubar-inner {
    gap: 0.5rem;
    padding: 0 0.75rem;
  }

  .menu {
    gap: 0.5rem;
    font-size: 0.8125rem;
  }

  .menu a[aria-current="page"] {
    padding: 0.1rem 0.3rem;
  }

  .menu {
    margin-left: auto;
  }
}

@media (min-width: 40rem) {
  .intro {
    padding-top: 5rem;
    padding-bottom: 3.5rem;
  }

  .fund {
    padding: 1.1rem 1.5rem;
  }

  .window-body {
    padding: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
