.employment-tool {
    max-width: 52rem;
    margin: 2rem auto;
    padding: 0 1rem;
}
.employment-tool form {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
}
.employment-tool label {
    display: grid;
    gap: .35rem;
}
.employment-tool input,
.employment-tool select,
.employment-tool button {
    font: inherit;
    padding: .65rem;
    border: 1px solid var(--border-color, #94a3b8);
    border-radius: .45rem;
}
.employment-tool button {
    justify-self: start;
    background: #174ea6;
    color: white;
    cursor: pointer;
}
.employment-tool output {
    display: block;
    white-space: pre-line;
    font-weight: 600;
}
.employment-tool h2 {
    margin-top: 1.75rem;
}

body:has(.employment-tool) { background: #f3f5f0; color: #172e2b; }
.employment-tool { max-width: 68rem; margin: clamp(2rem,5vw,5rem) auto; line-height: 1.7; }
.employment-tool h1 { margin: .5em 0 .15em; color: #153f38; font-size: clamp(2rem,4.3vw,3.7rem); letter-spacing: -.045em; line-height: 1.18; }
.employment-tool > p { max-width: 56rem; }
.employment-tool .backlink { color: #38675b; text-decoration: none; font-weight: 650; }
.work-grid, .work-cards { display: grid; gap: 1.2rem; margin: 2rem 0; grid-template-columns: minmax(0, 1.6fr) minmax(0,1fr); align-items: start; }
.employment-tool form, .work-cards a { margin: 0; padding: clamp(1.25rem,3vw,2.25rem); background: #fff; border: 1px solid #ccd8cf; border-radius: 1.25rem; }
.employment-tool label { font-size: .95rem; font-weight: 600; }
.employment-tool input, .employment-tool select { width: 100%; min-width: 0; box-sizing: border-box; color: #203b35; background: #f8faf7; border-color: #abbeb2; }
.employment-tool button { background: #195545; border: 0; padding: .8rem 2rem; }
.employment-tool :focus-visible { outline: 3px solid #b48832; outline-offset: 2px; }
.work-result { position: sticky; top: 6rem; padding: 2rem; color: #f5fbef; background: #194c40; border-radius: 1.25rem; box-shadow: 0 12px 32px #123e2d14; }
.work-result h2 { margin: 0 0 1.2rem; color: inherit; }
.work-result output { color: inherit; font-variant-numeric: tabular-nums; }
.work-cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
.work-cards a { color: inherit; text-decoration: none; }
.work-cards a:hover { border-color: #297159; }
.work-cards h2 { margin: 0; color: #195545; }
.employment-tool [hidden] { display: none; }
@media (max-width: 750px) {
    .work-grid, .work-cards { grid-template-columns: 1fr; }
    .work-result { position: static; }
}

/* Employment tools share a compact navigation and a paper-like reading surface. */
body:has(.employment-tool) {
  --ink: #172b33;
  --muted: #50656a;
  --teal: #00695d;
  margin: 0; padding-top: 0; color: var(--ink);
  background: radial-gradient(ellipse at 78% 0%, #dcebe4 0, transparent 38rem), #f7f7f2;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.studio-head { background: #152e34; color: #fff; }
.studio-head > div { max-width: 70rem; margin: auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.studio-head a { color: #d6e4e0; text-decoration: none; }
.studio-brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 750; white-space: nowrap; }
.studio-brand b { background: #bde5ce; color: #123d36; border-radius: 9px; padding: .1rem .5rem; font: bold 1.35rem/1.35 Georgia,serif; }
.studio-head nav { display: flex; gap: .25rem; }
.studio-head nav a { padding: 1.15rem .9rem; border-bottom: 3px solid transparent; }
.studio-head nav a[aria-current], .studio-head nav a:hover { color: white; border-color: #a8dfbf; }
.employment-tool { max-width: 70rem; padding: 0 1.5rem; margin: clamp(2.5rem,5vw,5rem) auto; }
.employment-tool h1 { color: var(--ink); font-weight: 750; font-size: clamp(2.15rem,4.8vw,3.85rem); }
.employment-tool > h1 + p { margin: .9rem 0 2rem; color: var(--muted); }
.work-grid { grid-template-columns: minmax(0,1.55fr) minmax(18rem,1fr); gap: clamp(1rem,3vw,2rem); }
.employment-tool form, .work-cards a { border: 1px solid #d7e0da; box-shadow: 0 8px 32px #243f3710; border-radius: 20px; }
.employment-tool fieldset { margin: 0; padding: .9rem 0 1.2rem; border: 0; border-bottom: 1px solid #e1e8e3; min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.employment-tool legend { color: #16594c; font-size: 1.12rem; font-weight: 750; }
.employment-tool label { align-content: end; color: #334950; font-size: .91rem; }
.employment-tool input, .employment-tool select { height: 3rem; padding: 0 .75rem; border-radius: 9px; border: 1px solid #adbdb6; background: #fafbf8; font-size: 1rem; }
.employment-tool button { min-height: 46px; border-radius: 10px; background: var(--teal); color: white; font-weight: 650; }
.employment-tool button:hover { background: #00574e; }
.employment-tool button[type="reset"], .employment-tool #shanghai-base { background: #e7f1eb; color: #194f47; }
.work-result { top: 1.5rem; overflow: hidden; color: #fff; border-radius: 20px; background: radial-gradient(ellipse at top right,#25635d,transparent 72%),#172e37; padding: clamp(1.5rem,3vw,2.5rem); }
.work-result h2 { color: #c7e7d8; font-size: 1rem; margin: 0 0 1rem; }
.work-result output { position: relative; padding-top: 1rem; border-top: 1px solid #ffffff35; line-height: 1.85; }
.employment-tool .policy-note, .employment-tool > details { margin: .65rem 0; padding: 1rem 1.3rem; border: 1px solid #d7e0da; border-radius: 12px; background: #fff; }
.employment-tool summary { cursor: pointer; color: #244a43; font-weight: 650; }
.work-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
.work-cards a:first-child { background: #173e40; color: white; }
.work-cards a:first-child h2 { color: #c4e9d4; }
@media (max-width:750px) {
 .studio-head > div { flex-wrap: wrap; padding: .8rem 1rem 0; gap: .35rem; }
 .studio-head nav { width: 100%; justify-content: space-between; }
 .studio-head nav a { padding: .6rem .25rem; font-size: .9rem; }
 .employment-tool { padding: 0 1rem; }
 .work-grid,.work-cards { grid-template-columns: minmax(0,1fr); }
 .work-result { position: static; }
 .employment-tool fieldset { grid-template-columns: minmax(0,1fr); }
 .employment-tool button { width: 100%; }
}

.employment-tool, .employment-tool *, .studio-head * { box-sizing: border-box; }
.work-result { border-radius: 6px 6px 12px 12px; border-top: 6px solid #89b9a3; background: #193d40; }
.work-result::after { content: ""; display: block; margin-top: 1.6rem; border-bottom: 1px dashed #84ab9f; }
.work-result:focus { outline: 2px solid #448978; outline-offset: 4px; }
.work-result { scroll-margin-top: 1rem; }
.employment-tool fieldset > small { grid-column: 1 / -1; }
.salary-studio .tool-container { background: #fff; color: var(--ink); border: 1px solid #d7e0da; border-radius: 20px; padding: clamp(1rem,3vw,2.25rem); }
@media(max-width:750px) {
 .studio-head nav { overflow-x: auto; }
 .studio-head nav a { white-space: nowrap; }
 .salary-studio .calculator-grid { grid-template-columns: minmax(0,1fr); }
}
