/* Article pages (Learning workspace) — a calm reading view in the editor's dark theme. */
:root {
  color-scheme: dark;
  --bg: #151515;
  --panel: #1d1d1d;
  --line: #2c2c2c;
  --text: #d9d9d9;
  --text-hi: #f4f4f4;
  --text-2: #a3a3a3;
  --text-3: #707070;
  --accent: #2d8ceb;
  --accent-2: #4b9cf5;
  --brand: #ff8a3d;
  --brand-2: #ffb36b;
  --sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 18px/1.7 var(--serif); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-2); }
a:hover { color: #7db8ff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.ar-bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  height: 46px; padding: 0 16px; background: rgba(21, 21, 21, .92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid #0b0b0b; font: 500 14px/1 var(--sans);
}
.ar-logo {
  width: 26px; height: 26px; border-radius: 5px; display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, #2a1608, #120a04); box-shadow: inset 0 0 0 1.5px var(--brand);
  color: var(--brand); font-weight: 800; font-size: 12px; text-decoration: none;
}
.ar-back { color: var(--text-hi); text-decoration: none; padding: 6px 8px; border-radius: 4px; }
.ar-back:hover { background: #2a2a2a; color: var(--text-hi); }
.ar-path { flex: 1; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.ar-cta { background: var(--accent); color: #fff; text-decoration: none; padding: 6px 14px; border-radius: 14px; font-weight: 600; }
.ar-cta:hover { background: var(--accent-2); color: #fff; }

.ar { max-width: 740px; margin: 0 auto; padding: 40px 16px 24px; }
.ar-kicker { font: 600 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--brand-2); }
h1 { font: 800 clamp(30px, 6vw, 46px)/1.08 var(--sans); color: var(--text-hi); letter-spacing: -.02em; margin: 12px 0 10px; text-wrap: balance; }
.ar-by { font: 400 15px/1.4 var(--sans); color: var(--text-3); margin-bottom: 32px; }

.ar-body h2, .ar-body h3, .ar-body h4 { font-family: var(--sans); color: var(--text-hi); line-height: 1.25; margin: 2em 0 .6em; }
.ar-body h2 { font-size: 28px; }
.ar-body h3 { font-size: 22px; }
.ar-body p { margin: 0 0 1.15em; }
.ar-body strong, .ar-body b { color: var(--text-hi); }
.ar-body ul, .ar-body ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.ar-body li { margin: .35em 0; }
.ar-body img { display: block; max-width: 100%; height: auto; margin: 1.6em auto; border-radius: 4px; }
.ar-body h2 img, .ar-body h3 img { margin: 0 auto; }
.ar-body blockquote { margin: 1.5em 0; padding: .2em 0 .2em 1.1em; border-left: 3px solid var(--brand); color: var(--text-hi); font-style: italic; }
.ar-body .center { text-align: center; }
.ar-embed { position: relative; aspect-ratio: 16 / 9; margin: 1.6em 0; background: #000; border-radius: 4px; overflow: hidden; }
.ar-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.ar-next {
  display: flex; flex-direction: column; gap: 4px; margin: 48px 0 32px; padding: 18px 20px; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--line); text-decoration: none; font-family: var(--sans);
}
.ar-next span { color: var(--text-3); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.ar-next b { color: var(--text-hi); font-size: 20px; }
.ar-next:hover { border-color: var(--accent); }
.ar-more h2 { font: 600 13px/1 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); margin: 0 0 12px; }
.ar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ar-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; font-family: var(--sans); }
.ar-card:hover { border-color: #444; }
.ar-card .t { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-2); font-weight: 600; }
.ar-card b { color: var(--text-hi); font-size: 15px; line-height: 1.3; font-weight: 600; }
.ar-foot { text-align: center; padding: 32px 16px 40px; color: var(--text-3); font: 400 14px/1.5 var(--sans); }
.ar-foot a { color: var(--text-2); }

@media (max-width: 600px) {
  body { font-size: 17px; }
  .ar-path { display: none; }
  .ar-bar { justify-content: space-between; }
  .ar { padding-top: 28px; }
}

/* shown inside the portfolio's Learning reader */
.embedded .ar-bar, .embedded .ar-foot { display: none; }
.embedded .ar { padding-top: 28px; }
