* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--brand-ink);
  background: #f5f8f7;
  font: 1rem/1.55 var(--body);
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:where(a, button, input, summary, [tabindex]):focus-visible {
  outline: 2px solid #267b63;
  outline-offset: 3px;
}
h1, h2, h3, p { margin: 0; }
.shell { width: min(100% - clamp(2rem, 7vw, 7.5rem), 85rem); margin-inline: auto; }
.skip { position: absolute; inset: .6rem auto auto .6rem; z-index: 3; padding: .7rem; background: white; transform: translateY(-160%); }
.skip:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.topbar { background: var(--brand-field); border-bottom: 1px solid #e1ebe6; }
.topbar-inner { min-height: 4.2rem; display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.header-identity, .header-actions { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.header-actions { justify-content: flex-end; }
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; height: auto; max-width: 100%; }
ui-button { display: contents; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .55rem .9rem;
  min-height: 2.6rem;
  border: 1px solid transparent;
  border-radius: .6rem;
  font-size: .925rem;
  font-weight: 680;
}
.secondary { background: var(--brand-field); border-color: #d5e3dc; color: #183d34; }
.secondary:hover { background: #edf8f2; border-color: #a6cebb; }
.main { padding-block: clamp(1.4rem, 4vw, 3.4rem) 4rem; }
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 21rem);
  align-items: center;
  gap: clamp(1.15rem, 4vw, 4rem);
  padding: clamp(1.4rem, 5vw, 3.2rem);
  min-height: clamp(12rem, 18vw, 15.5rem);
  border: 1px solid #1e4740;
  border-radius: 1.2rem;
  color: white;
  background: radial-gradient(ellipse at 100% 9%, #23574b, transparent 54%),
    linear-gradient(120deg, #071f22, #113c36);
  box-shadow: 0 .5rem 1.55rem #14322916;
}
.hero::before {
  position: absolute;
  z-index: -1;
  inset: -60% -13% -90% 44%;
  content: "";
  transform: rotate(-24deg);
  background: repeating-radial-gradient(ellipse at center, transparent 0 29px,
    #8ed7b423 30px 31px, transparent 32px 40px);
  opacity: .52;
}
.hero-text { min-width: 0; }
.hero h1 {
  max-width: 100%;
  font: 740 clamp(2rem, 5.1vw, 3.95rem)/1.03 var(--display);
  letter-spacing: -.059em;
  overflow-wrap: anywhere;
}
.eyebrow { margin-block-end: .7rem; font-size: .875rem; font-weight: 620; color: #b0e3cc; }
.entry h1 { max-width: 14ch; font-size: clamp(1.95rem, 4.35vw, 3.25rem); }
.auth-entry .hero-text > p:last-child, #no-client { margin-top: .85rem; color: #d1e9df; }
.auth-primary { justify-self: end; color: #08241d; background: #89e4ba; }
.auth-primary:hover { background: #a5f2cc; }
.entry-form label { display: block; margin-bottom: .4rem; font-size: .9rem; font-weight: 680; }
.entry-controls { display: flex; gap: .55rem; }
.entry select {
  min-width: 0;
  width: 100%;
  font: inherit;
  padding: .6rem .75rem;
  border: 1px solid #cadbd2;
  border-radius: .55rem;
  color: var(--brand-ink);
  background: white;
}
.entry select {
  appearance: none;
  padding-inline-end: 1.8rem;
  background-image: linear-gradient(45deg, transparent 50%, #245d4b 50%),
    linear-gradient(135deg, #245d4b 50%, transparent 50%);
  background-position: right 1rem top 52%, right .7rem top 52%;
  background-size: .3rem .3rem;
  background-repeat: no-repeat;
}
.entry .primary { color: #08241d; background: #89e4ba; white-space: nowrap; }
.entry .primary:hover { background: #a5f2cc; }
.board-progress { display: grid; justify-items: center; gap: .26rem; text-align: center; min-width: 0; }
.board-progress strong { color: #174f3d; font: 740 1.28rem/1 var(--display); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.board-progress p { font-size: .875rem; line-height: 1.2; color: #425b53; font-variant-numeric: tabular-nums; }
.board-progress progress {
  appearance: none;
  width: 100%;
  height: .36rem;
  overflow: hidden;
  border: none;
  border-radius: 999px;
  color: #288563;
  background: #dcebe4;
}
.board-progress progress::-webkit-progress-bar { border-radius: 999px; background: #dcebe4; }
.board-progress progress::-webkit-progress-value { border-radius: 999px; background: #288563; }
.board-progress progress::-moz-progress-bar { border-radius: 999px; background: #288563; }
.notice {
  margin-block-start: 1.3rem;
  padding: .9rem 1rem;
  border: 1px solid #d7e6dd;
  border-radius: .7rem;
  background: var(--brand-field);
}
.error-notice { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; }
.client-summary { min-width: 0; border-inline-start: 1px solid #dee8e2; padding-inline-start: .8rem; }
.client-summary p { color: #425b53; font-size: .875rem; font-weight: 610; line-height: 1.15; }
.client-summary h1 { margin-block-start: .16rem; font: 730 clamp(1rem, 2.2vw, 1.45rem)/1.15 var(--display); letter-spacing: -.035em; overflow-wrap: anywhere; }
.read-only { color: #425b53; font-size: .9rem; white-space: nowrap; }
body[data-view="board"] {
  --board-gutter: clamp(.55rem, 1.2vw, 1rem);
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
[data-view="board"] .topbar { flex: none; }
[data-view="board"] .topbar-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(8rem, 16rem) minmax(0, 1fr);
  gap: .65rem;
  width: 100%;
  min-height: 4rem;
  padding: .4rem var(--board-gutter);
}
[data-view="board"] .brand { flex-shrink: 0; width: clamp(6rem, 10vw, 8.4rem); }
[data-view="board"] .main {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  padding: var(--board-gutter);
}
[data-view="board"] .notice { margin-block-start: 0; }
.board-section { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.board {
  --lane-gap: .75rem;
  --minimum-lane: clamp(12.4rem, calc((100% - 3 * var(--lane-gap)) / 4), 21rem);
  display: grid;
  flex: 1;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: minmax(var(--minimum-lane), 1fr);
  gap: var(--lane-gap);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #a9c9bb transparent;
}
.lane {
  --lane-edge: #dce6e3;
  --lane-accent: #657f77;
  --lane-wash: #eef3f1;
  --lane-ink: #334e46;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid var(--lane-edge);
  border-radius: .85rem;
  background: var(--lane-wash);
}
.tone-progress { --lane-edge: #d7e7eb; --lane-accent: #39829c; --lane-wash: #edf5f7; --lane-ink: #23576a; }
.tone-review { --lane-edge: #e3deee; --lane-accent: #7965a6; --lane-wash: #f2eff8; --lane-ink: #554373; }
.tone-done { --lane-edge: #cce7da; --lane-accent: #248561; --lane-wash: #eaf7ef; --lane-ink: #1c6148; }
.tone-blocked { --lane-edge: #ede2c9; --lane-accent: #94661d; --lane-wash: #faf3e5; --lane-ink: #694a19; }
.tone-closed { --lane-edge: #e8dfe2; --lane-accent: #8a6375; --lane-wash: #f5eff2; --lane-ink: #654956; }
.lane-header {
  flex: none;
  min-height: 3.15rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  padding: .7rem .82rem;
  border-bottom: 1px solid var(--lane-edge);
  color: var(--lane-ink);
}
.lane-header h3 { font: 710 1rem/1.2 var(--display); letter-spacing: -.012em; overflow-wrap: anywhere; }
.lane-dot { width: .56rem; height: .56rem; border-radius: 50%; background: var(--lane-accent); }
.lane-count {
  min-width: 1.6rem;
  padding: .17rem .43rem;
  border: 1px solid var(--lane-edge);
  border-radius: .42rem;
  background: #ffffffbd;
  font-size: .83rem;
  font-weight: 680;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.cards, .subtasks { display: grid; gap: .66rem; margin: 0; padding: .68rem; list-style: none; min-width: 0; }
.cards { flex: 1; min-height: 0; overflow-y: auto; align-content: start; overscroll-behavior-y: contain; scrollbar-width: thin; }
.cards:focus-visible { outline-offset: -3px; }
.lane-empty {
  display: grid;
  place-items: center;
  min-height: 4.5rem;
  margin: .7rem;
  padding: .75rem;
  border: 1px dashed var(--lane-edge);
  border-radius: .57rem;
  color: #476058;
  text-align: center;
  font-size: .9rem;
}
.card {
  min-width: 0;
  padding: .82rem .86rem;
  border: 1px solid #dce8e1;
  border-radius: .6rem;
  background: var(--brand-field);
  box-shadow: 0 .12rem .24rem #183c2c09;
  scroll-margin: .8rem;
}
.card:target { outline: 2px solid #287c63; outline-offset: 2px; }
.subtasks {
  margin-top: .73rem;
  padding: 0 0 0 .52rem;
  border-inline-start: 2px solid #a9d5bf;
  gap: .52rem;
}
.subtasks .card { padding: .58rem .64rem; box-shadow: none; background: #f7fbf9; }
.relations { display: flex; flex-wrap: wrap; gap: .32rem; margin-top: .6rem; }
.relation {
  display: inline-block;
  padding: .14rem .38rem;
  border-radius: .3rem;
  color: #245d4b;
  background: #e6f4eb;
  font-size: .875rem;
  font-weight: 620;
  text-decoration-thickness: .07em;
  text-underline-offset: .14em;
  overflow-wrap: anywhere;
}
.description, .description-preview { overflow-wrap: anywhere; }
.description { color: #172a2a; }
.description > * + * { margin-block-start: .6rem; }
.description :is(h1,h2,h3,h4,h5,h6) { font: 730 1rem/1.36 var(--display); letter-spacing: normal; }
.description a { color: #16674e; text-underline-offset: .16em; }
.description pre, .description table { max-width: 100%; overflow: auto; }
.description pre { padding: .45rem; background: var(--brand-surface); }
.description table { display: block; border-collapse: collapse; }
.description :is(td, th) { padding: .25rem .45rem; border: 1px solid var(--brand-border); }
.description :is(ul,ol) { padding-inline-start: 1rem; }
.description blockquote { margin-inline: 0; padding-inline-start: .5rem; border-inline-start: 2px solid var(--brand-border); }
.description.muted { color: #4c625a; font-style: italic; }
.detail-action { display: inline-block; margin-block-start: .42rem; color: #24654e; font-size: .9rem; font-weight: 700; text-decoration: underline; text-underline-offset: .15em; }
.detail-action:hover { color: #123f30; }
.ticket-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  border: 0;
  border-left: 1px solid #d8e6df;
  padding: 0;
  width: min(38rem, 100%);
  height: 100%;
  max-width: none;
  max-height: none;
  color: var(--brand-ink);
  background: var(--brand-field);
  box-shadow: -.8rem 0 2.6rem #102c2840;
  overscroll-behavior: contain;
}
.ticket-drawer::backdrop { background: #0a2423a0; }
body:has(.ticket-drawer[open]) { overflow: hidden; }
.drawer-surface { min-height: 100%; }
.drawer-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: clamp(1rem, 4vw, 1.7rem);
  border-bottom: 1px solid #dce8e1;
  background: #f4f9f6;
}
.drawer-heading h2 { font: 730 clamp(1.2rem, 4.35vw, 1.62rem)/1.25 var(--display); letter-spacing: -.035em; }
.drawer-state { margin-bottom: .25rem; color: #2e6955; font-size: .875rem; font-weight: 660; }
.drawer-body { padding: clamp(1rem, 4vw, 1.7rem); }
.drawer-body .description > * + * { margin-block-start: .86rem; }
.stage-nav { display: flex; flex: none; gap: .45rem; overflow-x: auto; margin: -.1rem 0 .42rem; padding: .14rem .14rem .25rem; scrollbar-width: thin; }
.stage-jump {
  flex: 0 0 auto;
  padding: .35rem .67rem;
  border: 1px solid #dce8e2;
  border-radius: .48rem;
  background: white;
  color: #294b3f;
  font-size: .875rem;
  font-weight: 640;
  white-space: nowrap;
}
.stage-jump[aria-pressed="true"] { background: #d8f0e4; border-color: #a5d0bb; color: #134c37; }
@media (max-width: 56rem) {
  [data-view="board"] .topbar-inner { grid-template-columns: minmax(0, 1fr) minmax(7.5rem, 12rem) minmax(0, 1fr); }
  [data-view="board"] .read-only { display: none; }
}
@media (max-width: 42rem) {
  .hero { grid-template-columns: 1fr; min-height: auto; border-radius: .95rem; }
  .hero h1 { font-size: clamp(1.85rem, 7.9vw, 3.05rem); }
  .hero::before { inset: -40% -50% -75% 23%; }
  .auth-primary { justify-self: start; }
  [data-view="board"] .topbar-inner { grid-template-columns: minmax(0, 1fr) auto; gap: .42rem .6rem; }
  [data-view="board"] .brand { width: 5.1rem; }
  [data-view="board"] .header-actions .button { padding-inline: .65rem; }
  .header-identity { gap: .55rem; }
  .client-summary { padding-inline-start: .55rem; }
  .board-progress { grid-column: 1 / -1; grid-row: 2; justify-self: center; width: min(14rem, 80%); }
  .stage-nav { scrollbar-width: none; }
  .board { --minimum-lane: calc(100% - .85rem); scroll-snap-type: x mandatory; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
