:root {
  --ink: #17342c;
  --sub: #586d64;
  --green: #1c6953;
  --dark: #163f33;
  --lime: #d9f39a;
  --border: #dbe3db;
  --page: #f5f7f2;
  --white: #fff;
  --warm: #af6739;
  --purple: #695796;
  font:
    16px/1.55 'DM Sans',
    'PingFang SC',
    'Microsoft YaHei',
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--page);
}
* {
  box-sizing: border-box;
}
body,
h1,
h2,
h3,
p {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
}
button:hover,
a.btn:hover {
  border-color: #84a28f;
  background: #f0f5ed;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #bd923a;
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
.layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  height: 100dvh;
  position: sticky;
  top: 0;
  background: #fafbf7;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.65rem 1.05rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.27rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  margin: 0 0.4rem 2.5rem;
}
.brand img {
  width: 35px;
  height: 35px;
}
.navitem {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.78rem;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  color: #486057;
  font-size: 0.94rem;
  margin: 0.15rem 0;
  border: 0;
  background: transparent;
  text-align: left;
}
.navitem:hover {
  background: #eff3ed;
}
.navitem.current {
  background: #e4eedf;
  color: #1b4938;
  font-weight: 680;
}
.navitem img,
.iconbtn img,
.globalsearch img,
.btn img {
  width: 18px;
  height: 18px;
  opacity: 0.75;
}
.navitem small {
  margin-left: auto;
  font:
    12px/1.4 ui-monospace,
    monospace;
  color: #637468;
}
.navlabel {
  font-size: 0.78rem;
  color: #64766a;
  margin: 2rem 0.8rem 0.45rem;
}
.sidefoot {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.top {
  height: 66px;
  padding: 0 clamp(1.2rem, 4vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fcfdf9;
  border-bottom: 1px solid var(--border);
}
.crumb {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  font-size: 0.88rem;
  color: #5c6a60;
}
.crumb span {
  color: #99a69c;
}
.globalsearch {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #f1f4ee;
  border: 1px solid #dce3d8;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
}
.globalsearch input {
  width: 9.4rem;
  border: none;
  outline: none !important;
  background: transparent;
  font-size: 0.91rem;
}
.globalsearch kbd {
  font: 12px monospace;
  color: #647066;
  padding: 0.02rem 0.35rem;
  border: 1px solid #d4dcd1;
  border-radius: 3px;
}
.mobilemenu {
  display: none;
}
.main {
  min-width: 0;
}
main {
  max-width: 1490px;
  margin: auto;
  padding: clamp(1.4rem, 3.2vw, 3rem) clamp(1rem, 4vw, 4rem) 4rem;
}
h1 {
  line-height: 1.16;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  letter-spacing: -0.06em;
}
h2 {
  font-size: 1.28rem;
  line-height: 1.35;
  letter-spacing: -0.03em;
}
h3 {
  font-size: 1.04rem;
}
.muted,
small {
  color: var(--sub);
}
.hero {
  border-radius: 19px;
  padding: clamp(1.45rem, 3.2vw, 3rem);
  background: #153e32;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.7rem;
  color: #f3f8e9;
  min-height: 220px;
}
.hero:before {
  content: '';
  position: absolute;
  inset: 0 0 0 48%;
  background-image: radial-gradient(#9ccf9e61 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}
.herocopy,
.recipe {
  position: relative;
}
.herocopy p {
  margin: 0.65rem 0 1.25rem;
  color: #d2dfd0;
  font-size: 0.96rem;
}
.heroaction {
  display: inline-flex;
  align-items: center;
  background: var(--lime);
  color: #203b25;
  font-weight: 650;
  border-radius: 7px;
  padding: 0.46rem 0.9rem;
  font-size: 0.91rem;
}
.heroaction:hover {
  background: #eeffbc;
}
.recipe {
  min-width: 240px;
  border: 1px solid #729b7c70;
  background: #214c3b;
  border-radius: 12px;
  padding: 1rem;
  transform: rotate(-3deg);
  box-shadow: 9px 11px 0 #0f3329;
}
.recipe .expression {
  font:
    600 clamp(1.1rem, 2.5vw, 1.65rem)/1.45 ui-monospace,
    monospace;
  color: #d6eab2;
}
.recipe .expression b {
  color: #163b31;
  background: #dbefae;
  border-radius: 6px;
  padding: 0.18rem 0.4rem;
  font-weight: 650;
}
.recipe .expression b:nth-of-type(2) {
  background: #c5dfe7;
}
.recipe .expression b:nth-of-type(3) {
  background: #eedac5;
}
.recipe .sample {
  margin-top: 0.85rem;
  border-top: 1px solid #588368;
  padding-top: 0.5rem;
  font:
    14px/1.5 ui-monospace,
    monospace;
  color: #deecdc;
}
.sectionhead {
  margin: 1.75rem 0 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.sectionhead small {
  font-size: 0.8rem;
}
.group-0,
.tone0 {
  --tint: #e1efdf;
  --edge: #bfd5bd;
}
.group-1,
.tone1 {
  --tint: #e1eaf4;
  --edge: #bfd1e0;
}
.group-2,
.tone2 {
  --tint: #f4ead9;
  --edge: #e6d3b0;
}
.group-3,
.tone3 {
  --tint: #ebe4f3;
  --edge: #d9c8e8;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}
.toolcard {
  padding: 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}
.toolcard:hover {
  border-color: var(--edge);
  box-shadow: 0 5px 17px #163d2a0c;
  transform: translateY(-2px);
}
.ico {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--tint, #e5eddc);
}
.ico img {
  width: 20px;
  height: 20px;
  opacity: 0.78;
}
.toolcard strong {
  display: block;
  font-size: 0.97rem;
}
.toolcard p {
  color: var(--sub);
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0.22rem 0 0;
}
.headrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.headrow .ico {
  width: 54px;
  height: 54px;
  border-radius: 15px;
}
.headrow .ico img {
  width: 27px;
  height: 27px;
}
.headrow h1 {
  font-size: clamp(1.55rem, 3vw, 2.45rem);
}
.headrow p {
  font-size: 0.96rem;
  margin-top: 0.3rem;
}
.workgrid {
  display: grid;
  gap: 1rem;
}
.panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: white;
  padding: 1.15rem;
}
.panelhead,
.actions,
.tabline {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}
.panelhead {
  justify-content: space-between;
  margin-bottom: 0.95rem;
}
.panel h2 {
  font-size: 1.08rem;
}
.inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 0.7rem;
}
.field,
.option {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  font-size: 0.89rem;
  font-weight: 600;
}
.field textarea,
.option input:not([type='checkbox']),
.option select,
.selectbox {
  border: 1px solid #cbd6cb;
  border-radius: 7px;
  padding: 0.5rem 0.65rem;
  background: #fcfdf9;
  min-width: 0;
}
.field textarea {
  line-height: 1.6;
  resize: vertical;
  min-height: 135px;
  font:
    14px/1.6 'SFMono-Regular',
    Consolas,
    monospace;
  width: 100%;
}
.options {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  margin: 1rem 0;
}
.option {
  flex: 1 1 150px;
  max-width: 25rem;
}
.option.switch {
  flex: none;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}
.option input[type='checkbox'] {
  accent-color: var(--green);
}
.actions button,
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  border-radius: 7px;
}
.btn {
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.45rem 0.7rem;
}
.primary,
button.primary:hover {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}
.primary img {
  filter: invert(1);
  opacity: 1;
}
.right {
  margin-left: auto;
}
.fieldtools {
  display: flex;
  gap: 0.6rem;
}
.fieldtools button,
.quiet {
  font-size: 0.79rem;
  background: none;
  padding: 0.12rem 0.15rem;
  border: 0;
  color: var(--green);
}
.empty {
  padding: 1.5rem 1rem;
  text-align: center;
  background: #f7f9f4;
  border: 1px dashed #ccd8ca;
  border-radius: 9px;
  color: var(--sub);
}
.filebar {
  padding: 0.7rem 0.8rem;
  background: #f1f6ec;
  border-radius: 8px;
  margin-top: 0.7rem;
}
.filebar small {
  display: block;
  margin-top: 0.3rem;
  overflow-wrap: anywhere;
}
.status {
  color: var(--green);
  font-size: 0.89rem;
  margin: 0.55rem 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.error {
  color: #9d3e26;
}
.scroller {
  overflow: auto;
  max-height: 29rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 0.65rem 0;
}
.scroller table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font:
    14px/1.6 ui-monospace,
    Consolas,
    'Microsoft YaHei',
    monospace;
}
.scroller td,
.scroller th {
  border-bottom: 1px solid #e5ebe1;
  padding: 0.37rem 0.6rem;
  min-width: 4rem;
  max-width: 40rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.scroller th {
  background: #eff4eb;
  position: sticky;
  top: 0;
  z-index: 1;
}
.scroller .added {
  background: #eaf6e5;
}
.scroller .removed {
  background: #fceddf;
}
.outtext {
  font:
    14px/1.75 ui-monospace,
    Consolas,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 0.75rem;
  margin: 0;
}
.marks {
  max-height: 8rem;
  overflow: auto;
  background: #f9faf4;
}
.outsection canvas {
  max-width: 240px;
  display: block;
  width: 100%;
  height: auto;
}
.smallprint {
  font-size: 0.84rem;
  color: var(--sub);
}
dialog {
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 13px;
  width: min(32rem, 92vw);
  padding: 1.1rem;
  box-shadow: 0 16px 60px #15382c30;
  max-height: 85dvh;
}
dialog::backdrop {
  background: #10281e66;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}
.iconbtn {
  padding: 0.35rem;
  line-height: 0;
}
.dialoglist {
  display: grid;
  gap: 0.35rem;
  max-height: 45vh;
  overflow: auto;
  margin: 0.8rem 0;
}
.dialoglist label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-wrap: anywhere;
  border-bottom: 1px solid var(--border);
  padding: 0.35rem;
}
.dialoglist input {
  flex: none;
}
.dialoglist .subdir {
  font-size: 0.85rem;
}
#toast {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: #193e30;
  color: white;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  z-index: 10;
  max-width: 85vw;
}
.mobilemenu {
  display: none;
}
@media (max-width: 1140px) {
  .layout {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  .sidebar {
    padding-inline: 0.65rem;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .recipe {
    min-width: 200px;
  }
}
@media (max-width: 760px) {
  .layout {
    display: block;
  }
  .sidebar {
    display: none;
    position: fixed;
    z-index: 5;
    left: 0;
    top: 62px;
    height: calc(100dvh - 62px);
    width: 225px;
    box-shadow: 10px 0 25px #14362522;
  }
  .layout.menuopen .sidebar {
    display: flex;
  }
  .sidebar .brand {
    display: none;
  }
  .top {
    height: 62px;
    gap: 0.55rem;
    padding-inline: 1rem;
  }
  .mobilemenu {
    display: inline-flex;
  }
  .crumb {
    margin-right: auto;
  }
  .globalsearch input {
    width: 6.2rem;
  }
  .globalsearch kbd {
    display: none;
  }
  .hero {
    min-height: 175px;
  }
  .recipe {
    display: none;
  }
  .hero:before {
    inset: 0 0 0 70%;
  }
  .cards {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  }
  .headrow .ico {
    width: 45px;
    height: 45px;
    flex: none;
  }
  .panel {
    padding: 0.85rem;
  }
  .panelhead {
    align-items: flex-start;
  }
  .inputs {
    grid-template-columns: 1fr;
  }
  .field textarea {
    min-height: 95px;
  }
  .sectionhead {
    margin-top: 1.3rem;
  }
  .toolcard {
    padding: 0.8rem;
  }
  .read-controls {
    gap: 0.4rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .toolcard {
    transition: none;
  }
}

.scroller td.added {
  background: #e4f2de;
}
.scroller td.removed {
  background: #fae7db;
}
