@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/onest-cyrillic-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/onest-cyrillic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/onest-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/onest-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --jade: #0f6b5c;
  --jade-deep: #0a4f44;
  --jade-tint: #e3f0ed;
  --marigold: #e9b32a;
  --ink: #1c2433;
  --muted: #5b6676;
  --paper: #f4f6f8;
  --surface: #ffffff;
  --line: #dce2e9;
  --danger: #b8402b;
  --danger-tint: #f8e7e3;
  --radius-s: 6px;
  --radius-m: 10px;
  --focus: 0 0 0 3px rgba(15, 107, 92, 0.35);
  font-family: 'Onest', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: 'tnum' 1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
}
h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
  font-weight: 650;
}
p {
  margin: 0;
}
[hidden] {
  display: none !important;
}

/* ---- controls ---------------------------------------------------- */

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}
.field label {
  font-size: 0.9rem;
  font-weight: 550;
}
.field .hint {
  font-size: 0.82rem;
  color: var(--muted);
}
.field .error-text {
  font-size: 0.82rem;
  color: var(--danger);
}
input,
select {
  font: inherit;
  color: inherit;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--surface);
}
input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-color: var(--jade);
}
input[aria-invalid='true'] {
  border-color: var(--danger);
}

.button {
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  background: var(--jade);
  color: #fff;
  cursor: pointer;
}
a.button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.button:hover {
  background: var(--jade-deep);
}
.button:disabled {
  opacity: 0.6;
  cursor: progress;
}
.button.quiet {
  background: transparent;
  color: var(--jade);
  border-color: var(--line);
}
.button.quiet:hover {
  background: var(--jade-tint);
}
.button.small {
  min-height: 34px;
  padding: 4px 12px;
  font-size: 0.88rem;
}
.button.full {
  width: 100%;
}
.link-button {
  font: inherit;
  background: none;
  border: none;
  padding: 0;
  color: var(--jade);
  font-weight: 550;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.alert {
  padding: 10px 14px;
  border-radius: var(--radius-s);
  background: var(--danger-tint);
  color: var(--danger);
  font-size: 0.92rem;
  margin-bottom: 16px;
}
.notice {
  padding: 10px 14px;
  border-radius: var(--radius-s);
  background: var(--jade-tint);
  color: var(--jade-deep);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.lang-switch {
  display: inline-flex;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 2px;
  background: var(--surface);
}
.lang-switch button {
  font: inherit;
  font-size: 0.85rem;
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--muted);
}
.lang-switch button[aria-pressed='true'] {
  background: var(--jade-tint);
  color: var(--jade-deep);
  font-weight: 600;
}

/* ---- sign-in page: the shop window ------------------------------- */

.entry {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 100vh;
}
.window {
  position: relative;
  background: var(--jade);
  color: #fff;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
/* The window frame: two thin mullions like a shopfront. */
.window::before {
  content: '';
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  pointer-events: none;
}
.wordmark {
  font-size: clamp(2.6rem, 5.4vw, 4.6rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 0.95;
}
.wordmark span {
  display: block;
  font-weight: 300;
}
.window .tagline {
  margin-top: 18px;
  font-size: 1.15rem;
  max-width: 28ch;
  color: rgba(255, 255, 255, 0.86);
}
.window .pitch {
  margin-top: 12px;
  max-width: 44ch;
  color: rgba(255, 255, 255, 0.72);
}

/* The price tag that hangs in the window. */
.tag {
  position: relative;
  align-self: flex-start;
  margin: 40px 0 0 6px;
  max-width: 330px;
  background: var(--marigold);
  color: var(--ink);
  padding: 22px 24px 22px 40px;
  border-radius: 4px 14px 14px 4px;
  clip-path: polygon(20px 0, 100% 0, 100% 100%, 20px 100%, 0 50%);
  transform: rotate(-4deg);
  transform-origin: 0 50%;
}
.tag::before {
  content: '';
  position: absolute;
  left: 18px;
  top: calc(50% - 6px);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--jade);
}
.tag ul {
  list-style: none;
  margin: 0;
  padding: 0 0 0 10px;
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 550;
}
.window .by {
  position: relative;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.66);
}

.desk {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--surface);
}
.desk-inner {
  width: 100%;
  max-width: 400px;
}
.desk-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 28px;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.tabs button {
  font: inherit;
  font-weight: 600;
  background: none;
  border: none;
  padding: 10px 2px;
  margin-right: 24px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.tabs button[aria-selected='true'] {
  color: var(--ink);
  border-bottom-color: var(--jade);
}

@media (max-width: 860px) {
  .entry {
    grid-template-columns: minmax(0, 1fr);
  }
  .window {
    padding: 36px 32px 40px;
  }
  .tag {
    display: none;
  }
  .window .by {
    margin-top: 16px;
  }
}

/* ---- app shell ----------------------------------------------------- */

.shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sidebar .mini-mark {
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--jade);
  padding: 4px 12px 12px;
}
.sidebar .mini-mark span {
  font-weight: 300;
}
.nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-s);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.nav a:hover {
  background: var(--paper);
}
.nav a[aria-current='page'] {
  background: var(--jade-tint);
  color: var(--jade-deep);
  font-weight: 650;
  box-shadow: inset 3px 0 0 var(--jade);
}
.nav .soon {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}
.sidebar .by {
  margin-top: auto;
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0 12px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.topbar .firm {
  font-weight: 650;
}
.topbar .branch {
  color: var(--muted);
}
.topbar .spacer {
  flex: 1;
}
.user-menu {
  position: relative;
}
.user-menu > button {
  font: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  cursor: pointer;
}
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--jade);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 650;
  font-size: 0.85rem;
}
.user-menu .menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: 0 10px 30px rgba(28, 36, 51, 0.12);
  padding: 6px;
  z-index: 20;
}
.menu .who {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
  font-size: 0.88rem;
}
.menu .who small {
  display: block;
  color: var(--muted);
}
.menu button {
  font: inherit;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 8px 10px;
  border-radius: var(--radius-s);
  cursor: pointer;
}
.menu button:hover {
  background: var(--paper);
}

main.page {
  padding: 32px;
  max-width: 1080px;
}
.page h1 {
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.page .lead {
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 28px;
}

/* Set-up checklist: a real sequence, so it is numbered. */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
}
.steps li + li {
  border-top: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-weight: 650;
  color: var(--muted);
}
.steps li.done::before {
  content: '';
  border-color: var(--jade);
  background: var(--jade)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 16px no-repeat;
}
.steps .step-title {
  font-weight: 600;
}
.steps .step-note {
  color: var(--muted);
  font-size: 0.9rem;
}
.steps li.later {
  opacity: 0.6;
}

/* ---- settings ---------------------------------------------------- */

.subnav {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  overflow-x: auto;
}
.subnav a {
  padding: 10px 14px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.subnav a[aria-current='page'] {
  color: var(--ink);
  border-bottom-color: var(--jade);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 24px;
  margin-bottom: 20px;
}
.panel h2 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.panel .panel-lead {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}
.form-grid .wide {
  grid-column: 1 / -1;
}
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 16px;
  margin-bottom: 18px;
}
.checks label {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.95rem;
}
.checks input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--jade);
}

table.list {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}
table.list th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--line);
}
table.list td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.list tr:last-child td {
  border-bottom: none;
}
table.list td.actions {
  text-align: right;
  white-space: nowrap;
}
table.list td.actions .button + .button {
  margin-left: 6px;
}
.pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  border: 1px solid var(--line);
}
.pill.off {
  background: var(--danger-tint);
  color: var(--danger);
  border-color: transparent;
}
.muted {
  color: var(--muted);
}
.empty {
  padding: 28px 8px;
  color: var(--muted);
  text-align: center;
}

dialog {
  border: none;
  border-radius: var(--radius-m);
  padding: 24px;
  width: min(480px, calc(100vw - 32px));
  box-shadow: 0 20px 50px rgba(28, 36, 51, 0.25);
  color: var(--ink);
}
dialog::backdrop {
  background: rgba(28, 36, 51, 0.45);
}
dialog h2 {
  font-size: 1.15rem;
  margin-bottom: 18px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-s);
  font-size: 0.92rem;
  z-index: 50;
}

.menu-toggle {
  display: none;
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    z-index: 30;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .sidebar.open {
    transform: none;
    box-shadow: 0 0 40px rgba(28, 36, 51, 0.2);
  }
  .menu-toggle {
    display: inline-grid;
  }
  .topbar {
    padding: 10px 16px;
  }
  .topbar .branch,
  #user-name {
    display: none;
  }
  .user-menu > button {
    padding: 4px;
  }
  main.page {
    padding: 20px 16px;
  }
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  table.list thead {
    display: none;
  }
  table.list tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
  }
  table.list td {
    border: none;
    padding: 4px 8px;
  }
  table.list td.actions {
    grid-column: 1 / -1;
    text-align: left;
  }
}

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

.section-title {
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.section-title.spaced {
  margin-top: 8px;
  margin-bottom: 4px;
}
.page .page-title {
  margin-bottom: 20px;
}
