﻿/* Shared styling for every ex-Cloud tutorial.
   One file so all twelve documents stay visually identical. */

:root {
  --ink: #1b1c1e;
  --muted: #5f6368;
  --line: #e3e5e8;
  --accent: #1b5fd9;
  --danger: #b3261e;
  --bg: #f6f7f9;
  --card: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.75;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 48px 24px 96px; }

.kicker {
  display: inline-block;
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
}

h1 { font-size: 34px; line-height: 1.3; margin: 8px 0 12px; }
h2 { font-size: 21px; margin: 0 0 12px; display: flex; align-items: center; }
h2.plain { display: block; margin-top: 40px; }

.lede { font-size: 17px; color: var(--muted); max-width: 720px; }
.meta { font-size: 13px; color: var(--muted); margin-top: 16px; }

/* Tabs back to the hub */
.hub {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}
.hub:hover { text-decoration: underline; }

section.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 28px 24px;
  margin: 24px 0;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}
section.step.flip { grid-template-columns: 300px 1fr; }
section.step.flip .text { order: 2; }
section.step.flip figure { order: 1; }

.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-right: 10px;
  flex: none;
}

.text p { margin: 0 0 12px; }
.text ul { margin: 0 0 12px; padding-left: 20px; }
.text li { margin: 4px 0; }

.tip {
  border-left: 3px solid var(--accent);
  background: #eef3fe;
  padding: 10px 14px;
  border-radius: 0 10px 10px 0;
  font-size: 14px;
  color: #1a3f7a;
  margin-top: 14px;
}
.warn {
  border-left: 3px solid var(--danger);
  background: #fdeceb;
  padding: 10px 14px;
  border-radius: 0 10px 10px 0;
  font-size: 14px;
  color: #7a1c16;
  margin-top: 14px;
}

figure { margin: 0; }
figure img {
  width: 100%;
  height: auto;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(20, 30, 60, .10);
  display: block;
}
figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 20px 0 8px;
}
.grid figure img { border-radius: 18px; }

table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }

footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
footer a { color: var(--accent); }

code { background: #eceff3; padding: 2px 6px; border-radius: 6px; font-size: .92em; }

@media (max-width: 760px) {
  section.step, section.step.flip { grid-template-columns: 1fr; }
  section.step.flip .text, section.step.flip figure { order: 0; }
  figure img { max-width: 320px; margin: 0 auto; }
}

@media print {
  body { background: #fff; }
  section.step { break-inside: avoid; box-shadow: none; }
  .hub { display: none; }
}
