@font-face {
  font-family: Geologica;
  src: url("/assets/geologica.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --bg: #f4f8f5;
  --surface: #fff;
  --ink: #1d3428;
  --muted: #53675b;
  --line: #cfddd3;
  --green: #276a4a;
  --on-green: #fff;
  --wash: #e7f1ea;
  --gold: #fae7ad;
  --danger: #a03138;
  --hint: #f1f5f2;
  --radius: 20px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11231b;
  --surface: #1b3025;
  --ink: #eff7f2;
  --muted: #b2c9ba;
  --line: #426651;
  --green: #b2e2c2;
  --on-green: #143d26;
  --wash: #294b37;
  --gold: #634b1d;
  --danger: #ffb5b9;
  --hint: #243a2d;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    16px/1.5 Geologica,
    system-ui,
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button:active:not(:disabled) {
  filter: brightness(0.93);
}
a {
  color: var(--green);
}
button,
input,
textarea,
select {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
button {
  min-height: 48px;
  padding: 11px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 0.15s,
    opacity 0.15s;
}
button:hover:not(:disabled) {
  background: var(--wash);
}
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
}
textarea {
  resize: vertical;
  min-height: 142px;
  line-height: 1.55;
}
input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
  accent-color: var(--green);
}
input[type="file"] {
  padding: 10px;
  max-width: 100%;
}
svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -1.25px;
  text-wrap: balance;
}
h2 {
  font-size: 23px;
  font-weight: 550;
  line-height: 1.3;
  text-wrap: balance;
}
h3 {
  font-size: 18px;
  font-weight: 550;
}
.muted,
.hint {
  color: var(--muted);
}
.hint {
  font-size: 13px;
  line-height: 1.5;
}
.shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100dvh;
  max-width: 1600px;
  margin: auto;
}
.workspace {
  min-width: 0;
}
#sidebar {
  border-right: 1px solid var(--line);
  padding: 36px 24px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 600;
}
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 13px;
}
.brand small {
  display: block;
  font-size: 12px;
  font-weight: 450;
  color: var(--muted);
}
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nav-list button {
  border: 0;
  background: transparent;
  justify-content: start;
  padding: 14px 12px;
  text-align: left;
}
.nav-list button[aria-current="page"] {
  background: var(--wash);
  color: var(--green);
  font-weight: 600;
}
.sidebar-foot {
  margin-top: auto;
  font-size: 13px;
  color: var(--muted);
}
.sidebar-foot a {
  display: block;
  margin-top: 12px;
}
#header {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 40px;
  border-bottom: 1px solid var(--line);
}
.header-title {
  font-weight: 500;
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-tools select {
  width: 88px;
  padding: 8px;
  min-height: 44px;
}
.icon-button {
  padding: 11px;
  min-width: 48px;
}
.mobile-brand {
  display: none;
}
#main {
  padding: 36px 40px 60px;
  max-width: 1160px;
  margin: auto;
  outline: none;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  margin-bottom: 28px;
}
.page-head p {
  margin-top: 12px;
  max-width: 610px;
  color: var(--muted);
}
.primary {
  background: var(--green);
  color: var(--on-green);
  border-color: transparent;
  font-weight: 550;
}
.primary:hover:not(:disabled) {
  background: var(--green);
  filter: brightness(0.95);
}
.secondary {
  background: var(--wash);
  border-color: transparent;
  color: var(--green);
}
.text-button {
  background: transparent;
  border: 0;
  padding: 8px 12px;
}
.danger {
  color: var(--danger);
}
.button-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.search {
  position: relative;
  margin-bottom: 24px;
}
.search svg {
  position: absolute;
  top: 15px;
  left: 16px;
  color: var(--muted);
}
.search input {
  padding: 15px 16px 15px 48px;
  border-radius: 16px;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 190px;
  align-items: center;
  background: var(--wash);
  border-radius: 26px;
  padding: 32px;
  margin-bottom: 28px;
  gap: 24px;
}
.hero h2 {
  font-size: 28px;
  max-width: 440px;
}
.hero p {
  max-width: 450px;
  margin-top: 10px;
  color: var(--muted);
}
.hero .button-row {
  margin-top: 24px;
}
.hero-art {
  height: 150px;
  position: relative;
  display: grid;
  place-items: center;
}
.hero-art svg {
  width: 126px;
  height: 126px;
  stroke: var(--green);
  stroke-width: 1;
  transform: rotate(-7deg);
}
.hero-art:after {
  content: "";
  position: absolute;
  width: 38px;
  height: 38px;
  background: var(--gold);
  border: 8px solid var(--wash);
  border-radius: 50%;
  right: 15px;
  bottom: 15px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 28px 0 16px;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.guide {
  padding: 20px;
  display: flex;
  align-items: start;
  gap: 14px;
  text-align: left;
  justify-content: start;
  border-radius: 16px;
  min-height: 108px;
}
.guide-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--hint);
  flex-shrink: 0;
  color: var(--green);
}
.guide .hint {
  margin-top: 5px;
  display: block;
}
.guide .chevron {
  margin-left: auto;
  align-self: center;
  width: 18px;
}
.wide {
  grid-column: 1/-1;
}
.article {
  max-width: 740px;
  margin: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 32px;
  border-radius: 24px;
}
.article h1 {
  font-size: 32px;
}
.article p {
  margin: 20px 0;
  line-height: 1.75;
  white-space: pre-wrap;
}
.article .button-row {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 28px;
}
.article img {
  width: 100%;
  border-radius: 16px;
  margin-top: 22px;
  max-height: 550px;
  object-fit: contain;
  background: var(--hint);
}
.filters {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 3px 3px 12px;
  margin-bottom: 16px;
  scrollbar-width: thin;
}
.filters button {
  white-space: nowrap;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 24px;
}
.filters [aria-pressed="true"] {
  background: var(--green);
  color: var(--on-green);
  border-color: transparent;
}
.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ticket-row {
  width: 100%;
  padding: 20px;
  text-align: left;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  border-radius: 16px;
}
.ticket-main {
  min-width: 0;
  flex: 1;
}
.ticket-main h3 {
  overflow-wrap: anywhere;
  margin: 8px 0;
}
.ticket-top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  flex-wrap: wrap;
}
.ticket-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.badge {
  border-radius: 7px;
  padding: 4px 8px;
  background: var(--wash);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge.resolved {
  background: var(--hint);
  color: var(--muted);
}
.badge.priority {
  background: var(--gold);
  color: var(--ink);
}
.badge.unread {
  background: var(--green);
  color: var(--on-green);
}
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat {
  padding: 20px 24px;
  border-left: 3px solid var(--line);
  background: var(--surface);
  border-radius: 0 14px 14px 0;
}
.stat:first-child {
  border-left-color: var(--green);
}
.stat strong {
  font-size: 32px;
  display: block;
  font-weight: 550;
  line-height: 1.1;
  margin-bottom: 9px;
}
.stat span {
  color: var(--muted);
  font-size: 14px;
}
.metrics {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}
.empty {
  padding: 38px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 20px;
}
.empty > svg {
  width: 48px;
  height: 48px;
  color: var(--green);
  margin-bottom: 15px;
}
.empty h2 {
  font-size: 23px;
}
.empty p {
  max-width: 410px;
  margin: 12px auto 22px;
  color: var(--muted);
}
.form-card {
  max-width: 760px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: 24px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: block;
  margin-bottom: 20px;
}
.field > span {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
}
.field small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}
.field-error {
  color: var(--danger) !important;
}
.kind-picker {
  display: flex;
  gap: 8px;
  margin: 12px 0 24px;
  flex-wrap: wrap;
}
.kind-picker button[aria-pressed="true"] {
  background: var(--wash);
  color: var(--green);
  border-color: var(--green);
}
.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.form-footer .hint {
  max-width: 330px;
}
.callout {
  background: var(--wash);
  padding: 16px 20px;
  border-radius: 14px;
  margin: 18px 0;
  line-height: 1.55;
}
.thread-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 22px;
}
.conversation {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0 28px;
}
.message {
  max-width: 88%;
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 16px 18px;
  border-radius: 18px 18px 18px 4px;
  min-width: 190px;
}
.message.mine {
  align-self: flex-end;
  background: var(--wash);
  border-color: transparent;
  border-radius: 18px 18px 4px 18px;
}
.message.note {
  max-width: 100%;
  background: var(--gold);
  border-color: transparent;
  border-radius: 12px;
  align-self: stretch;
}
.message .body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.message-foot {
  font-size: 11px;
  margin-top: 8px;
  color: var(--muted);
}
.attachment-button {
  justify-content: start;
  width: 100%;
  background: transparent;
  margin-top: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.composer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
}
.composer textarea {
  min-height: 114px;
  border: 0;
  background: var(--hint);
  margin: 12px 0;
}
.composer .field {
  margin: 14px 0;
}
.composer .button-row {
  justify-content: space-between;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.detail-aside {
  align-self: start;
  position: sticky;
  top: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
}
.detail-aside p {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 20px;
}
.detail-aside button {
  width: 100%;
  margin-bottom: 9px;
}
.detail-aside dl {
  font-size: 13px;
  margin: 16px 0;
}
.detail-aside dt {
  color: var(--muted);
  margin-top: 12px;
}
.detail-aside dd {
  margin: 3px 0;
  overflow-wrap: anywhere;
}
.stars {
  display: flex;
  gap: 6px;
  margin: 14px 0;
  flex-wrap: wrap;
}
.stars button {
  padding: 8px 10px;
  font-size: 20px;
  min-width: 44px;
  min-height: 44px;
}
.stars button[aria-pressed="true"] {
  background: var(--gold);
  color: var(--ink);
}
.settings-block {
  max-width: 780px;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 20px;
  margin-bottom: 20px;
}
.settings-block p {
  margin: 12px 0;
  color: var(--muted);
  line-height: 1.7;
}
.settings-block .field {
  margin-top: 20px;
}
.loading {
  padding: 50px;
  text-align: center;
  color: var(--muted);
}
.pagination {
  margin: 24px 0;
  display: flex;
  justify-content: center;
}
.locked {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 18px 22px;
  border-radius: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 26px;
}
.locked p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 5px;
}
.locked .button-row {
  margin-left: auto;
  flex-shrink: 0;
}
.back {
  margin-bottom: 20px;
}
.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 100;
  background: var(--surface);
  padding: 12px;
}
.skip:focus {
  top: 10px;
}
#bottom {
  display: none;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 13px 20px;
  border-radius: 14px;
  max-width: calc(100vw - 40px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  font-size: 14px;
}
#toast.show {
  opacity: 1;
}
#demo-banner {
  background: var(--gold);
  padding: 10px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--ink);
}
#demo-banner button {
  min-height: 32px;
  padding: 3px 9px;
  font-size: 12px;
  margin-left: 10px;
  background: var(--surface);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  background: var(--surface);
  color: var(--ink);
  max-width: 650px;
  width: calc(100% - 32px);
  max-height: 86dvh;
  overflow: auto;
}
dialog::backdrop {
  background: rgba(10, 30, 18, 0.55);
}
dialog h2 {
  padding-right: 46px;
  margin-bottom: 14px;
}
dialog .dialog-close {
  position: absolute;
  right: 16px;
  top: 16px;
}
dialog p {
  margin: 14px 0;
  line-height: 1.65;
}
dialog .guide {
  width: 100%;
  margin: 10px 0;
}
dialog img {
  max-width: 100%;
  max-height: 65dvh;
  object-fit: contain;
}
.file-preview {
  display: block;
  margin: auto;
}
.privacy-copy {
  white-space: pre-wrap;
}
.kbd {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 6px;
}
.mobile-hide {
  display: block;
}
@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  #header {
    padding: 20px 28px;
  }
  #main {
    padding: 30px 28px 60px;
  }
  .hero {
    grid-template-columns: 1fr 130px;
    padding: 26px;
  }
  .hero-art svg {
    width: 105px;
    height: 105px;
  }
  .thread-layout {
    grid-template-columns: 1fr;
  }
  .detail-aside {
    position: static;
  }
  .detail-aside .button-row {
    display: flex;
  }
  .detail-aside button {
    width: auto;
  }
  .detail-aside dl {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
  }
  .detail-aside dd {
    margin-top: 0;
  }
  .detail-aside .hint {
    margin: 0;
  }
  .stat {
    padding: 18px;
  }
}
@media (max-width: 720px) {
  .shell {
    display: block;
  }
  #sidebar {
    display: none;
  }
  #header {
    height: auto;
    min-height: 80px;
    padding: calc(16px + var(--safe-top)) 20px 16px;
    gap: 12px;
  }
  .header-title {
    display: none;
  }
  .mobile-brand {
    display: flex;
  }
  .brand {
    font-size: 16px;
    gap: 9px;
  }
  .brand img {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }
  .brand small {
    font-size: 11px;
  }
  .header-tools {
    gap: 4px;
  }
  .header-tools select {
    width: 76px;
    font-size: 14px;
    padding: 5px;
  }
  .header-tools button {
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
  }
  #main {
    padding: 26px 20px calc(112px + var(--safe-bottom));
    max-width: 650px;
  }
  h1 {
    font-size: 32px;
    letter-spacing: -0.9px;
  }
  .page-head {
    gap: 12px;
    margin-bottom: 22px;
  }
  .page-head .primary {
    padding: 12px;
  }
  .page-head p {
    font-size: 14px;
  }
  .hero {
    grid-template-columns: 1fr 72px;
    padding: 24px;
    gap: 12px;
    border-radius: 22px;
  }
  .hero h2 {
    font-size: 24px;
  }
  .hero p {
    font-size: 14px;
  }
  .hero-art {
    height: 100px;
  }
  .hero-art svg {
    width: 84px;
    height: 84px;
  }
  .hero-art:after {
    width: 26px;
    height: 26px;
    right: -7px;
    bottom: 9px;
    border-width: 6px;
  }
  .hero .button-row {
    margin-top: 18px;
  }
  .hero .primary {
    font-size: 14px;
    padding: 10px 12px;
  }
  .guide-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .guide {
    padding: 17px;
    min-height: 90px;
  }
  .section-head h2 {
    font-size: 21px;
  }
  .stat-strip {
    gap: 8px;
    margin-bottom: 22px;
  }
  .stat {
    padding: 14px 12px;
    border-left-width: 2px;
  }
  .stat strong {
    font-size: 26px;
  }
  .stat span {
    font-size: 11px;
  }
  .article {
    padding: 24px 20px;
  }
  .article h1 {
    font-size: 28px;
  }
  .ticket-row {
    padding: 17px;
    gap: 10px;
  }
  .ticket-main h3 {
    font-size: 17px;
  }
  .ticket-meta {
    flex-wrap: wrap;
    font-size: 12px;
  }
  .form-card {
    padding: 22px 18px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .form-footer {
    gap: 14px;
  }
  .form-footer .primary {
    width: 100%;
  }
  .message {
    max-width: 94%;
    min-width: 140px;
    padding: 14px 16px;
  }
  .composer {
    padding: 17px;
  }
  .composer .button-row {
    gap: 12px;
  }
  .composer .primary {
    width: 100%;
    order: 3;
  }
  .composer .field input {
    font-size: 13px;
  }
  .detail-aside {
    padding: 18px;
  }
  .locked {
    padding: 17px;
    display: block;
  }
  .locked .button-row {
    margin-top: 14px;
  }
  .settings-block {
    padding: 22px;
  }
  .metrics {
    font-size: 12px;
    gap: 12px;
  }
  #bottom {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 8px calc(8px + var(--safe-bottom));
    background: var(--surface);
    border-top: 1px solid var(--line);
    z-index: 40;
    justify-content: space-around;
    gap: 4px;
  }
  #bottom button {
    border: 0;
    background: transparent;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 3px;
    min-width: 0;
    font-size: 11px;
    min-height: 54px;
    color: var(--muted);
  }
  #bottom button[aria-current="page"] {
    background: var(--wash);
    color: var(--green);
    border-radius: 12px;
  }
  #bottom svg {
    width: 21px;
    height: 21px;
  }
  #toast {
    bottom: calc(90px + var(--safe-bottom));
    width: max-content;
    max-width: calc(100vw - 32px);
  }
  .back {
    margin-bottom: 14px;
  }
  .mobile-hide {
    display: none;
  }
  #demo-banner {
    font-size: 11px;
    padding: 8px;
  }
  .page-head .button-row {
    flex-shrink: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
