:root {
  --page: #f6f7f2;
  --paper: #fff;
  --ink: #172e28;
  --muted: #4b625a;
  --green: #205344;
  --deep: #153d33;
  --lime: #d8eb9e;
  --line: #d6ded5;
  --focus: #368563;
  --danger: #9e3023;
  font-family: "DM Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
  line-height: 1.55;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
::selection { color: var(--deep); background: var(--lime); }
body { margin: 0; min-width: 0; }
h1, h2, p, dl, dd { margin: 0; }
a { color: inherit; text-underline-offset: .18em; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .68; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

.wrap { width: min(100% - 40px, 968px); margin-inline: auto; }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 750; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 6px); gap: 3px; background: var(--deep); padding: 7px; border-radius: 6px; }
.brand-mark i { width: 6px; height: 6px; background: var(--lime); border-radius: 1px; }
.brand-mark i:last-child { opacity: .55; }
.mini-button, .button, .secondary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 7px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 650;
}
.mini-button, .secondary-button { color: var(--green); background: var(--paper); border-color: var(--line); }
.button { color: var(--paper); background: var(--green); }
.mini-button:hover, .secondary-button:hover { background: #edf3e8; border-color: #b7ccbc; }
.button:hover { background: var(--deep); }
.share-icon { width: 12px; height: 11px; border: 1.5px solid currentColor; border-top: none; border-radius: 2px; position: relative; margin-top: 3px; }
.share-icon::before { content: ""; position: absolute; width: 5px; height: 5px; border-top: 1.5px solid; border-left: 1.5px solid; transform: rotate(45deg); top: -5px; left: 2px; }
.share-icon::after { content: ""; position: absolute; width: 1.5px; height: 9px; background: currentColor; left: 4px; top: -5px; }
.share-feedback { padding: 12px 16px; margin-top: 16px; color: var(--deep); background: #e8f0d7; border-radius: 8px; }

.home { padding-block: 46px 92px; }
.intro { min-height: 256px; position: relative; overflow: hidden; display: flex; align-items: center; padding: 48px; background: var(--deep); color: var(--paper); border-radius: 14px; }
.intro-main { position: relative; z-index: 1; }
.intro h1 { font-size: clamp(2.55rem, 6vw, 4.5rem); line-height: 1.12; letter-spacing: -.035em; font-weight: 800; }
.intro p { margin-top: 15px; color: #e2efd9; font-size: clamp(1rem, 2vw, 1.13rem); }
.intro-art { position: absolute; inset: 0 38px 0 auto; width: 290px; pointer-events: none; }
.art-paper { position: absolute; width: 122px; top: 49px; right: 109px; height: 156px; background: #b7cfaa; border-radius: 10px; transform: rotate(-13deg); display: grid; align-content: center; gap: 12px; padding: 25px; }
.art-paper i { height: 3px; background: var(--deep); border-radius: 3px; }
.art-paper i:nth-child(2n) { width: 69%; }
.art-keypad { position: absolute; right: 33px; top: 50px; width: 109px; height: 157px; padding: 15px; background: var(--lime); border-radius: 13px; transform: rotate(11deg); display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 42px repeat(2, 22px); gap: 7px; }
.art-keypad b { grid-column: 1 / -1; background: var(--deep); border-radius: 4px; }
.art-keypad i { border-radius: 4px; background: #8cab73; }
.art-keypad i:nth-last-child(1) { background: var(--deep); }
.tool-list { margin-top: 32px; border-top: 1px solid var(--line); }
.tool-link { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 22px 12px; border-bottom: 1px solid var(--line); text-decoration: none; }
.tool-link:hover { background: #eef2e9; }
.tool-icon { width: 45px; height: 45px; background: #e3ebd7; color: var(--deep); border-radius: 9px; }
.tool-icon.calc { display: grid; place-content: center; grid-template-columns: 6px 6px; gap: 4px; }
.tool-icon.calc i { width: 6px; height: 6px; border: 1.5px solid currentColor; border-radius: 1px; }
.tool-icon.rate { display: grid; place-items: center; font-size: 1.15rem; font-weight: 800; }
.tool-icon.text { display: grid; place-content: center; gap: 4px; }
.tool-icon.text i { width: 15px; height: 1.5px; background: currentColor; }
.tool-icon.text i:last-child { width: 9px; }
.tool-label { display: grid; gap: 4px; }
.tool-label strong { font-size: 1.19rem; }
.tool-label span { color: var(--muted); font-size: .95rem; }
.tool-arrow { color: var(--green); font-size: 1.42rem; }

.work { padding-block: 41px 88px; }
.back { display: inline-block; margin-bottom: 24px; color: var(--green); font-size: .92rem; font-weight: 650; text-decoration: none; }
.back:hover { text-decoration: underline; }
.work h1 { font-size: clamp(2rem, 5vw, 3.35rem); line-height: 1.2; letter-spacing: -.035em; }
.lede { margin-block: 12px 27px; color: var(--muted); }
.work-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 20px; align-items: start; }
.surface { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 26px; }
.fields { display: flex; flex-direction: column; gap: 9px; }
.fields label { font-weight: 700; }
.fields input + label { margin-top: 10px; }
input, textarea { width: 100%; border: 1px solid #aebeb3; border-radius: 6px; padding: 10px 12px; background: #fbfcf9; color: var(--ink); caret-color: var(--green); font-size: 1rem; }
textarea { resize: vertical; min-height: 160px; }
textarea::placeholder { color: #5b7068; }
input[aria-invalid="true"] { border-color: var(--danger); }
.field-note { color: var(--muted); font-size: .875rem; }
.fields .button { align-self: flex-start; margin-top: 7px; }
.error { color: var(--danger); margin-top: 8px; font-size: .92rem; }
.quote-total { padding: 26px; border-radius: 12px; background: var(--deep); color: var(--paper); }
.quote-total h2 { color: #e2efd9; font-size: 1rem; }
.quote-total output { display: block; margin-block: 10px 20px; font-size: clamp(1.55rem, 4.2vw, 2.8rem); line-height: 1.15; font-weight: 760; overflow-wrap: anywhere; }
.quote-details { display: grid; gap: 8px; border-top: 1px solid #537668; padding-top: 16px; color: #e2efd9; }
.quote-details div { display: flex; justify-content: space-between; gap: 12px; }
.quote-details dd { text-align: right; overflow-wrap: anywhere; }
.quote-total output, .quote-details dd, .stats dd, .fields input { font-variant-numeric: tabular-nums; }
.text-result h2 { font-size: 1.24rem; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-block: 15px 18px; }
.stats div { padding-top: 11px; border-top: 1px solid var(--line); }
.stats dt { color: var(--muted); font-size: .88rem; }
.stats dd { color: var(--deep); font-size: 1.75rem; font-weight: 730; }
.text-result button { margin-top: 12px; }
.result-surface { max-width: 570px; }
.result-surface .stats { margin-top: 0; margin-bottom: 20px; }

@media (max-width: 650px) {
  .wrap { width: calc(100% - 32px); }
  .topbar-inner { min-height: 60px; }
  .home { padding-block: 22px 55px; }
  .intro { min-height: 190px; padding: 26px 20px; }
  .intro h1 { font-size: 2.1rem; }
  .intro p { max-width: 10.5em; margin-top: 10px; }
  .intro-art { transform: scale(.57); transform-origin: center right; right: -11px; }
  .tool-list { margin-top: 22px; }
  .tool-link { padding: 18px 4px; gap: 12px; }
  .tool-icon { width: 40px; height: 40px; }
  .tool-label strong { font-size: 1.08rem; }
  .tool-label span { font-size: .875rem; }
  .work { padding-block: 26px 52px; }
  .work-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .surface, .quote-total { padding: 19px; }
}

@media (max-width: 360px) {
  .intro-art { transform: scale(.41); right: -15px; }
}
