:root {
  color-scheme: light;
  --ink: #202923;
  --muted: #69756d;
  --green: #286148;
  --green-dark: #1b4936;
  --green-light: #e1ebe3;
  --line: #d6ded7;
  --paper: #e9ede8;
  --surface: #f8faf7;
  --surface-soft: #edf1ec;
  --rust: #a94736;
  --font: "Aptos", "Segoe UI", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: .55;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #c7834d;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 38px;
  color: #f8faf7;
  background: var(--green-dark);
  border-bottom: 1px solid #163c2c;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -.6px;
  white-space: nowrap;
}

.brand-icon {
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 12px;
  background: #f1c676;
  transform: rotate(-4deg);
}

.brand-icon img {
  width: 23px;
  height: 23px;
  filter: brightness(0) saturate(100%) invert(18%) sepia(25%) saturate(1098%) hue-rotate(98deg) brightness(93%) contrast(91%);
}

.brand-note {
  max-width: 115px;
  margin-left: 5px;
  padding-left: 14px;
  color: #c7d6cb;
  border-left: 1px solid #557364;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.2px;
  line-height: 1.55;
  white-space: normal;
}

.account {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.account > span {
  max-width: 260px;
  overflow: hidden;
  color: #d3ded5;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  background: var(--green);
  box-shadow: 0 4px 12px #183c2b24;
}

.button.primary:hover {
  background: var(--green-dark);
  box-shadow: 0 6px 16px #183c2b30;
}

.button.primary img {
  filter: brightness(0) invert(1);
}

.button.secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: #c6d1c8;
}

.topbar .button.secondary {
  color: var(--ink);
  background: #f6f8f5;
  border-color: #e2e9e3;
}

.button.secondary:hover {
  background: #eaf0eb;
}

.button.danger {
  color: #fff;
  background: var(--rust);
}

.shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: calc(100vh - 82px);
}

.sidebar {
  display: flex;
  flex-direction: column;
  padding: 35px 18px;
  background: #dce3dc;
  border-right: 1px solid #cbd5cc;
}

.nav-label {
  margin-bottom: 15px;
  padding: 0 14px;
  color: #657267;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.nav-item,
.nav-future {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border-radius: 12px;
  font-size: 13px;
}

.nav-item img,
.nav-future img {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  opacity: .78;
  filter: brightness(0) saturate(100%) invert(29%) sepia(13%) saturate(1475%) hue-rotate(96deg) brightness(91%) contrast(88%);
}

.nav-item.active {
  color: var(--green-dark);
  background: #c8d9cc;
  font-weight: 700;
}

.nav-item > span {
  margin-left: auto;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.nav-future {
  align-items: flex-start;
  margin-top: 8px;
  color: #59665d;
}

.nav-future small {
  display: block;
  margin-top: 2px;
  color: #778379;
  font-size: 11px;
}

.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 70px 7px 0;
  color: #56665a;
  font-size: 11px;
}

.small-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  background: #c58b3d;
  border-radius: 50%;
}

main {
  width: 100%;
  max-width: 1370px;
  margin: auto;
  padding: 30px 46px 22px;
}

.breadcrumb {
  margin-bottom: 25px;
  color: #66736a;
  font-size: 12px;
}

.breadcrumb span {
  margin: 0 10px;
  color: #9aa69b;
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--green);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.5px;
}

h1 {
  font-size: 36px;
  font-weight: 720;
  letter-spacing: -1.1px;
  line-height: 1.2;
}

h1 > span {
  color: var(--green);
}

.subtitle {
  margin-top: 9px;
  color: var(--muted);
  font-size: 14px;
}

.workshop-banner {
  position: relative;
  height: 218px;
  overflow: hidden;
  isolation: isolate;
  background: #253a2d;
  border: 1px solid #344a3a;
  border-radius: 22px;
  box-shadow: 0 10px 26px #22392b20;
}

.workshop-banner > img {
  position: absolute;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 52%;
}

.workshop-banner::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #10271fe8, #10271f8a 46%, #10271f0a 100%);
  content: "";
}

.workshop-banner > div {
  padding: 30px 34px;
  color: #fff;
}

.banner-kicker {
  color: #d9e8d8;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 1.7px;
}

.workshop-banner h2 {
  margin-top: 12px;
  font-size: 31px;
  font-weight: 650;
  letter-spacing: -.5px;
  line-height: 1.2;
}

.banner-tag {
  position: absolute;
  right: 24px;
  bottom: 19px;
  padding: 7px 12px;
  color: #fff;
  background: #16281fc7;
  border: 1px solid #ffffff3d;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1.2px;
}

.inventory-summary {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 26px;
  padding: 22px 0;
  border-bottom: 1px solid #cbd5cc;
}

.inventory-summary > div:not(:last-child) {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.inventory-summary strong {
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.inventory-summary span {
  color: var(--muted);
  font-size: 12px;
}

.inventory-summary > div:nth-child(2) {
  padding-left: 28px;
  border-left: 1px solid #cbd5cc;
}

.inventory-summary .session-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  max-width: 290px;
  margin-left: auto;
  text-align: right;
}

.inventory-summary .badge {
  padding: 4px 10px;
  color: var(--green-dark);
  background: #d4e2d6;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.inventory-summary #mode-note {
  font-size: 11px;
}

.inventory-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.inventory-title h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.2px;
}

.inventory-title h2 span {
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--green-dark);
  background: transparent;
  border: 0;
  border-radius: 11px;
}

.icon-button img {
  width: 17px;
  height: 17px;
  opacity: .76;
  filter: brightness(0) saturate(100%) invert(29%) sepia(13%) saturate(1475%) hue-rotate(96deg) brightness(91%) contrast(88%);
}

.icon-button:hover {
  background: #dce7dd;
}

.filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 190px 160px;
  gap: 12px;
  margin-bottom: 22px;
}

.search {
  position: relative;
}

.search img {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 17px;
  height: 17px;
  opacity: .65;
  filter: brightness(0) saturate(100%) invert(39%) sepia(8%) saturate(564%) hue-rotate(91deg) brightness(91%) contrast(86%);
}

.search input {
  padding-left: 41px;
}

.filters input,
.filters select {
  width: 100%;
  height: 46px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #cbd5cc;
  border-radius: 12px;
  font-size: 13px;
}

.filters input {
  padding-right: 13px;
}

.filters select {
  padding: 0 12px;
}

.filters input:focus,
.filters select:focus,
form input:focus,
form select:focus,
form textarea:focus {
  border-color: var(--green);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.tool-card {
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid #d1dbd2;
  border-radius: 17px;
  box-shadow: 0 3px 10px #253b2a0c;
  animation: arrive .28s ease both;
  transition: transform .18s ease, box-shadow .18s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 22px #253b2a18;
}

.tool-visual {
  position: relative;
  height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dce8de;
}

.tool-card:nth-child(3n + 2) .tool-visual {
  background: #e1e7e5;
}

.tool-card:nth-child(3n) .tool-visual {
  background: #e9e3d6;
}

.tool-illustration {
  width: 78px;
  height: 78px;
  object-fit: contain;
  opacity: .76;
  filter: brightness(0) saturate(100%) invert(29%) sepia(13%) saturate(1475%) hue-rotate(96deg) brightness(91%) contrast(88%);
  transform: rotate(-12deg);
}

.sharing-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 9px;
  color: var(--green-dark);
  background: #f7faf5ed;
  border: 1px solid #cfdbd0;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
}

.sharing-badge.private {
  color: #59635b;
  background: #f4f5f2ed;
}

.tool-content {
  padding: 16px 17px 12px;
}

.tool-category {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.tool-content h3 {
  overflow-wrap: anywhere;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.tool-description {
  min-height: 40px;
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tool-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #e5ebe5;
}

.condition {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}

.condition::before {
  width: 7px;
  height: 7px;
  background: #5c966b;
  border-radius: 50%;
  content: "";
}

.tool-actions {
  display: flex;
  gap: 2px;
}

.tool-actions img {
  width: 15px;
  height: 15px;
}

.tool-actions .delete img {
  filter: brightness(0) saturate(100%) invert(34%) sepia(37%) saturate(1457%) hue-rotate(326deg) brightness(89%) contrast(88%);
}

.tool-actions .delete:hover {
  background: #f6e3de;
}

.empty-state {
  padding: 55px 15px;
  color: var(--muted);
  text-align: center;
}

.empty-state img {
  margin: 0 auto 15px;
  opacity: .56;
}

.empty-state h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 19px;
}

.empty-state p {
  font-size: 14px;
}

.notice {
  margin-bottom: 20px;
  padding: 12px 15px;
  overflow-wrap: anywhere;
  background: #e0ebe1;
  border-left: 4px solid var(--green);
  border-radius: 0 10px 10px 0;
  font-size: 13px;
}

.notice.error {
  background: #f7e9e5;
  border-color: var(--rust);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 35px;
  padding-top: 18px;
  color: #68746b;
  border-top: 1px solid #cbd5cc;
  font-size: 11px;
}

dialog {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 28px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #cbd5cc;
  border-radius: 20px;
  box-shadow: 0 22px 80px #12241c38;
}

dialog::backdrop {
  background: #142b2280;
  backdrop-filter: blur(3px);
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 23px;
}

dialog h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

form > label,
.form-row label {
  display: block;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 650;
}

form input:not([type="checkbox"]),
form select,
form textarea {
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd5cc;
  border-radius: 10px;
}

form input:not([type="checkbox"]),
form select {
  min-height: 44px;
}

form textarea {
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
}

.checkbox-label input {
  margin-top: 4px;
  accent-color: var(--green);
}

.checkbox-label small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.form-error {
  margin: 10px 0;
  color: #942f25;
  font-size: 13px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

#delete-form > p {
  margin-top: 12px;
}

#delete-description {
  overflow-wrap: anywhere;
  font-weight: 650;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 1600px) {
  main {
    padding-top: 35px;
  }

  .workshop-banner {
    height: 235px;
  }

  .tool-visual {
    height: 170px;
  }
}

@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 195px minmax(0, 1fr);
  }

  main {
    padding: 26px;
  }

  .sidebar {
    padding: 30px 10px;
  }

  .tool-grid {
    gap: 13px;
  }

  .tool-content {
    padding: 14px 13px 9px;
  }

  .inventory-summary {
    gap: 18px;
  }

  .inventory-summary > div:nth-child(2) {
    padding-left: 18px;
  }

  .inventory-summary > div:not(:last-child) {
    flex-direction: column;
    gap: 5px;
  }

  .filters {
    grid-template-columns: minmax(100px, 1fr) 155px 135px;
  }

  .brand-note {
    display: none;
  }
}

@media (max-width: 850px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    min-height: 72px;
    padding: 10px 24px;
  }

  main {
    max-width: 850px;
    padding: 24px;
  }

  .breadcrumb {
    margin-bottom: 22px;
  }

  h1 {
    font-size: 32px;
  }

  .workshop-banner {
    height: 190px;
  }
}

@media (max-width: 520px) {
  .topbar {
    min-height: 68px;
    gap: 10px;
    padding: 9px 17px;
  }

  .brand {
    gap: 9px;
    font-size: 20px;
  }

  .brand-icon {
    padding: 8px;
  }

  .account {
    gap: 8px;
  }

  .account > span {
    display: none;
  }

  .account .button {
    min-height: 38px;
    padding: 8px 11px;
    font-size: 12px;
  }

  .account .button img {
    width: 15px;
    height: 15px;
  }

  main {
    padding: 21px 17px;
  }

  .breadcrumb {
    margin-bottom: 19px;
    font-size: 11px;
  }

  .page-heading {
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 21px;
  }

  h1 {
    font-size: 29px;
  }

  .subtitle {
    font-size: 13px;
  }

  .page-heading > .button {
    width: 100%;
  }

  .workshop-banner {
    height: 176px;
    border-radius: 17px;
  }

  .workshop-banner > div {
    padding: 22px;
  }

  .workshop-banner h2 {
    font-size: 25px;
  }

  .banner-kicker {
    font-size: 9px;
  }

  .banner-tag {
    display: none;
  }

  .inventory-summary {
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 22px;
    padding: 19px 0;
  }

  .inventory-summary strong {
    font-size: 24px;
  }

  .inventory-summary .session-status {
    flex-basis: 100%;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    max-width: none;
    text-align: left;
  }

  .inventory-summary #mode-note {
    font-size: 10px;
  }

  .filters {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .search {
    grid-column: 1 / -1;
  }

  .filters select {
    padding: 10px 8px;
    font-size: 11px;
  }

  .tool-grid {
    gap: 11px;
  }

  .tool-visual {
    height: 120px;
  }

  .tool-illustration {
    width: 60px;
    height: 60px;
  }

  .tool-content {
    padding: 13px 11px 8px;
  }

  .tool-content h3 {
    font-size: 14px;
  }

  .tool-category {
    font-size: 8px;
  }

  .tool-description {
    font-size: 10px;
  }

  .tool-bottom {
    flex-wrap: wrap;
    gap: 2px;
    margin-top: 9px;
  }

  .tool-actions {
    margin-left: auto;
  }

  .tool-actions .icon-button {
    width: 32px;
    height: 32px;
  }

  .sharing-badge {
    top: 9px;
    left: 9px;
    padding: 3px 6px;
    font-size: 8px;
  }

  .condition {
    font-size: 9px;
  }

  footer {
    flex-direction: column;
    gap: 5px;
    font-size: 10px;
  }

  dialog {
    padding: 21px;
    border-radius: 17px;
  }

  .form-row {
    gap: 12px;
  }

  .dialog-actions .button {
    padding: 10px 12px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
