:root {
  color-scheme: light;
  --srw-ink: #14313d;
  --srw-muted: #5c7681;
  --srw-line: #d5e2e7;
  --srw-line-soft: #e6eef1;
  --srw-bg: #eef3f5;
  --srw-card: #ffffff;
  --srw-teal: #0f646b;
  --srw-teal-deep: #0e3a48;
  --srw-teal-soft: #e7f3f4;
  --srw-danger: #a1392c;
  --srw-danger-soft: #fdf1ef;
  --srw-amber: #8a5a10;
  --srw-amber-soft: #fff8e8;
  --srw-ok: #17624b;
  --srw-ok-soft: #e7f5ef;
  --srw-radius: 14px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #e7eff1 0, var(--srw-bg) 220px), var(--srw-bg);
  color: var(--srw-ink);
  font:
    15px/1.65 "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans SC",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd {
  overflow-wrap: anywhere;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: var(--srw-teal);
}

:focus-visible {
  outline: 3px solid #1b9aa0;
  outline-offset: 2px;
}

.srw-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: 10px 16px;
  background: #fff;
  border-radius: 0 0 10px 0;
  font-weight: 700;
}

.srw-skip:focus {
  left: 0;
}

.srw-header {
  background: linear-gradient(135deg, var(--srw-teal-deep), #126169 78%, #177a78);
  color: #eaf6f7;
  padding: clamp(18px, 3.4vw, 30px) clamp(12px, 3.6vw, 38px);
  border-bottom: 4px solid #0b2c37;
}

.srw-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: flex-end;
  justify-content: space-between;
}

.srw-brand {
  min-width: 0;
  flex: 1 1 430px;
}

.srw-kicker {
  margin: 0 0 5px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #a7d6d9;
}

.srw-header h1 {
  margin: 0;
  font-size: clamp(26px, 3.5vw, 34px);
  line-height: 1.3;
}

.srw-subtitle {
  margin: 7px 0 0;
  font-size: 14px;
  color: #c6e3e5;
  max-width: 64ch;
}

.srw-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.srw-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 7px 14px;
  border: 1px solid #4d8e93;
  border-radius: 999px;
  color: #eaf6f7;
  text-decoration: none;
  font-size: 13.5px;
  background: rgba(9, 45, 55, 0.28);
}

.srw-nav a:hover {
  background: rgba(9, 45, 55, 0.55);
  border-color: #86c2c6;
}

.srw-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(14px, 2.4vw, 28px) clamp(12px, 3.6vw, 34px) 38px;
}

.srw-notice {
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid #e2c581;
  border-left: 5px solid #b57e17;
  border-radius: 10px;
  background: var(--srw-amber-soft);
  color: #5e4309;
  font-size: 13.5px;
}

.srw-card {
  margin-block: 16px;
  padding: clamp(14px, 2.2vw, 22px);
  background: var(--srw-card);
  border: 1px solid var(--srw-line);
  border-radius: var(--srw-radius);
  box-shadow: 0 1px 2px rgba(18, 48, 61, 0.05);
}

.srw-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  justify-content: space-between;
}

.srw-card h2 {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 21px);
  line-height: 1.35;
  color: #0d4550;
}

.srw-card h3 {
  margin: 0;
  font-size: 15px;
  color: #0d4550;
}

.srw-chip {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 3px 10px;
  border: 1px solid #c7dde1;
  border-radius: 999px;
  background: var(--srw-teal-soft);
  color: #14565c;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.srw-scope {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}

.srw-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.srw-field > label {
  font-weight: 600;
  font-size: 14px;
  color: #1d4650;
}

.srw-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.srw-field-wide {
  grid-column: 1 / -1;
}

.srw-fieldset {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--srw-line-soft);
  border-radius: 12px;
  background: #fcfeff;
}

.srw-fieldset legend {
  padding-inline: 8px;
  font-weight: 700;
  font-size: 14px;
  color: #0f4c56;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid #b6ccd3;
  border-radius: 9px;
  background: #fff;
  color: var(--srw-ink);
}

input[readonly] {
  background: #f1f5f7;
  color: #38525c;
  border-style: dashed;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

select:disabled,
input:disabled,
textarea:disabled {
  background: #f2f5f6;
  color: #6b818a;
}

.srw-meta {
  margin: 12px 0 0;
  padding: 9px 12px;
  border: 1px solid var(--srw-line-soft);
  border-radius: 10px;
  background: #f8fbfc;
  font-size: 13.5px;
  color: #2c4d58;
}

.srw-impact {
  margin: 0;
  padding: 9px 12px;
  border-left: 4px solid #9fc4cc;
  border-radius: 0 9px 9px 0;
  background: #f5fafb;
  color: #2c4d58;
  font-size: 13.5px;
}

.srw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.srw-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 17px;
  border: 1px solid #a9c2ca;
  border-radius: 9px;
  background: #fff;
  color: #16434e;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.srw-button:hover:not(:disabled) {
  background: #f1f8f9;
  border-color: #7ba8b2;
}

.srw-button:disabled {
  opacity: 0.55;
}

.srw-button-primary {
  border-color: #0f646b;
  background: var(--srw-teal);
  color: #fff;
}

.srw-button-primary:hover:not(:disabled) {
  background: #0b565c;
  border-color: #0b565c;
}

.srw-status {
  margin: 12px 0 0;
  padding: 10px 13px;
  border: 1px solid #cfe0e6;
  border-radius: 10px;
  background: #f4f9fb;
  color: #2c4d58;
  font-size: 13.5px;
}

.srw-status[data-tone="loading"] {
  border-color: #c6d8de;
  color: #3b5b66;
}

.srw-status[data-tone="ok"] {
  border-color: #b7ddcc;
  background: var(--srw-ok-soft);
  color: #14563f;
}

.srw-status[data-tone="warn"] {
  border-color: #e5cb93;
  background: var(--srw-amber-soft);
  color: #6b4a00;
}

.srw-status[data-tone="error"] {
  border-color: #e3b4ae;
  background: var(--srw-danger-soft);
  color: #7d241b;
}

.srw-hint {
  margin: 0;
  font-size: 12.5px;
  color: var(--srw-muted);
}

.srw-hint:empty {
  display: none;
}

.srw-empty {
  margin: 12px 0 0;
  padding: 14px;
  border: 1px dashed #cbdde2;
  border-radius: 10px;
  background: #fbfdfd;
  color: var(--srw-muted);
  font-size: 13.5px;
  text-align: center;
}

.srw-task-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.srw-task-list:empty {
  display: none;
}

.srw-task {
  display: grid;
  min-width: 0;
  width: 100%;
  gap: 5px;
  padding: 11px 13px;
  border: 1px solid var(--srw-line);
  border-radius: 11px;
  background: #fff;
  text-align: left;
}

.srw-task:hover {
  border-color: #9cbfc7;
  background: #f9fcfd;
}

.srw-task[aria-pressed="true"] {
  border-color: #2d858d;
  background: var(--srw-teal-soft);
  box-shadow: inset 4px 0 0 #2d858d;
}

.srw-task-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  justify-content: space-between;
}

.srw-task-id,
.srw-task-line > *,
.srw-detail-head strong,
.srw-workorder,
.srw-history-meta {
  min-width: 0;
  overflow-wrap: anywhere;
}

.srw-task-id {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace;
  font-size: 12.5px;
  color: #1d4b56;
}

.srw-task-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--srw-muted);
  font-size: 12.5px;
}

.srw-badge {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.srw-badge-ok {
  border-color: #bfe3d6;
  background: var(--srw-ok-soft);
  color: var(--srw-ok);
}

.srw-badge-warn {
  border-color: #e8d09c;
  background: var(--srw-amber-soft);
  color: #6b4a00;
}

.srw-badge-danger {
  border-color: #efc7c0;
  background: var(--srw-danger-soft);
  color: #8a2c1f;
}

.srw-badge-neutral {
  border-color: #d7e3e7;
  background: #eff4f6;
  color: #3d5a64;
}

.srw-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #cfe0e6;
  border-radius: 10px;
  background: #f5fafb;
}

.srw-detail-head strong {
  font-size: 14.5px;
  color: #0f4550;
}

.srw-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 9px;
  margin: 12px 0 0;
}

.srw-fact {
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--srw-line-soft);
  border-radius: 10px;
  background: #f8fbfc;
}

.srw-fact dt {
  font-size: 12px;
  color: var(--srw-muted);
}

.srw-fact dd {
  margin: 3px 0 0;
  font-size: 13.5px;
  font-weight: 600;
}

.srw-mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace;
  font-size: 12.3px;
  line-height: 1.5;
}

.srw-sub {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--srw-line-soft);
}

.srw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.srw-workorder {
  padding: 3px 9px;
  border: 1px solid #d7e3e7;
  border-radius: 7px;
  background: #f4f8f9;
  color: #355762;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12.3px;
}

.srw-history {
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.srw-history li {
  padding: 9px 11px;
  border-left: 4px solid #9fc4cc;
  border-radius: 0 9px 9px 0;
  background: #f6fafb;
  font-size: 13px;
  color: #2c4d58;
}

.srw-history-top {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  justify-content: space-between;
  font-weight: 600;
}

.srw-history-meta {
  margin-top: 3px;
  color: var(--srw-muted);
  font-size: 12.5px;
}

.srw-history p {
  margin: 4px 0 0;
}

.srw-action-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.authorized-document-picker {
  display: grid;
  gap: 6px;
  max-width: 100%;
  font-size: 12.5px;
  color: var(--srw-muted);
}

.srw-noscript {
  max-width: 900px;
  margin: 20px auto;
  padding: 12px 16px;
  border: 1px solid #e3b4ae;
  border-radius: 10px;
  background: var(--srw-danger-soft);
  color: #7d241b;
}

@media (max-width: 980px) {
  .srw-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .srw-scope {
    grid-template-columns: minmax(0, 1fr);
  }

  .srw-scope .srw-button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .srw-header-inner {
    align-items: flex-start;
  }

  .srw-nav {
    width: 100%;
  }

  .srw-nav a {
    flex: 1 1 150px;
  }

  .srw-actions {
    flex-direction: column;
  }

  .srw-actions .srw-button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 14.5px;
  }

  .srw-header {
    padding: 16px 12px 18px;
  }

  .srw-main {
    padding: 12px 9px 30px;
  }

  .srw-card {
    padding: 12px;
    border-radius: 12px;
  }

  .srw-fieldset {
    padding: 11px;
  }

  .srw-nav a {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
