/* Alibaba Cloud Workshops — shared visual system */
:root {
  --brand: #ff5a00;
  --brand-dark: #d94800;
  --brand-soft: #fff1e8;
  --blue: #1368ce;
  --blue-soft: #edf5ff;
  --ink: #171a1f;
  --ink-2: #3f4650;
  --muted: #66707d;
  --line: #d9dde3;
  --line-strong: #b8c0ca;
  --bg: #ffffff;
  --bg-soft: #f6f6f3;
  --bg-muted: #eeefec;
  --nav-bg: #ffffff;
  --nav-ink: #444b55;
  --link: #075fae;
  --info: #075fae;
  --info-bg: #f2f7fc;
  --warn: #805b00;
  --warn-bg: #fff9e8;
  --danger: #b4232d;
  --danger-bg: #fff4f4;
  --ok: #126b35;
  --ok-bg: #f0f8f3;
  --code-bg: #161b22;
  --code-ink: #e6edf3;
  --radius: 5px;
  --sidebar-w: 292px;
  --header-h: 64px;
  --content-w: 900px;
  --font: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  min-width: 320px;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #003f78; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(255, 90, 0, .28);
  outline-offset: 2px;
}
img, svg { max-width: 100%; }

/* Header */
.ws-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 32px;
  color: var(--ink);
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.ws-header .logo {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
}
.ws-header .logo-mark {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 800;
}
.ws-header nav {
  display: flex;
  align-self: stretch;
  gap: 28px;
  margin-left: auto;
}
.ws-header nav a {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--nav-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.ws-header nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
}
.ws-header nav a:hover,
.ws-header nav a.active { color: var(--ink); }
.ws-header nav a.active::after { background: var(--brand); }
.ws-menu-toggle {
  display: none;
  padding: 7px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Catalog hero */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background: #f1f0ec;
  border-bottom: 1px solid var(--line);
}
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: max(24px, calc((100vw - 1180px) / 2));
  width: 22%;
  height: 100%;
  border-right: 1px solid rgba(23, 26, 31, .08);
  border-left: 1px solid rgba(23, 26, 31, .08);
  transform: skewX(-16deg);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 32px 64px;
}
.hero-eyebrow,
.section-kicker {
  margin: 0 0 13px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  line-height: 1.3;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 650;
  letter-spacing: -.045em;
  line-height: 1.04;
}
.hero .hero-lead {
  max-width: 700px;
  margin: 22px 0 0;
  color: var(--ink-2);
  font-size: 19px;
  line-height: 1.6;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 0;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(23, 26, 31, .16);
  color: var(--muted);
  font-size: 13px;
}
.hero-meta span { padding: 0 24px; border-left: 1px solid var(--line-strong); }
.hero-meta span:first-child { padding-left: 0; border-left: 0; }
.hero-meta strong { color: var(--ink); font-weight: 700; }
.admin-hero .hero-inner { padding-top: 56px; padding-bottom: 50px; }
.admin-hero h1 { font-size: clamp(36px, 5vw, 54px); }

/* Catalog structure and controls */
.catalog {
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px 32px 80px;
}
.catalog-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 48px;
  align-items: end;
  margin-bottom: 30px;
}
.catalog-heading .section-kicker { margin-bottom: 8px; }
.catalog-heading h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.2;
}
.catalog-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.catalog-tools {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 210px 190px;
  gap: 10px;
  padding: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.catalog-tools input,
.catalog-tools select {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font: inherit;
  font-size: 14px;
}
.catalog-tools input::placeholder { color: #7a838e; }
.catalog-tools select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='m4 7 5 5 5-5' fill='none' stroke='%2316191f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px 18px;
  cursor: pointer;
}
.catalog-count {
  min-height: 22px;
  margin: 18px 0 10px;
  color: var(--muted);
  font-size: 13px;
}

/* Workshop and administration cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
  border-radius: var(--radius);
  transition: border-color .16s ease, transform .16s ease;
}
.card:hover { border-color: #a8b0ba; transform: translateY(-2px); }
.card:has(.card-banner.smc) { border-top-color: var(--brand); }
.card:has(.card-banner.dts) { border-top-color: var(--blue); }
.card-banner {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 63px;
  padding: 16px 22px 13px;
  color: var(--ink-2);
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
}
.card-banner.smc,
.card-banner.dts,
.card-banner.fac { background: #fff; }
.service-code {
  display: inline-flex;
  min-width: 42px;
  height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
}
.card-banner.dts .service-code { color: #0757a4; background: var(--blue-soft); }
.card-banner.fac .service-code { color: var(--ink-2); background: var(--bg-muted); }
.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px 22px 22px;
}
.card-body h3 {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -.018em;
  line-height: 1.35;
}
.card-body p {
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.65;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: auto 0 18px;
}
.tag {
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 12px;
  line-height: 1.6;
}
.tag + .tag::before { content: "·"; padding: 0 8px; color: #a3aab3; }
.tag.level { color: var(--brand-dark); background: transparent; border: 0; }
.card-actions { display: flex; gap: 10px; margin-top: auto; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 3px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { color: #fff; background: var(--brand-dark); border-color: var(--brand-dark); text-decoration: none; }
.btn.secondary { color: var(--ink); background: #fff; border-color: var(--line-strong); }
.btn.secondary:hover { color: var(--ink); background: var(--bg-soft); border-color: #8f98a4; }

/* Workshop layout */
.ws-layout { display: flex; min-height: calc(100vh - var(--header-h)); }
.ws-sidebar {
  position: sticky;
  top: var(--header-h);
  width: var(--sidebar-w);
  height: calc(100vh - var(--header-h));
  flex-shrink: 0;
  overflow-y: auto;
  padding: 28px 0 44px;
  background: var(--bg-soft);
  border-right: 1px solid var(--line);
}
.ws-sidebar .sb-title {
  padding: 0 24px 5px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.4;
}
.ws-sidebar .sb-sub { padding: 0 24px 20px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.ws-sidebar ol { margin: 0; padding: 0; list-style: none; }
.ws-sidebar li a {
  display: block;
  padding: 8px 24px;
  color: var(--ink-2);
  border-left: 3px solid transparent;
  font-size: 13px;
  line-height: 1.45;
  text-decoration: none;
}
.ws-sidebar li a:hover { color: var(--ink); background: #ebebe7; }
.ws-sidebar li a.active {
  color: var(--ink);
  background: #fff;
  border-left-color: var(--brand);
  font-weight: 700;
}
.ws-sidebar .sb-group {
  margin-top: 12px;
  padding: 12px 24px 6px;
  color: #818995;
  border-top: 1px solid var(--line);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.participant-box {
  margin: 0 16px 22px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 12px;
}
.participant-box label { display: block; margin-bottom: 7px; font-weight: 700; }
.participant-box .row { display: flex; gap: 6px; }
.participant-box input {
  flex: 1;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font: 13px var(--mono);
}
.participant-box button {
  padding: 7px 10px;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.participant-box button:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.participant-box .hint { margin-top: 8px; color: var(--muted); line-height: 1.45; }

.ws-content {
  flex: 1;
  min-width: 0;
  padding: 48px clamp(32px, 6vw, 80px) 96px;
}
.ws-content article { max-width: var(--content-w); }
.breadcrumb {
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .025em;
}
.ws-content h1 {
  max-width: 820px;
  margin: 0 0 16px;
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.12;
}
.ws-content h2 {
  position: relative;
  margin: 52px 0 14px;
  padding-top: 17px;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.ws-content h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: 3px;
  background: var(--brand);
}
.ws-content h3 { margin: 32px 0 9px; font-size: 19px; font-weight: 700; line-height: 1.4; }
.ws-content p,
.ws-content li { color: var(--ink-2); }
.ws-content p { max-width: 78ch; }
.ws-content ul,
.ws-content ol { padding-left: 24px; }
.ws-content li { margin: 6px 0; }
.ws-content strong { color: var(--ink); }
.lead { max-width: 760px; color: var(--ink-2); font-size: 18px; line-height: 1.65; }
.meta-row { display: flex; flex-wrap: wrap; gap: 0; margin: 18px 0 28px; }
.meta-row .tag { padding: 0; }

/* Numbered procedures */
ol.steps { margin-top: 18px; padding-left: 0; counter-reset: step; list-style: none; }
ol.steps > li {
  position: relative;
  min-height: 42px;
  margin: 0;
  padding: 1px 0 22px 48px;
  counter-increment: step;
}
ol.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: 0;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font: 700 11px var(--mono);
}
ol.steps > li::after {
  content: "";
  position: absolute;
  top: 37px;
  bottom: 5px;
  left: 15px;
  width: 1px;
  background: var(--line);
}
ol.steps > li:last-child::after { display: none; }

.ui {
  padding: 1px 5px;
  color: var(--ink);
  background: #f2f3f4;
  border: 1px solid #d6dae0;
  border-radius: 2px;
  font-size: .94em;
  font-weight: 650;
  white-space: nowrap;
}
kbd {
  padding: 1px 5px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  font: .84em var(--mono);
}
code {
  padding: 1px 5px;
  color: #a33a0d;
  background: #f3f3f1;
  border-radius: 2px;
  font: .89em var(--mono);
}

/* Code blocks */
.code-wrap { position: relative; margin: 16px 0 22px; }
pre {
  margin: 0;
  padding: 20px 20px;
  overflow-x: auto;
  color: var(--code-ink);
  background: var(--code-bg);
  border: 1px solid #2d333b;
  border-radius: 4px;
  font: 13px/1.65 var(--mono);
}
pre code { padding: 0; color: inherit; background: none; font-size: inherit; }
.copy-btn {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 4px 9px;
  color: #dbe1e7;
  background: #252b33;
  border: 1px solid #454d57;
  border-radius: 3px;
  font: 600 11px var(--font);
  cursor: pointer;
}
.copy-btn:hover { color: #fff; background: #343c46; }
.code-label { margin: 14px 0 -8px; color: var(--muted); font: 11px var(--mono); }

/* Editorial notes */
.callout {
  margin: 28px 0;
  padding: 2px 0 2px 18px;
  background: transparent;
  border: 0;
  border-left: 2px solid var(--info);
  border-radius: 0;
}
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
.callout .callout-title {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.callout p,
.callout li { font-size: 14px; }
.callout.warn { background: transparent; border-left-color: #b47a00; }
.callout.warn .callout-title { color: var(--ink); }
.callout.danger { background: transparent; border-left-color: var(--danger); }
.callout.danger .callout-title { color: var(--ink); }
.callout.ok { background: transparent; border-left-color: var(--ok); }
.callout.ok .callout-title { color: var(--ink); }
.admin-catalog > .callout { margin: 0 0 32px; }

/* Tables and diagrams */
.table-wrap { margin: 16px 0 24px; overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th,
td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { color: var(--ink); background: var(--bg-soft); font-size: 12px; font-weight: 800; letter-spacing: .025em; }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }
.diagram { margin: 20px 0 28px; padding: 22px; overflow-x: auto; background: #fafaf8; border: 1px solid var(--line); border-radius: 3px; }
.diagram svg { display: block; width: 100%; min-width: 560px; height: auto; }

/* Overview module lists */
.module-list { margin: 16px 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.module-list li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin: 0;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
}
.module-list .num { color: var(--brand-dark); font: 800 12px var(--mono); }
.module-list .dur { margin-left: 18px; color: var(--muted); font-size: 12px; white-space: nowrap; }
ul.checklist { padding-left: 0; list-style: none; }
ul.checklist li { position: relative; padding-left: 27px; }
ul.checklist li::before { content: "□"; position: absolute; top: 0; left: 2px; color: var(--muted); }

/* Previous / next navigation */
.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: var(--content-w);
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.pager a {
  display: block;
  padding: 14px 16px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.pager a:hover { background: var(--bg-soft); border-color: var(--line-strong); }
.pager .dir { display: block; margin-bottom: 2px; color: var(--muted); font-size: 11px; font-weight: 600; }
.pager .next { grid-column: 2; text-align: right; }
.ws-footer { padding: 24px 32px; color: var(--muted); background: #fff; border-top: 1px solid var(--line); font-size: 12px; text-align: center; }

/* Responsive */
@media (max-width: 1020px) {
  .ws-header { padding: 0 22px; }
  .ws-menu-toggle { display: inline-flex; }
  .ws-header nav { display: none; }
  .ws-sidebar {
    position: fixed;
    top: var(--header-h);
    bottom: 0;
    left: 0;
    z-index: 80;
    height: auto;
    box-shadow: 12px 0 28px rgba(23, 26, 31, .12);
    transform: translateX(-102%);
    transition: transform .2s ease;
  }
  body.sidebar-open .ws-sidebar { transform: translateX(0); }
  .ws-content { padding: 42px 32px 80px; }
}

@media (max-width: 760px) {
  .hero-inner { padding: 56px 22px 48px; }
  .hero::after { right: -15%; width: 45%; }
  .hero h1 { font-size: 42px; }
  .hero .hero-lead { font-size: 17px; }
  .hero-meta { gap: 10px; }
  .hero-meta span { width: 100%; padding: 0; border: 0; }
  .catalog { padding: 42px 22px 64px; }
  .catalog-heading { grid-template-columns: 1fr; gap: 12px; }
  .catalog-heading h2 { font-size: 27px; }
  .catalog-tools { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .ws-content { padding: 36px 22px 68px; }
  .ws-content h1 { font-size: 36px; }
  .ws-content h2 { margin-top: 44px; font-size: 23px; }
  .diagram svg { min-width: 500px; }
}

@media (max-width: 520px) {
  :root { --header-h: 58px; }
  .ws-header { gap: 10px; padding: 0 14px; }
  .ws-header .logo { gap: 8px; font-size: 14px; }
  .ws-header .logo-mark { width: 24px; height: 24px; }
  .ws-menu-toggle { padding: 6px 8px; font-size: 12px; }
  .hero-inner { padding: 46px 18px 42px; }
  .hero h1 { font-size: 36px; }
  .catalog { padding: 36px 18px 56px; }
  .catalog-heading h2 { font-size: 25px; }
  .catalog-tools { padding: 10px; }
  .card-body { padding: 21px 18px 20px; }
  .card-banner { padding-right: 18px; padding-left: 18px; }
  .ws-sidebar { width: min(88vw, var(--sidebar-w)); }
  .ws-content { padding: 30px 18px 60px; }
  .ws-content h1 { font-size: 31px; }
  .lead { font-size: 17px; }
  ol.steps > li { padding-left: 43px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  .module-list li { grid-template-columns: 32px minmax(0, 1fr); }
  .module-list .dur { grid-column: 2; margin: 0; }
  .ws-footer { padding-right: 18px; padding-left: 18px; }
}

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

@media print {
  .ws-header,
  .ws-sidebar,
  .pager,
  .copy-btn { display: none !important; }
  .ws-content { padding: 0; }
  .ws-content article { max-width: none; }
  a { color: inherit; text-decoration: none; }
  pre { white-space: pre-wrap; }
}
