 :root {
  --ink: #2A2A2A;
  --text: #2A2A2A;
  --muted: #6E6E6E;
  --border: rgba(15, 23, 42, 0.10);
  --panel: rgba(255, 255, 255, 0.88);
  --mast-h: 56px;
  --accent: #4f46e5;
  --accent_bg: rgba(79, 70, 229, 0.10);
  --accent_border: rgba(79, 70, 229, 0.22);

  /* Spacing rhythm */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;

  /* Type scale */
  --fs-h1: 40px;
  --fs-h2: 24px;
  --fs-h3: 18px;
  --fs-body: 16px;
  --fs-meta: 13px;
 }

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  color: var(--text);
  background: radial-gradient(1000px 520px at 50% -10%, rgba(15, 23, 42, 0.035), transparent 60%), #ffffff;
}

::selection {
  background: rgba(79, 70, 229, 0.16);
}

a { color: inherit; text-decoration: none; }

.mast {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: var(--mast-h);
  padding: 0 16px;
  background: var(--panel);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.mast-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mast-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.mast-title {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: rgba(15, 23, 42, 0.84);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-shell {
  height: calc(100vh - var(--mast-h));
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(520px, 1.15fr);
}

.post-article {
  height: calc(100vh - var(--mast-h));
  overflow: auto;
  padding: var(--s-4) var(--s-3) calc(var(--s-4) + var(--s-2));
  display: flex;
  justify-content: center;
}

.post-article .prose {
  width: min(700px, 100%);
  padding-left: 64px;
}

.post-canvas {
  height: calc(100vh - var(--mast-h));
  border-left: 1px solid rgba(15, 23, 42, 0.08);
  background: radial-gradient(900px 520px at 50% 0%, rgba(15, 23, 42, 0.03), transparent 62%), rgba(15, 23, 42, 0.015);
}

.post-canvas-inner {
  position: sticky;
  top: var(--mast-h);
  height: calc(100vh - var(--mast-h));
  padding: var(--s-4);
}

.canvas-card {
  height: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.canvas-card-bar {
  height: 42px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88));
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, system-ui, sans-serif;
}

.canvas-card-title {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: rgba(42, 42, 42, 0.72);
}

.canvas-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.canvas-frame {
  flex: 1 1 auto;
  width: 100%;
}

.post-canvas .canvas-frame {
  width: 100%;
  border: 0;
  display: block;
  background: #ffffff;
}

.canvas-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px) saturate(160%);
}

.canvas-modal.open {
  display: flex;
}

.canvas-modal-inner {
  width: min(1200px, calc(100vw - 36px));
  height: min(820px, calc(100vh - 36px));
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.canvas-modal-bar {
  height: 48px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, system-ui, sans-serif;
}

.canvas-modal-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: rgba(42, 42, 42, 0.86);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.canvas-modal-iframe {
  flex: 1 1 auto;
  width: 100%;
  border: 0;
  display: block;
  background: #ffffff;
}

.mast-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, system-ui, sans-serif;
}

.mast-logo { width: 18px; height: 18px; display: block; }

.mast-name {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 14px;
}

.mast-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, system-ui, sans-serif;
  justify-content: flex-end;
}

.cta-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-right: 10px;
  margin-right: 8px;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 7px 14px;
  border-radius: 6px;
  border: none;
  background: #000;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.cta-btn:hover {
  background: #1a1a1a;
  transform: translateY(-0.5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cta-btn.primary {
  background: #000;
  color: #ffffff;
}

.cta-btn.primary:hover {
  background: #1a1a1a;
}

.google-mark {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.google-mark svg {
  display: block;
}

.action-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.action-link {
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(255, 255, 255, 0.82);
  color: rgba(42, 42, 42, 0.78);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
  white-space: nowrap;
}

.action-link:hover {
  background: rgba(15, 23, 42, 0.04);
  transform: translateY(-0.5px);
}


.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: rgba(15, 23, 42, 0.9);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.icon-btn:hover {
  background: rgba(15, 23, 42, 0.04);
  transform: translateY(-0.5px);
}

.icon-btn.icon-only {
  width: 34px;
  height: 34px;
  padding: 0;
  gap: 0;
  justify-content: center;
  border-radius: 6px;
  background: transparent;
  border-color: rgba(15, 23, 42, 0.10);
  color: rgba(15, 23, 42, 0.80);
}

.icon-btn.icon-only.primary {
  background: var(--accent_bg);
  border-color: var(--accent_border);
  color: var(--accent);
}

.icon-btn.icon-only:hover {
  background: rgba(15, 23, 42, 0.04);
}

.icon-btn.icon-only.primary:hover {
  background: rgba(79, 70, 229, 0.14);
  border-color: rgba(79, 70, 229, 0.28);
}

.remix-btn {
  border-radius: 999px;
  background: var(--accent_bg);
  border-color: var(--accent_border);
  color: var(--accent);
}

.remix-btn:hover {
  background: rgba(79, 70, 229, 0.14);
}

.icon-btn.icon-only:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.35);
  outline-offset: 2px;
}


.icon-btn[data-tip] {
  position: relative;
}

.icon-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  top: auto;
  bottom: -38px;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.94);
  color: rgba(15, 23, 42, 0.80);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.10);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
}

.icon-btn[data-tip]:hover::after,
.icon-btn[data-tip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.icon-btn[data-state="copied"]::after {
  content: "Copied";
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.icon-btn.primary {
  background: rgba(15, 23, 42, 0.94);
  border-color: rgba(15, 23, 42, 0.18);
  color: #ffffff;
}

.icon { display: inline-flex; align-items: center; justify-content: center; opacity: 0.9; }
.icon svg { display: block; }

.canvas-hero {
  width: 100%;
  height: min(74vh, 820px);
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.canvas-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #ffffff;
}

.hub {
  max-width: 1060px;
  margin: 0 auto;
  padding: 34px 18px 80px;
}

.article {
  display: flex;
  justify-content: center;
  padding: 34px 18px 80px;
}

.prose { width: min(720px, 100%); }

.kicker {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(42, 42, 42, 0.62);
  margin-bottom: 10px;
}

.prose h1 {
  margin: 0;
  font-size: var(--fs-h1);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.dek {
  margin: var(--s-2) 0 0;
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
}

.byline {
  margin-top: var(--s-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, system-ui, sans-serif;
}

.byline-author {
  font-size: 14px;
  font-weight: 750;
  color: rgba(42, 42, 42, 0.92);
}

.byline-meta {
  font-size: var(--fs-meta);
  color: var(--muted);
}

.meta-divider {
  margin-top: var(--s-3);
  height: 1px;
  background: rgba(15, 23, 42, 0.08);
}

.prose-section {
  margin-top: var(--s-4);
}

.prose-section h2 {
  margin: 0 0 var(--s-2);
  font-size: var(--fs-h2);
  letter-spacing: -0.02em;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, system-ui, sans-serif;
}

.prose-section h3 {
  margin: var(--s-3) 0 var(--s-2);
  font-size: var(--fs-h3);
  letter-spacing: -0.02em;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, system-ui, sans-serif;
}

.prose-section p {
  margin: var(--s-2) 0;
  font-size: var(--fs-body);
  line-height: 1.8;
  color: rgba(42, 42, 42, 0.96);
}

.prose a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(79, 70, 229, 0.25);
}

.prose a:hover {
  border-bottom-color: rgba(79, 70, 229, 0.55);
}

.prose-section ul,
.prose-section ol {
  margin: 0;
  padding-left: 20px;
  font-size: var(--fs-body);
  line-height: 1.85;
  color: rgba(42, 42, 42, 0.92);
}

.prose-section li + li { margin-top: 8px; }

.prose-section blockquote {
  margin: 18px 0;
  padding: 10px 14px;
  border-left: 3px solid rgba(15, 23, 42, 0.22);
  background: rgba(15, 23, 42, 0.03);
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(42, 42, 42, 0.78);
}

.cards {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, system-ui, sans-serif;
}

.card {
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover { transform: translateY(-2px); box-shadow: 0 22px 60px rgba(0, 0, 0, 0.10); }

.thumb { width: 100%; height: 150px; object-fit: cover; display: block; background: #fff; }

.card-body { padding: 14px; }

.card-title { font-weight: 900; letter-spacing: -0.02em; font-size: 14px; }

.card-desc { margin-top: 6px; color: rgba(15, 23, 42, 0.64); font-size: 13px; line-height: 1.5; }

@media (max-width: 980px) {
  .cards { grid-template-columns: 1fr; }
  .canvas-hero { height: 70vh; }
  .prose h1 { font-size: 34px; }

  .post-shell {
    height: auto;
    grid-template-columns: 1fr;
  }

  .post-article .prose {
    padding-left: 0;
  }

  .post-canvas {
    height: 70vh;
    border-left: 0;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
  }

  .post-canvas-inner {
    position: relative;
    top: 0;
    height: 100%;
  }

  .post-article {
    height: auto;
    overflow: visible;
    padding: 24px 18px 30px;
    justify-content: flex-start;
  }

  .mast {
    grid-template-columns: 1fr;
    height: auto;
    padding: 10px 12px;
    gap: 10px;
  }

  .mast-center {
    justify-content: flex-start;
  }

  .cta-group {
    border-right: 0;
    padding-right: 0;
    margin-right: 0;
  }
}
