:root {
  --ink: #112a46;
  --paper: #f3f0e9;
  --white: #fffefa;
  --line: #d9d5cc;
  --rust: #b3542f;
  --green: #2f755f;
  --muted: #6f7883;
  --shadow: 0 8px 24px rgba(17, 42, 70, 0.08);
}
* {
  box-sizing: border-box;
}
html {
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}
body {
  margin: 0;
  min-height: 100dvh;
  background: linear-gradient(
    90deg,
    rgba(17, 42, 70, 0.025) 1px,
    transparent 1px
  );
  background-size: 28px 28px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
.workspace main,
.topbar {
  max-width: 1580px;
  margin: auto;
}
.topbar {
  height: 76px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 240, 233, 0.94);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-weight: 900;
  letter-spacing: -0.12em;
  padding-right: 3px;
}
.brand strong,
.brand small {
  display: block;
}
.brand strong {
  font-size: 14px;
}
.brand small {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
  margin-top: 2px;
}
.top-actions {
  display: flex;
  gap: 8px;
}
.primary,
.quiet,
.danger,
.icon-button,
.column-add {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 0 17px;
  font-weight: 700;
}
.primary {
  background: var(--ink);
  color: white;
  box-shadow: 0 4px 0 #091b2e;
}
.primary:hover {
  transform: translateY(1px);
  box-shadow: 0 3px 0 #091b2e;
}
.quiet {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
}
.danger {
  color: #9b321f;
  background: #fff0eb;
}
.wide {
  width: 100%;
  height: 48px;
}
.intro {
  padding: 46px 28px 28px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--rust);
  margin: 0 0 9px;
}
.intro h1 {
  font-family: Georgia, serif;
  font-size: clamp(38px, 5vw, 67px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  margin: 0;
}
.intro > div > p:last-child {
  color: var(--muted);
  max-width: 650px;
  margin: 14px 0 0;
}
.pulse {
  display: flex;
  background: var(--ink);
  color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.pulse div {
  min-width: 110px;
  padding: 14px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}
.pulse div:last-child {
  border: 0;
}
.pulse strong,
.pulse span {
  display: block;
}
.pulse strong {
  font-family: Georgia, serif;
  font-size: 24px;
}
.pulse span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #b9c7d5;
}
.toolbar {
  margin: 0 28px 18px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.view-switch {
  display: flex;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 9px;
  padding: 3px;
}
.view-switch button {
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 8px 16px;
  color: var(--muted);
  font-weight: 700;
}
.view-switch button.active {
  background: var(--ink);
  color: white;
}
.search {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  max-width: 440px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 12px;
}
.search input {
  width: 100%;
  height: 42px;
  border: 0;
  background: transparent;
  outline: 0;
}
.toolbar select {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  padding: 0 34px 0 12px;
  color: var(--ink);
}
.board {
  display: grid;
  grid-template-columns: repeat(6, minmax(245px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding: 0 28px 60px;
  scroll-snap-type: x proximity;
}
.column {
  background: rgba(255, 254, 250, 0.6);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 560px;
  scroll-snap-align: start;
}
.column > header {
  height: 82px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.column h2 {
  font-family: Georgia, serif;
  font-size: 17px;
  margin: 0;
}
.column h2 span {
  font-family: "Avenir Next", sans-serif;
  font-size: 11px;
  color: var(--muted);
  margin-left: 5px;
}
.column header p {
  font-size: 10px;
  color: var(--muted);
  margin: 5px 0 0;
}
.column-add {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  font-size: 19px;
}
.dropzone {
  padding: 10px;
  min-height: 475px;
}
.ticket {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px;
  margin-bottom: 9px;
  box-shadow: 0 2px 0 rgba(17, 42, 70, 0.05);
  position: relative;
  transition: 0.15s ease;
}
.ticket:hover {
  border-color: #aeb7c1;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.ticket:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  border-radius: 9px 9px 0 0;
  background: #8d99a6;
}
.ticket.priority-urgent:before {
  background: #ba3f2d;
}
.ticket.priority-high:before {
  background: #d07a39;
}
.ticket.priority-low:before {
  background: #8395a8;
}
.ticket-top,
.ticket footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ticket-key {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #63788e;
}
.priority {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rust);
  font-weight: 800;
}
.ticket h3 {
  font-size: 14px;
  line-height: 1.35;
  margin: 11px 0 7px;
}
.ticket > p {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.labels {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.labels span {
  font-size: 9px;
  border: 1px solid #d9e3ec;
  border-radius: 99px;
  padding: 3px 7px;
  color: #486079;
  background: #f5f8fb;
}
.ticket footer {
  border-top: 1px solid #ece9e2;
  padding-top: 9px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 9px;
}
.empty {
  display: grid;
  place-items: center;
  min-height: 85px;
  color: #9ba1a6;
  font-size: 11px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.ticket-list {
  margin: 0 28px 60px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.ticket-list article,
.list-head {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 130px 130px 150px;
  align-items: center;
  gap: 15px;
  padding: 13px 18px;
  border-bottom: 1px solid #ece9e2;
}
.ticket-list article {
  cursor: pointer;
}
.ticket-list article:hover {
  background: #f8f6f1;
}
.ticket-list small,
.ticket-list strong {
  display: block;
}
.ticket-list small {
  color: var(--muted);
  font-size: 10px;
}
.ticket-list strong {
  font-size: 13px;
  margin-top: 3px;
}
.list-head {
  background: #eeeae2;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
dialog {
  border: 0;
  border-radius: 14px;
  padding: 0;
  width: min(760px, calc(100% - 28px));
  max-height: 90dvh;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 30px 80px rgba(17, 42, 70, 0.28);
}
dialog::backdrop {
  background: rgba(10, 25, 42, 0.64);
  backdrop-filter: blur(3px);
}
#ticket-form {
  padding: 26px;
  overflow: auto;
  max-height: 90dvh;
}
#ticket-form > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 22px;
}
#ticket-form h2 {
  font-family: Georgia, serif;
  font-size: 30px;
  margin: 0;
}
.icon-button {
  font-size: 25px;
  width: 40px;
  padding: 0;
  background: #f1eee7;
}
label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #506071;
  margin-bottom: 16px;
}
input,
textarea,
select {
  display: block;
  width: 100%;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 11px 12px;
  outline: 0;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17, 42, 70, 0.1);
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-grid.three {
  grid-template-columns: repeat(3, 1fr);
}
#ticket-form > footer {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 20px;
}
#ticket-form > footer span {
  flex: 1;
}
.form-error {
  color: #a93624;
  font-size: 12px;
  min-height: 16px;
}
.comments {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 18px;
}
.comments h3 {
  font-family: Georgia, serif;
  font-size: 17px;
}
.comments article {
  background: #f5f2eb;
  padding: 12px;
  border-radius: 8px;
  margin: 8px 0;
}
.comments article p {
  white-space: pre-wrap;
  font-size: 12px;
  margin: 0;
}
.comments time {
  font-size: 9px;
  color: var(--muted);
}
.comments article footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.comments article footer strong {
  color: var(--rust);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.blocked-copy {
  color: #9b321f !important;
  font-weight: 700;
}
.comment-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}
.login-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--ink);
}
.login-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: Georgia, serif;
  font-size: min(24vw, 250px);
  letter-spacing: -0.22em;
  padding-right: 0.17em;
  overflow: hidden;
}
.login-mark i {
  display: block;
  width: 0.55em;
  height: 0.08em;
  background: var(--rust);
  transform: rotate(-18deg);
  margin: 0 -0.26em;
  z-index: 2;
}
.login-card {
  background: var(--paper);
  padding: clamp(35px, 8vw, 120px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-card h1 {
  font-family: Georgia, serif;
  font-size: clamp(44px, 5vw, 76px);
  line-height: 0.94;
  letter-spacing: -0.06em;
  margin: 0;
}
.login-copy {
  color: var(--muted);
  line-height: 1.7;
  margin: 22px 0 35px;
  max-width: 430px;
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--ink);
  color: white;
  padding: 12px 17px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 0.2s;
}
.toast.show {
  opacity: 1;
  transform: none;
}
@media (max-width: 800px) {
  .topbar {
    height: auto;
    min-height: 68px;
    padding: 10px 14px;
  }
  .brand small,
  .top-actions .quiet {
    display: none;
  }
  .top-actions {
    gap: 6px;
  }
  .intro {
    padding: 31px 16px 20px;
    display: block;
  }
  .intro h1 {
    font-size: 43px;
  }
  .intro > div > p:last-child {
    font-size: 13px;
  }
  .pulse {
    margin-top: 22px;
  }
  .pulse div {
    flex: 1;
    min-width: 0;
    padding: 12px;
  }
  .toolbar {
    margin: 0 16px 14px;
    display: grid;
    grid-template-columns: 1fr auto;
  }
  .search {
    grid-row: 2;
    grid-column: 1/-1;
    max-width: none;
  }
  .board {
    padding: 0 16px 90px;
    display: block;
  }
  .column {
    min-height: auto;
    margin-bottom: 12px;
  }
  .dropzone {
    min-height: 80px;
  }
  .ticket-list {
    margin: 0 16px 90px;
    overflow-x: auto;
  }
  .ticket-list article,
  .list-head {
    min-width: 720px;
  }
  .form-grid,
  .form-grid.three {
    grid-template-columns: 1fr;
  }
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-mark {
    display: none;
  }
  .login-card {
    padding: 34px 22px;
  }
  .comment-compose {
    grid-template-columns: 1fr;
  }
  .comment-compose button {
    height: 42px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
