@font-face {
  font-family: Fatal;
  src: url("/brief-assets/fonts/fatal-trial-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Fira Code";
  src: url("/brief-assets/fonts/fira-code-cyrillic-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Fira Code";
  src: url("/brief-assets/fonts/fira-code-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  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;
}

@font-face {
  font-family: "Fira Code";
  src: url("/brief-assets/fonts/fira-code-cyrillic-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Fira Code";
  src: url("/brief-assets/fonts/fira-code-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  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 {
  --ink: #242121;
  --paper: #f7f6f4;
  --line: #dddbd4;
  --muted: #6e6e6e;
  --bad: #a94442;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Fira Code", ui-monospace, Menlo, monospace;
  font-size: 16px;
  line-height: 1.55;
}

.top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  color: #f5f5f5;
  background: var(--ink);
}

.logo {
  font-family: Fatal, Impact, sans-serif;
  font-size: 26px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.top nav { display: flex; gap: 8px; margin-left: auto; }

.tab, .linkish, .btn, .plus, .chip button {
  font: inherit;
  cursor: pointer;
  border-radius: 5px;
}

.tab, .linkish {
  background: transparent;
  color: #f5f5f5;
  border: 1px solid rgba(255,255,255,.3);
  padding: 6px 10px;
}

.tab.is-on { background: #f5f5f5; color: var(--ink); }

main {
  max-width: 820px;
  margin: 0 auto 110px;
  padding: 24px 16px 32px;
}

.intro {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 24px;
  align-items: start;
  margin-bottom: 28px;
}

h1 {
  margin: 0 0 8px;
  font-family: Fatal, Impact, sans-serif;
  font-size: 34px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.05;
}

.intro p { margin: 0; }
.intro p + p { margin-top: 8px; }

.zina {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
}

.zina img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 6px;
}

.zina span, .hint, .mark { color: var(--muted); font-size: 13px; }

.zina a { color: var(--ink); }

.login {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.login label { display: flex; flex-direction: column; gap: 4px; }

.banner {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.part-title {
  margin: 28px 0 12px;
  font-family: "Fira Code", ui-monospace, Menlo, monospace;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

.part-title:first-child,
.banner + .part-title {
  margin-top: 0;
}

.section {
  margin: 0 0 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 16px 8px;
}

.section h2 {
  margin: 0 0 4px;
  font-family: "Fira Code", ui-monospace, Menlo, monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.25;
}

.section-lead {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 16px;
  align-items: start;
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field[hidden] { display: none; }

label span, .field > span { font-size: 14px; font-weight: 600; line-height: 1.3; }

.req { color: var(--bad); font-style: normal; }

.hint { min-height: 18px; margin: 0; line-height: 1.3; }

.control {
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 12px;
  font: 16px/1.2 "Fira Code", ui-monospace, Menlo, monospace;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c8c4bc;
  border-radius: 8px;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

textarea.control {
  height: auto;
  min-height: 96px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.4;
}

select.control.is-placeholder {
  color: #9a958c;
}

select.control option {
  color: var(--ink);
}

select.control option[value=""] {
  color: #9a958c;
}

select.control {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236e6e6e' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.control:focus {
  outline: none;
  border-color: #242121;
  box-shadow: 0 0 0 3px rgba(36, 33, 33, 0.12);
}

.login input {
  width: 100%;
  height: 44px;
  margin-top: 4px;
  padding: 0 12px;
  font: 16px/1.2 "Fira Code", ui-monospace, Menlo, monospace;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c8c4bc;
  border-radius: 8px;
  appearance: none;
  -webkit-appearance: none;
}

.field.missing input,
.field.missing select,
.field.missing textarea { border-color: var(--bad); }

.check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: none;
}

.date-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}

.date-card {
  width: 112px;
  min-height: 132px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #f4f4f5;
  text-align: center;
  padding: 12px 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.date-card-month {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #71717a;
}

.date-card-day {
  font-family: Fatal, Impact, sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  margin: 4px 0 0;
}

.date-card-year {
  font-size: 12px;
  color: #71717a;
  margin-bottom: 6px;
}

.date-card-remove {
  margin-top: auto;
  border: 0;
  background: transparent;
  color: #242121;
  font: inherit;
  font-size: 12px;
  padding: 2px 6px;
  cursor: pointer;
}

.date-card-add {
  border-style: dashed;
  background: #fff;
  cursor: pointer;
  justify-content: center;
  color: #242121;
}

.date-card-plus {
  font-size: 32px;
  line-height: 1;
  font-weight: 700;
}

.date-card-add-label {
  font-size: 11px;
  margin-top: 6px;
}

.date-proxy {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.suggest-list {
  position: fixed;
  z-index: 40;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  max-height: 240px;
  overflow: auto;
}

.suggest-list button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  font: inherit;
  padding: 8px 12px;
  cursor: pointer;
}

.suggest-list button:hover { background: #f3f1ee; }

.flatpickr-calendar { font-size: 16px; }
.flatpickr-day { max-width: 42px; height: 42px; line-height: 42px; }
.flatpickr-day.is-off { font-weight: 700; }

.history-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.history-head { font-weight: 700; }

.history-body.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.history-more {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.dock {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.dock-actions { display: flex; gap: 8px; }

.btn {
  border: 1px solid #cfc9c0;
  background: #fff;
  padding: 10px 14px;
}

.btn-ink {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.mark { min-height: 18px; }
.mark.bad { color: var(--bad); }

.picker-title { font-size: 16px; }
.picker-cell__control { font-size: 18px; }

@media (max-width: 700px) {
  .intro, .grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .dock { flex-direction: column; align-items: stretch; }
  .dock-actions { width: 100%; }
  .dock-actions .btn { flex: 1; }
}
