:root {
  color-scheme: light;
  --bg: #f4f6f1;
  --card: #fff;
  --ink: #20392e;
  --muted: #52645a;
  --line: #dce4d9;
  --soft: #eef3e9;
  --dark: #203f33;
  --bright: #d9e8af;
  --focus: #52773f;
  --error: #842e2e;
  font:
    16px/1.53 system-ui,
    -apple-system,
    'Segoe UI',
    Arial,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  min-width: 300px;
}
a {
  color: var(--dark);
  text-underline-offset: 0.2em;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
*:focus-visible {
  outline: 3px solid var(--focus);
}
[hidden] {
  display: none !important;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:disabled:hover {
  transform: none;
}
svg {
  flex-shrink: 0;
  vertical-align: middle;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skip {
  position: absolute;
  z-index: 5;
  top: -90px;
  left: 1rem;
  background: white;
  padding: 0.65rem 1rem;
}
.skip:focus {
  top: 1rem;
}
.bar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.bar-inner {
  max-width: 1250px;
  min-height: 79px;
  padding: 0 clamp(1.15rem, 4vw, 3.35rem);
  margin: auto;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.045em;
  color: #203f33;
  font:
    700 2.08rem/1 Arial,
    Helvetica,
    sans-serif;
  letter-spacing: -0.055em;
  text-decoration: none;
}
.brand span {
  width: 0.165em;
  height: 0.165em;
  border-radius: 50%;
  background: #95aa65;
}
.bar-name {
  font-size: 0.88rem;
  font-weight: 580;
  color: var(--muted);
  padding-left: 1.2rem;
  border-left: 1px solid var(--line);
}
.account-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.button,
.subtle,
.text-button,
.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 43px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 620;
  line-height: 1.35;
  text-decoration: none;
  padding: 0.68rem 1rem;
  transition:
    background-color 0.12s,
    border-color 0.12s;
}
.button {
  background: var(--dark);
  color: white;
}
.button:hover {
  background: #315440;
}
.subtle,
.tab {
  background: var(--card);
  border-color: #cdd9cc;
}
.subtle:hover,
.tab:hover {
  background: var(--soft);
  border-color: #b2c2ad;
}
.text-button {
  background: transparent;
  color: var(--muted);
  min-height: 40px;
  padding: 0.55rem 0.65rem;
}
.text-button:hover {
  color: var(--dark);
  background: var(--soft);
}
.danger {
  color: #842e2e;
}
.tab.active {
  color: white;
  background: var(--dark);
  border-color: var(--dark);
}
.tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.35rem;
}
main {
  max-width: 1250px;
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 3.7rem) clamp(1.15rem, 4vw, 3.35rem) 4.5rem;
}
main:focus {
  outline: none;
}
.loading,
.empty {
  color: var(--muted);
}
.loading {
  padding: 3rem;
  text-align: center;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(2.05rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
  font-weight: 640;
  overflow-wrap: anywhere;
}
h2 {
  font-size: clamp(1.3rem, 2.3vw, 1.55rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
  font-weight: 640;
}
h3 {
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
}
.muted,
.subtext,
.help,
.subtitle {
  color: var(--muted);
}
.subtitle {
  margin-top: 0.65rem;
  max-width: 52rem;
}
.help,
.subtext {
  font-size: 0.9rem;
}
.help {
  font-weight: 400;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.91rem;
}
.breadcrumb button {
  background: none;
  border: 0;
  font: inherit;
  padding: 0.1rem 0;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.heading-row,
.panel-head,
.list-row,
.button-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.heading-row {
  margin-bottom: 1.75rem;
}
.panel-head {
  align-items: flex-start;
  margin-bottom: 1.15rem;
}
.panel-head p {
  margin-top: 0.3rem;
}
.button-row {
  justify-content: flex-start;
  gap: 0.65rem;
}
.panel,
.access {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1.2rem, 2.8vw, 2rem);
  min-width: 0;
}
.panel + .panel {
  margin-top: 1rem;
}
.panel > h2,
.access h1 {
  margin-bottom: 1rem;
}
.access h1 {
  font-size: clamp(2rem, 4vw, 2.85rem);
}
.access-wrap {
  max-width: 520px;
  margin: clamp(1rem, 8vh, 5rem) auto 0;
}
.access {
  padding: clamp(1.55rem, 4vw, 2.6rem);
  border-top: 5px solid var(--dark);
}
.access form {
  margin-top: 1.65rem;
}
.narrow {
  max-width: 720px;
}
.lower {
  margin-top: 1.2rem;
}
.separated {
  margin-top: 1.25rem;
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
}
.pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 100px;
  padding: 0.3rem 0.72rem;
  background: var(--soft);
  color: #3a5942;
  font-size: 0.82rem;
  font-weight: 620;
  line-height: 1.42;
}
form.stack,
.stack {
  display: grid;
  gap: 1rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  font-size: 0.94rem;
  font-weight: 620;
}
.field input,
.field select,
.field textarea,
.readonly {
  width: 100%;
  border: 1px solid #cad6c8;
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  padding: 0.73rem 0.8rem;
  line-height: 1.4;
  font-weight: 400;
  min-width: 0;
}
.field textarea {
  resize: vertical;
  min-height: 78px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid #759766;
  outline-offset: 1px;
}
.field:has(input[readonly]) input,
.readonly {
  background: #f5f7f3;
}
.readonly {
  font-family: ui-monospace, monospace;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}
.field-error,
.notice,
.empty-card {
  padding: 0.9rem 1rem;
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.field-error {
  background: #fff1ec;
  color: var(--error);
  border: 1px solid #f1d3c8;
}
.notice,
.empty-card {
  background: #f5f7f2;
  border: 1px solid var(--line);
  color: var(--muted);
}
.notice strong {
  color: var(--ink);
}
.empty-card .button-row {
  margin-top: 0.8rem;
}
.field-row,
.divided,
.company-grid,
.modules-grid {
  display: grid;
  gap: 1rem;
}
.field-row,
.divided {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.divided {
  align-items: start;
}
.divided > .panel + .panel {
  margin: 0;
}
.company-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(245px, 100%), 1fr));
}
.company-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  text-align: left;
  padding: 1.2rem;
  min-width: 0;
  min-height: 128px;
  display: grid;
  gap: 1rem;
  align-content: space-between;
}
.company-card:hover {
  border-color: #93ab8e;
  background: #fbfcf9;
}
.company-card > strong {
  font-size: 1.18rem;
  overflow-wrap: anywhere;
}
.company-meta {
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  align-items: center;
}
.module-list,
.people-list,
.invitation-list,
.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.list-row,
.task-row {
  border-top: 1px solid var(--line);
  padding: 0.85rem 0;
}
.list-row:first-child,
.task-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.list-row:last-child,
.task-row:last-child {
  padding-bottom: 0;
}
.list-row > div,
.task-row > div {
  min-width: 0;
}
.list-row strong,
.task-row h3 {
  overflow-wrap: anywhere;
}
.list-row p,
.task-row p {
  margin: 0.18rem 0 0;
  overflow-wrap: anywhere;
}
.task-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.85rem;
}
.task-row .text-button {
  flex-shrink: 0;
}
.modules-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
}
.module-check {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.85rem;
  cursor: pointer;
}
.module-check:has(input:checked) {
  border-color: #83a173;
  background: #f1f6eb;
}
.module-check input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin: 0.18rem 0 0;
  accent-color: var(--dark);
}
.module-check strong,
.module-check small {
  display: block;
}
.module-check small {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 0.15rem;
}
.module-entry {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--line);
  background: #fafbf8;
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
}
.module-entry svg {
  color: #536c51;
}
.data {
  display: grid;
  gap: 0.67rem;
  margin: 0;
}
.data div {
  display: grid;
  grid-template-columns: minmax(110px, 0.75fr) 1.25fr;
  gap: 0.75rem;
}
.data dt {
  color: var(--muted);
  font-size: 0.9rem;
}
.data dd {
  margin: 0;
  font-weight: 560;
  overflow-wrap: anywhere;
}
.recovery-list {
  columns: 2;
  list-style: none;
  margin: 0;
  padding: 0.85rem;
  background: #f4f6f0;
  border-radius: 8px;
  font-family: ui-monospace, monospace;
}
.recovery-list li {
  padding: 0.15rem;
  word-break: break-all;
}
.wide {
  width: 100%;
}
.toast {
  position: fixed;
  inset: auto 1rem 1rem;
  z-index: 10;
  width: fit-content;
  max-width: min(540px, calc(100% - 2rem));
  margin: auto;
  background: var(--dark);
  color: white;
  box-shadow: 0 6px 24px #12261828;
  border-radius: 9px;
  padding: 0.7rem 1rem;
}
.toast:empty {
  display: none;
}
.tabbar .tab svg {
  width: 17px;
  height: 17px;
}
.small-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--dark);
}
.chooser-compact {
  width: fit-content;
}
@media (max-width: 720px) {
  .divided,
  .field-row {
    grid-template-columns: 1fr;
  }
  .heading-row {
    align-items: flex-start;
    margin-bottom: 1.4rem;
  }
  .bar-inner {
    gap: 0.75rem;
    min-height: 66px;
  }
  .bar-name {
    padding-left: 0.75rem;
  }
  .account-nav {
    gap: 0.1rem;
  }
  .account-nav button {
    font-size: 0.88rem;
    padding: 0.5rem;
  }
  .account-nav button svg {
    display: none;
  }
  .divided {
    gap: 0.8rem;
  }
}
@media (max-width: 490px) {
  .bar-name {
    display: none;
  }
  .brand {
    font-size: 1.9rem;
  }
  .bar-inner {
    padding: 0 1rem;
  }
  .access-wrap {
    margin: 0.5rem auto;
  }
  .tabbar {
    gap: 0.35rem;
  }
  .tab {
    font-size: 0.9rem;
    padding: 0.58rem 0.73rem;
    min-height: 41px;
  }
  .tab svg {
    display: none;
  }
  .task-row {
    flex-wrap: wrap;
  }
  .data div {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .company-card {
    min-height: 100px;
  }
  .heading-row > .button {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
summary {
  cursor: pointer;
  font-weight: 630;
  padding: 0.3rem 0;
}
summary:focus-visible {
  outline-offset: 2px;
}
details > summary + form {
  margin-top: 0.85rem;
}
.stack > .panel + .panel {
  margin: 0;
}
.share-panel {
  margin-bottom: 1rem;
  border-color: #aebfa0;
  background: #f8faf4;
}
.employee-record, .inbox-item, .support-item {
  padding: .9rem 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.employee-record summary .pill, .employee-record summary .subtext { margin-inline-start: .65rem; }
.employee-record summary { padding-block: .5rem; }
.employee-record .button-row, .support-item .button-row { margin-top: .65rem; }
.message-link { background: transparent; border: 0; padding: .25rem 0; font-size: 1.1rem; font-weight: 680; color: var(--dark); text-align: left; text-decoration: underline; text-underline-offset: .2em; }
.inbox-preview { margin: .3rem 0 0; }
.thread-list { padding: 0; margin: 0; list-style: none; }
.thread-turn { padding: 1.1rem; border-left: 3px solid var(--line); background: var(--bg); overflow-wrap: anywhere; }
.thread-turn + .thread-turn { margin-top: .65rem; }
.thread-turn p, .support-item p, .inbox-item p { margin: .35rem 0 0; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: .25rem; max-width: 34rem; }
.weekday { text-align: center; color: var(--muted); font-size: .88rem; }
.calendar-day { display: grid; grid-template-rows: 1fr .35rem; justify-items: center; align-items: center; min-height: 2.8rem; padding: .35rem .1rem; color: var(--ink); border: 1px solid var(--line); border-radius: .35rem; background: var(--card); }
.calendar-day[aria-pressed=true] { background: var(--dark); color: white; border-color: var(--dark); }
.day-dot { width: .35rem; height: .35rem; background: currentColor; border-radius: 50%; }
.agenda { border-top: 1px solid var(--line); padding-top: 1rem; }
.agenda h3, .agenda p { margin: 0; }
h1:focus {
  outline: none;
}
