/*
 * Application styles (formerly sourced through tailwindcss-rails).
 * Tailwind has been removed; this file now contains the app's CSS directly.
 */

@layer base {
  *, *::before, *::after {
    box-sizing: border-box;
  }

  html {
    -webkit-text-size-adjust: 100%;
    line-height: 1.5;
    tab-size: 4;
  }

  body,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  figure,
  blockquote,
  dl,
  dd {
    margin: 0;
  }

  ul,
  ol,
  menu {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  img,
  picture,
  video,
  canvas,
  svg {
    display: block;
    height: auto;
    max-width: 100%;
  }

  button,
  input,
  select,
  textarea {
    color: inherit;
    font: inherit;
  }

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

  table {
    border-collapse: collapse;
    border-color: inherit;
  }
}

@layer base {
  :root {
    --iaw-font-sans: "Segoe UI Variable", "Avenir Next", "SF Pro Text", ui-sans-serif, system-ui, sans-serif;
    --iaw-font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", ui-serif, serif;

    --iaw-canvas: oklch(98.6% 0.006 248);
    --iaw-canvas-alt: oklch(96.7% 0.012 248);
    --iaw-panel: oklch(99.2% 0.002 260);
    --iaw-panel-soft: oklch(97.7% 0.007 247);
    --iaw-ink: oklch(25.5% 0.028 258);
    --iaw-ink-soft: oklch(38% 0.022 257);
    --iaw-ink-muted: oklch(54% 0.02 257);
    --iaw-border: oklch(89.5% 0.012 252);
    --iaw-border-strong: oklch(79.5% 0.018 252);
    --iaw-accent: oklch(55.5% 0.14 253);
    --iaw-accent-strong: oklch(47% 0.12 254);
    --iaw-accent-soft: oklch(95.5% 0.03 252);
    --iaw-positive: oklch(56% 0.14 148);
    --iaw-positive-soft: oklch(96.8% 0.03 152);
    --iaw-warning: oklch(63% 0.13 72);
    --iaw-warning-soft: oklch(97.2% 0.028 86);
    --iaw-danger: oklch(58% 0.17 27);
    --iaw-danger-soft: oklch(96.9% 0.02 18);
    --iaw-danger-strong: oklch(45% 0.14 27);

    --iaw-radius-sm: 0.55rem;
    --iaw-radius: 0.95rem;
    --iaw-radius-lg: 1.35rem;
    --iaw-pill: 999px;

    --iaw-shadow-soft: 0 1px 2px oklch(19% 0.02 255 / 0.05),
      0 10px 24px -18px oklch(19% 0.02 255 / 0.25);
    --iaw-shadow: 0 1px 2px oklch(19% 0.02 255 / 0.06),
      0 12px 36px -20px oklch(19% 0.02 255 / 0.28);
    --iaw-shadow-strong: 0 1px 2px oklch(19% 0.02 255 / 0.08),
      0 18px 45px -20px oklch(19% 0.02 255 / 0.32);

    --iaw-ring: 2px solid oklch(62% 0.15 253 / 0.85);
  }

  html {
    background: var(--iaw-canvas);
  }

  body {
    color: var(--iaw-ink);
    font-family: var(--iaw-font-sans);
    line-height: 1.45;
    text-rendering: optimizeLegibility;
  }

  h1,
  h2,
  h3,
  h4 {
    color: var(--iaw-ink);
    letter-spacing: -0.02em;
  }

  a {
    transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease;
  }

  :where(a, button, input, select, textarea):focus-visible {
    outline: var(--iaw-ring);
    outline-offset: 2px;
  }

  :where(input, select, textarea) {
    accent-color: var(--iaw-accent);
  }

  ::selection {
    background: oklch(89.5% 0.045 250);
  }
}

@layer components {
  .iaw-shell {
    background:
      radial-gradient(60rem 26rem at 12% -12%, oklch(95.8% 0.04 248 / 0.9), transparent 62%),
      radial-gradient(42rem 22rem at 86% -8%, oklch(97.2% 0.03 90 / 0.55), transparent 68%),
      linear-gradient(to bottom, oklch(99.3% 0.003 255), var(--iaw-canvas));
    color: var(--iaw-ink);
    min-height: 100vh;
  }

  .iaw-shell--admin {
    background:
      radial-gradient(52rem 24rem at 8% -12%, oklch(95.3% 0.035 248 / 0.85), transparent 60%),
      radial-gradient(34rem 18rem at 92% -8%, oklch(95.9% 0.04 145 / 0.35), transparent 64%),
      linear-gradient(to bottom, oklch(99.1% 0.004 255), var(--iaw-canvas));
  }

  .iaw-shell--public {
    background:
      radial-gradient(62rem 28rem at 14% -12%, oklch(95.8% 0.04 248 / 0.9), transparent 62%),
      radial-gradient(38rem 18rem at 90% -10%, oklch(96.3% 0.05 75 / 0.38), transparent 66%),
      linear-gradient(to bottom, oklch(99.3% 0.003 255), var(--iaw-canvas));
  }

  .iaw-header {
    backdrop-filter: blur(10px);
    background: oklch(99.1% 0.003 255 / 0.72);
    border-bottom: 1px solid oklch(90% 0.01 252 / 0.7);
    position: sticky;
    top: 0;
    z-index: 30;
  }

  .iaw-header-inner {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 74rem;
    padding: 0.9rem 1rem;
    width: 100%;
  }

  .iaw-header-brand {
    align-items: center;
    color: var(--iaw-ink);
    display: inline-flex;
    font-weight: 700;
    gap: 0.55rem;
    letter-spacing: -0.02em;
    min-width: 0;
  }

  .iaw-header-brand:hover {
    color: var(--iaw-accent-strong);
  }

  .iaw-header-brand-mark {
    align-items: center;
    background: linear-gradient(180deg, oklch(99% 0.004 260), oklch(96.7% 0.012 250));
    border: 1px solid var(--iaw-border);
    border-radius: 0.7rem;
    box-shadow: var(--iaw-shadow-soft);
    color: var(--iaw-accent);
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 800;
    height: 1.85rem;
    justify-content: center;
    width: 1.85rem;
  }

  .iaw-header-brand-mark--avatar {
    overflow: hidden;
    padding: 0;
  }

  .iaw-header-brand-mark__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
  }

  .iaw-header-brand-text {
    display: inline-flex;
    flex-direction: column;
    gap: 0.02rem;
    line-height: 1.05;
  }

  .iaw-header-brand-label {
    font-size: 1rem;
    font-weight: 700;
  }

  .iaw-header-brand-subtle {
    color: var(--iaw-ink-muted);
    font-size: 0.69rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }

  .iaw-nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
  }

  .iaw-nav-link {
    border: 1px solid transparent;
    border-radius: var(--iaw-pill);
    color: var(--iaw-ink-soft);
    display: inline-flex;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.55rem 0.75rem;
    text-decoration: none;
  }

  .iaw-nav-link:hover {
    background: oklch(97.6% 0.01 252);
    border-color: oklch(91% 0.01 252);
    color: var(--iaw-ink);
  }

  .iaw-nav-link--active {
    background: var(--iaw-panel);
    border-color: var(--iaw-border);
    box-shadow: var(--iaw-shadow-soft);
    color: var(--iaw-ink);
  }

  .iaw-main {
    margin: 0 auto;
    max-width: 74rem;
    padding: 1.25rem 1rem 2rem;
    width: 100%;
  }

  .iaw-main--public {
    max-width: 70rem;
    padding-top: 1.6rem;
  }

  .iaw-main--admin {
    max-width: 94rem;
    padding-top: 1.1rem;
  }

  .iaw-admin-layout {
    display: flex;
    min-height: 100vh;
  }

  .iaw-admin-sidebar-frame {
    border-right: 1px solid oklch(89% 0.012 252 / 0.9);
    display: none;
    padding: 0.9rem;
    width: 18rem;
  }

  .iaw-admin-main-column {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
  }

  .iaw-admin-mobile-header {
    background: oklch(99% 0.003 255 / 0.78);
    border-bottom: 1px solid oklch(90% 0.01 252 / 0.7);
    display: block;
    padding: 0.9rem 1rem;
  }

  .iaw-admin-mobile-header-inner {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 94rem;
  }

  .iaw-admin-mobile-header a:first-child {
    color: var(--iaw-ink);
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  .iaw-admin-mobile-header a:last-child {
    color: var(--iaw-ink-muted);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
  }

  .iaw-admin-mobile-header a:last-child:hover {
    color: var(--iaw-accent-strong);
  }

  .iaw-sidebar {
    background: oklch(99.1% 0.003 255 / 0.72);
    border: 1px solid oklch(90% 0.01 252 / 0.85);
    border-radius: 1.15rem;
    box-shadow: var(--iaw-shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: calc(100vh - 1.8rem);
    padding: 0.9rem;
    position: sticky;
    top: 0.9rem;
  }

  .iaw-sidebar-main {
    min-height: 0;
    overflow: auto;
  }

  .iaw-sidebar-brand {
    align-items: center;
    color: var(--iaw-ink);
    display: inline-flex;
    gap: 0.65rem;
    margin-bottom: 0.25rem;
    text-decoration: none;
  }

  .iaw-sidebar-brand:hover {
    color: var(--iaw-accent-strong);
  }

  .iaw-sidebar-brand-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
  }

  .iaw-sidebar-brand-subtitle {
    color: var(--iaw-ink-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.1;
    margin-top: 0.08rem;
    text-transform: uppercase;
  }

  .iaw-sidebar-section-title {
    color: var(--iaw-ink-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin: 1rem 0 0.45rem;
    text-transform: uppercase;
  }

  .iaw-sidebar-nav {
    display: grid;
    gap: 0.25rem;
  }

  .iaw-sidebar-link {
    border: 1px solid transparent;
    border-radius: 0.8rem;
    color: var(--iaw-ink-soft);
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.55rem 0.7rem;
    text-decoration: none;
  }

  .iaw-sidebar-link:hover {
    background: oklch(97.6% 0.01 252);
    border-color: oklch(91% 0.01 252);
    color: var(--iaw-ink);
  }

  .iaw-sidebar-link--active {
    background: linear-gradient(180deg, oklch(99.4% 0.002 255), oklch(97.6% 0.007 252));
    border-color: var(--iaw-border);
    box-shadow: var(--iaw-shadow-soft);
    color: var(--iaw-ink);
  }

  .iaw-sidebar-footer {
    border-top: 1px solid oklch(90% 0.01 252 / 0.9);
    margin-top: auto;
    padding-top: 0.85rem;
  }

  .iaw-sidebar-footer-links {
    margin-top: 0.45rem;
  }

  .iaw-sidebar-user-name {
    color: var(--iaw-ink);
    font-size: 0.9rem;
    font-weight: 700;
  }

  .iaw-inline-links {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .iaw-inline-links form {
    display: inline;
  }

  .iaw-link-muted {
    color: var(--iaw-ink-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
  }

  .iaw-link-muted:hover {
    color: var(--iaw-accent-strong);
    text-decoration: underline;
  }

  .iaw-link-danger {
    color: var(--iaw-danger-strong);
  }

  .iaw-link-danger:hover {
    color: oklch(40% 0.14 27);
  }

  .iaw-panel {
    background: linear-gradient(180deg, oklch(99.4% 0.002 255), var(--iaw-panel));
    border: 1px solid var(--iaw-border);
    border-radius: var(--iaw-radius-lg);
    box-shadow: var(--iaw-shadow);
    padding: 1.15rem;
  }

  .iaw-panel--soft {
    background: linear-gradient(180deg, oklch(98.8% 0.005 252), var(--iaw-panel-soft));
    box-shadow: var(--iaw-shadow-soft);
  }

  .iaw-panel--compact {
    border-radius: var(--iaw-radius);
    padding: 0.9rem;
  }

  .iaw-page-header {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
  }

  .iaw-page-title {
    color: var(--iaw-ink);
    font-family: var(--iaw-font-display);
    font-size: clamp(1.45rem, 2vw + 1rem, 2.1rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0;
  }

  .iaw-page-title--admin {
    font-family: var(--iaw-font-sans);
    font-size: 1.55rem;
    font-weight: 750;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .iaw-page-subtitle {
    color: var(--iaw-ink-muted);
    font-size: 0.9rem;
    margin-top: 0.3rem;
  }

  .iaw-section-stack {
    display: grid;
    gap: 1rem;
  }

  .iaw-btn {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.92rem;
    font-weight: 700;
    gap: 0.35rem;
    justify-content: center;
    line-height: 1;
    padding: 0.7rem 0.95rem;
    text-decoration: none;
    white-space: nowrap;
  }

  .iaw-btn:hover {
    text-decoration: none;
  }

  .iaw-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
  }

  .iaw-btn-sm {
    font-size: 0.82rem;
    padding: 0.52rem 0.75rem;
  }

  .iaw-btn-full {
    width: 100%;
  }

  .iaw-btn-pill {
    border-radius: var(--iaw-pill);
  }

  .iaw-btn-primary {
    background: linear-gradient(180deg, oklch(58% 0.13 253), var(--iaw-accent));
    border-color: oklch(50% 0.12 253);
    box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.35), var(--iaw-shadow-soft);
    color: white;
  }

  .iaw-btn-primary:hover {
    background: linear-gradient(180deg, oklch(55% 0.13 253), var(--iaw-accent-strong));
    color: white;
  }

  .iaw-btn-secondary {
    background: linear-gradient(180deg, oklch(99.4% 0.002 255), oklch(97.4% 0.008 252));
    border-color: var(--iaw-border-strong);
    box-shadow: var(--iaw-shadow-soft);
    color: var(--iaw-ink);
  }

  .iaw-btn-secondary:hover {
    background: oklch(98.1% 0.008 252);
    border-color: oklch(74% 0.018 252);
    color: var(--iaw-ink);
  }

  .iaw-btn-danger {
    background: linear-gradient(180deg, oklch(62% 0.15 27), var(--iaw-danger));
    border-color: oklch(54% 0.15 27);
    box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.3), var(--iaw-shadow-soft);
    color: white;
  }

  .iaw-btn-danger:hover {
    background: linear-gradient(180deg, oklch(58% 0.15 27), oklch(53% 0.15 27));
    color: white;
  }

  .iaw-btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--iaw-ink-muted);
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .iaw-btn-ghost:hover {
    color: var(--iaw-accent-strong);
  }

  .iaw-label {
    color: var(--iaw-ink-soft);
    display: block;
    font-size: 0.83rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 0.35rem;
  }

  .iaw-help {
    color: var(--iaw-ink-muted);
    font-size: 0.78rem;
    line-height: 1.35;
    margin-top: 0.35rem;
  }

  .iaw-help--block-tight {
    display: block;
    margin-top: 0.2rem;
  }

  .iaw-field {
    min-width: 0;
  }

  .iaw-input,
  .iaw-select,
  .iaw-textarea {
    background: oklch(99.6% 0.002 260);
    border: 1px solid var(--iaw-border-strong);
    border-radius: 0.85rem;
    color: var(--iaw-ink);
    display: block;
    font-size: 0.95rem;
    line-height: 1.35;
    padding: 0.72rem 0.85rem;
    width: 100%;
  }

  .iaw-input::placeholder,
  .iaw-textarea::placeholder {
    color: var(--iaw-ink-muted);
  }

  .iaw-input:hover,
  .iaw-select:hover,
  .iaw-textarea:hover {
    border-color: oklch(72% 0.018 252);
  }

  .iaw-input:focus,
  .iaw-select:focus,
  .iaw-textarea:focus {
    border-color: var(--iaw-accent);
    box-shadow: 0 0 0 3px oklch(60% 0.12 252 / 0.12);
    outline: none;
  }

  .iaw-textarea {
    min-height: 6rem;
    resize: vertical;
  }

  .iaw-select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--iaw-ink-muted) 50%),
      linear-gradient(135deg, var(--iaw-ink-muted) 50%, transparent 50%);
    background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 11px) calc(50% - 2px);
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
    padding-right: 2rem;
  }

  .iaw-input-file {
    padding: 0.55rem 0.65rem;
  }

  .iaw-input-file::file-selector-button {
    background: linear-gradient(180deg, oklch(99.4% 0.002 255), oklch(97.4% 0.008 252));
    border: 1px solid var(--iaw-border-strong);
    border-radius: var(--iaw-pill);
    color: var(--iaw-ink);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    margin-right: 0.6rem;
    padding: 0.42rem 0.7rem;
  }

  .iaw-checkbox-row {
    align-items: center;
    color: var(--iaw-ink-soft);
    display: inline-flex;
    gap: 0.45rem;
  }

  .iaw-checkbox-row--top {
    align-items: flex-start;
  }

  .iaw-checkbox-title {
    color: var(--iaw-ink);
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
  }

  .iaw-form-errors {
    background: linear-gradient(180deg, oklch(99% 0.004 20), var(--iaw-danger-soft));
    border: 1px solid oklch(88% 0.03 24);
    border-radius: var(--iaw-radius);
    color: oklch(44% 0.11 27);
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
  }

  .iaw-form-errors p {
    font-size: 0.88rem;
    font-weight: 700;
  }

  .iaw-form-errors ul {
    list-style: disc;
    margin-top: 0.5rem;
    padding-left: 1.2rem;
  }

  .iaw-form-errors li {
    font-size: 0.84rem;
    margin-top: 0.2rem;
  }

  .iaw-flash {
    border: 1px solid transparent;
    border-radius: var(--iaw-radius);
    box-shadow: var(--iaw-shadow-soft);
    margin-bottom: 0.85rem;
    padding: 0.75rem 0.9rem;
  }

  .iaw-flash__message {
    font-size: 0.88rem;
    font-weight: 600;
  }

  .iaw-flash--notice {
    background: linear-gradient(180deg, oklch(99% 0.003 150), var(--iaw-positive-soft));
    border-color: oklch(89% 0.03 152);
    color: oklch(39% 0.08 148);
  }

  .iaw-flash--alert {
    background: linear-gradient(180deg, oklch(99% 0.003 20), var(--iaw-danger-soft));
    border-color: oklch(89% 0.03 24);
    color: oklch(45% 0.11 27);
  }

  .iaw-badge {
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--iaw-pill);
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.32rem 0.55rem;
    text-transform: capitalize;
  }

  .iaw-badge--published {
    background: var(--iaw-positive-soft);
    border-color: oklch(88% 0.03 150);
    color: oklch(39% 0.08 148);
  }

  .iaw-badge--draft {
    background: var(--iaw-warning-soft);
    border-color: oklch(90% 0.03 82);
    color: oklch(46% 0.08 72);
  }

  .iaw-tabs {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
  }

  .iaw-tab {
    background: oklch(99.4% 0.002 255);
    border: 1px solid var(--iaw-border);
    border-radius: var(--iaw-pill);
    box-shadow: var(--iaw-shadow-soft);
    color: var(--iaw-ink-soft);
    display: inline-flex;
    font-size: 0.83rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.45rem 0.75rem;
    text-decoration: none;
  }

  .iaw-tab:hover {
    border-color: var(--iaw-border-strong);
    color: var(--iaw-ink);
  }

  .iaw-tab--active {
    background: linear-gradient(180deg, oklch(58% 0.13 253), var(--iaw-accent));
    border-color: oklch(50% 0.12 253);
    box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.35), var(--iaw-shadow-soft);
    color: white;
  }

  .iaw-tab--active:hover {
    color: white;
  }

  .iaw-table-wrap {
    overflow-x: auto;
  }

  .iaw-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 100%;
  }

  .iaw-table thead th {
    border-bottom: 1px solid var(--iaw-border);
    color: var(--iaw-ink-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.8rem 0.95rem;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .iaw-table tbody td {
    color: var(--iaw-ink);
    font-size: 0.9rem;
    padding: 0.8rem 0.95rem;
    vertical-align: middle;
  }

  .iaw-table tbody tr + tr td {
    border-top: 1px solid oklch(92% 0.008 252);
  }

  .iaw-table-row:hover td {
    background: oklch(98.3% 0.007 252);
  }

  .iaw-table-cell-muted {
    color: var(--iaw-ink-muted) !important;
  }

  .iaw-table-actions {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
  }

  .iaw-table-action-link {
    color: var(--iaw-ink-soft);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
  }

  .iaw-table-action-link:hover {
    color: var(--iaw-accent-strong);
    text-decoration: underline;
  }

  .iaw-table-action-link--danger {
    color: var(--iaw-danger-strong);
  }

  .iaw-table-action-link--danger:hover {
    color: oklch(40% 0.14 27);
    text-decoration: underline;
  }

  .iaw-table-primary {
    color: var(--iaw-ink);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .iaw-pagination {
    align-items: center;
    display: flex;
    gap: 0.65rem;
    justify-content: space-between;
    margin-top: 1rem;
  }

  .iaw-pagination__status {
    color: var(--iaw-ink-muted);
    font-size: 0.84rem;
    font-weight: 600;
    text-align: center;
  }

  .iaw-pagination__link {
    min-width: 5.7rem;
  }

  .iaw-pagination__link--disabled {
    background: oklch(97.8% 0.006 252);
    border-color: var(--iaw-border);
    box-shadow: none;
    color: oklch(66% 0.014 252);
    cursor: default;
    pointer-events: none;
  }

  .iaw-tag-list {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .iaw-tag {
    background: linear-gradient(180deg, oklch(99.4% 0.002 255), oklch(97.2% 0.009 252));
    border: 1px solid var(--iaw-border);
    border-radius: var(--iaw-pill);
    box-shadow: var(--iaw-shadow-soft);
    color: var(--iaw-ink-soft);
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.38rem 0.56rem;
    text-decoration: none;
  }

  .iaw-tag:hover {
    border-color: var(--iaw-border-strong);
    color: var(--iaw-accent-strong);
  }

  .iaw-article {
    display: grid;
    gap: 0.9rem;
  }

  .iaw-meta-row {
    align-items: center;
    color: var(--iaw-ink-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.82rem;
    font-weight: 600;
    gap: 0.45rem;
    letter-spacing: 0.01em;
  }

  .iaw-meta-dot {
    color: oklch(72% 0.014 252);
  }

  .iaw-article-title {
    font-family: var(--iaw-font-display);
    font-size: clamp(2rem, 2vw + 1.2rem, 2.7rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 0.98;
    margin: 0;
    text-wrap: balance;
  }

  .iaw-card-title {
    font-family: var(--iaw-font-display);
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.05;
    margin: 0;
  }

  .iaw-card-title a {
    color: inherit;
    text-decoration: none;
  }

  .iaw-card-title a:hover {
    color: var(--iaw-accent-strong);
  }

  .iaw-article-excerpt {
    color: var(--iaw-ink-soft);
    font-size: 0.97rem;
    line-height: 1.45;
    margin: 0;
  }

  .iaw-media-frame {
    background: oklch(98.4% 0.005 252);
    border: 1px solid var(--iaw-border);
    border-radius: 1rem;
    box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.55);
    overflow: hidden;
  }

  .iaw-content {
    color: var(--iaw-ink-soft);
    font-size: 1rem;
    line-height: 1.65;
  }

  .iaw-content > :first-child {
    margin-top: 0;
  }

  .iaw-content > :last-child {
    margin-bottom: 0;
  }

  .iaw-content :is(h1, h2, h3, h4) {
    color: var(--iaw-ink);
    font-family: var(--iaw-font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 1.4rem 0 0.7rem;
  }

  .iaw-content h2 {
    font-size: 1.55rem;
  }

  .iaw-content h3 {
    font-size: 1.2rem;
  }

  .iaw-content p,
  .iaw-content ul,
  .iaw-content ol,
  .iaw-content blockquote,
  .iaw-content pre {
    margin: 0.85rem 0;
  }

  .iaw-content ul,
  .iaw-content ol {
    padding-left: 1.25rem;
  }

  .iaw-content ul {
    list-style: disc;
  }

  .iaw-content ol {
    list-style: decimal;
  }

  .iaw-content blockquote {
    background: oklch(98.4% 0.006 252);
    border-left: 3px solid var(--iaw-border-strong);
    border-radius: 0.75rem;
    color: var(--iaw-ink-soft);
    padding: 0.65rem 0.85rem;
  }

  .iaw-content a {
    color: var(--iaw-accent-strong);
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.14em;
  }

  .iaw-content code {
    background: oklch(97.8% 0.007 252);
    border: 1px solid var(--iaw-border);
    border-radius: 0.35rem;
    color: var(--iaw-ink);
    font-size: 0.88em;
    padding: 0.08rem 0.28rem;
  }

  .iaw-content pre {
    background: oklch(24% 0.02 255);
    border-radius: 0.9rem;
    color: oklch(96% 0.006 252);
    overflow-x: auto;
    padding: 0.85rem 1rem;
  }

  .iaw-content pre code {
    background: transparent;
    border: 0;
    color: inherit;
    padding: 0;
  }

  .iaw-hey-wrap {
    margin: 0 auto;
    max-width: 64rem;
    padding: 0.75rem 0 1.25rem;
  }

  .iaw-hey-card {
    display: grid;
    gap: 0;
    overflow: hidden;
    padding: 0;
  }

  .iaw-hey-card__media {
    align-items: center;
    background: linear-gradient(180deg, oklch(98.7% 0.008 252), oklch(97.3% 0.012 248));
    border-bottom: 1px solid var(--iaw-border);
    display: flex;
    justify-content: center;
    padding: 1.2rem;
  }

  .iaw-hey-avatar-frame {
    width: min(16rem, 100%);
  }

  .iaw-hey-avatar {
    aspect-ratio: 1 / 1;
    border: 1px solid oklch(100% 0 0 / 0.8);
    border-radius: 999px;
    box-shadow: var(--iaw-shadow);
    object-fit: cover;
    width: 100%;
  }

  .iaw-hey-card__content {
    display: grid;
    gap: 0.9rem;
    padding: 1.1rem;
  }

  .iaw-hey-kicker {
    color: var(--iaw-ink-muted);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
  }

  .iaw-hey-title {
    font-family: var(--iaw-font-display);
    font-size: clamp(2rem, 2vw + 1.1rem, 2.8rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 0.98;
    margin: 0;
    text-wrap: balance;
  }

  .iaw-hey-description {
    color: var(--iaw-ink-soft);
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    max-width: 34rem;
  }

  .iaw-hey-actions {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.15rem;
  }

  .iaw-hey-action {
    min-height: 3rem;
    padding-inline: 1rem;
  }

  .iaw-hey-action__icon {
    height: 1.1rem;
    width: 1.1rem;
  }

  .iaw-btn-whatsapp {
    background: linear-gradient(180deg, oklch(70% 0.17 150), oklch(61% 0.19 149));
    border-color: oklch(54% 0.15 149);
    box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.28), var(--iaw-shadow-soft);
    color: white;
  }

  .iaw-btn-whatsapp:hover {
    background: linear-gradient(180deg, oklch(66% 0.17 150), oklch(57% 0.18 149));
    color: white;
  }

  .iaw-hey-socials {
    border-top: 1px solid var(--iaw-border);
    margin-top: 0.25rem;
    padding-top: 0.95rem;
  }

  .iaw-hey-socials__title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.65rem;
  }

  .iaw-hey-socials__row {
    display: flex;
    gap: 0.6rem;
  }

  .iaw-hey-social-link {
    align-items: center;
    background: linear-gradient(180deg, oklch(99.4% 0.002 255), oklch(97.4% 0.008 252));
    border: 1px solid var(--iaw-border-strong);
    border-radius: 0.85rem;
    box-shadow: var(--iaw-shadow-soft);
    color: var(--iaw-ink);
    display: inline-flex;
    height: 2.75rem;
    justify-content: center;
    width: 2.75rem;
  }

  .iaw-hey-social-link:hover {
    background: oklch(98.1% 0.008 252);
    border-color: oklch(74% 0.018 252);
    color: var(--iaw-accent-strong);
  }

  .iaw-hey-social-link__icon {
    height: 1.25rem;
    width: 1.25rem;
  }

  @media (min-width: 48rem) {
    .iaw-hey-card {
      grid-template-columns: minmax(14rem, 19rem) minmax(0, 1fr);
    }

    .iaw-hey-card__media {
      border-bottom: 0;
      border-right: 1px solid var(--iaw-border);
      padding: 1.4rem;
    }

    .iaw-hey-card__content {
      gap: 1rem;
      padding: 1.4rem 1.5rem;
    }

    .iaw-hey-actions {
      grid-template-columns: repeat(2, minmax(0, max-content));
    }
  }

  .iaw-login-card {
    margin: 0 auto;
    max-width: 30rem;
  }

  .iaw-form-stack {
    display: grid;
    gap: 1rem;
  }

  .iaw-form-grid {
    display: grid;
    gap: 1rem;
  }

  .iaw-form-panel {
    background: linear-gradient(180deg, oklch(99.4% 0.002 255), var(--iaw-panel));
    border: 1px solid var(--iaw-border);
    border-radius: var(--iaw-radius-lg);
    box-shadow: var(--iaw-shadow);
    padding: 1rem;
  }

  .iaw-form-panel--soft {
    background: linear-gradient(180deg, oklch(98.8% 0.005 252), var(--iaw-panel-soft));
  }

  .iaw-mode-toggle {
    align-items: center;
    background: oklch(98.2% 0.007 252);
    border: 1px solid var(--iaw-border);
    border-radius: var(--iaw-pill);
    display: inline-flex;
    gap: 0.2rem;
    padding: 0.2rem;
  }

  .iaw-mode-toggle-link {
    border-radius: var(--iaw-pill);
    color: var(--iaw-ink-soft);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.42rem 0.7rem;
    text-decoration: none;
  }

  .iaw-mode-toggle-link:hover {
    color: var(--iaw-ink);
  }

  .iaw-mode-toggle-link--active,
  .iaw-mode-toggle label.iaw-mode-toggle-link:has(input:checked) {
    background: var(--iaw-panel);
    border: 1px solid var(--iaw-border);
    box-shadow: var(--iaw-shadow-soft);
    color: var(--iaw-ink);
  }

  .iaw-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .iaw-editor-shell {
    background: oklch(99.3% 0.002 255);
    border: 1px solid var(--iaw-border);
    border-radius: 1rem;
    overflow: hidden;
  }

  .iaw-editor-shell--maximized {
    position: fixed;
    inset: 1rem;
    z-index: 1000;
    max-height: calc(100vh - 2rem);
    max-width: calc(100vw - 2rem);
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 0 9999px oklch(0% 0 0 / 0.4);
  }

  .iaw-editor-shell--maximized lexxy-editor {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .iaw-editor-shell--maximized .lexxy-editor__content {
    flex: 1;
    min-height: 20rem;
  }

  .iaw-inline-note {
    color: var(--iaw-ink-muted);
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .iaw-editor-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
  }

  .iaw-editor-maximize-btn,
  .iaw-editor-restore-btn {
    -webkit-appearance: none;
    appearance: none;
    background: oklch(96% 0.01 255);
    border: 1px solid var(--iaw-border);
    border-radius: 0.5rem;
    color: var(--iaw-ink);
    cursor: pointer;
    display: inline-flex;
    padding: 0.35rem 0.5rem;
  }

  .iaw-editor-maximize-btn:hover,
  .iaw-editor-restore-btn:hover {
    background: oklch(93% 0.01 255);
  }

  .iaw-editor-shell-maximize-header {
    display: none;
    align-items: center;
    grid-template-columns: 1fr auto 1fr;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--iaw-border);
    flex-shrink: 0;
  }

  .iaw-editor-shell--maximized .iaw-editor-shell-maximize-header {
    display: grid;
  }

  .iaw-editor-shell-maximize-header__label {
    justify-self: start;
  }

  .iaw-editor-shell-maximize-header__save {
    justify-self: center;
  }

  .iaw-editor-shell-maximize-header .iaw-editor-restore-btn {
    justify-self: end;
  }

  .iaw-editor-restore-btn {
    display: none;
  }

  .iaw-editor-field--maximized .iaw-editor-maximize-btn {
    display: none;
  }

  .iaw-editor-shell--maximized .iaw-editor-shell-maximize-header .iaw-editor-restore-btn {
    display: inline-flex;
  }

  .iaw-editor-note {
    margin: 0;
    max-width: 48rem;
  }

  .iaw-sticky-actions {
    backdrop-filter: blur(10px);
    background: oklch(99.2% 0.003 255 / 0.82);
    border: 1px solid oklch(89.5% 0.012 252 / 0.9);
    border-radius: 1rem;
    bottom: 0.85rem;
    box-shadow: var(--iaw-shadow-strong);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.7rem;
    position: sticky;
    z-index: 10;
  }

  .iaw-preview-row {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    margin-top: 0.7rem;
  }

  .iaw-preview-row img {
    background: oklch(98.2% 0.007 252);
    border: 1px solid var(--iaw-border);
    border-radius: 0.75rem;
    height: 4rem;
    object-fit: cover;
    width: 4rem;
  }

  .iaw-mini-caption {
    color: var(--iaw-ink-muted);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.02em;
  }

  .iaw-order-number {
    min-width: 1.8rem;
  }
}

@media (min-width: 64rem) {
  .iaw-admin-sidebar-frame {
    display: block;
  }

  .iaw-admin-mobile-header {
    display: none;
  }
}

@media (min-width: 64rem) {
  .iaw-form-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .iaw-col-span-2 {
    grid-column: span 2 / span 2;
  }
}

@media (max-width: 48rem) {
  .iaw-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .iaw-pagination__status {
    order: -1;
  }
}

/* iA Writer-inspired visual override
   Flat surfaces, restrained borders, high readability typography, cyan accents */
@layer base {
  :root {
    --iaw-font-sans: "Aptos", "Segoe UI", "Helvetica Neue", Helvetica, Arial, ui-sans-serif, system-ui, sans-serif;
    --iaw-font-display: var(--iaw-font-sans);
    --iaw-font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

    --iaw-canvas: oklch(97.7% 0 0);
    --iaw-canvas-alt: oklch(95.6% 0 0);
    --iaw-panel: oklch(100% 0 0);
    --iaw-panel-soft: oklch(99.2% 0 0);
    --iaw-ink: oklch(24% 0 0);
    --iaw-ink-soft: oklch(33% 0 0);
    --iaw-ink-muted: oklch(50% 0 0);
    --iaw-border: oklch(84% 0 0);
    --iaw-border-strong: oklch(68% 0 0);
    --iaw-accent: oklch(71% 0.14 233);
    --iaw-accent-strong: oklch(62% 0.15 237);
    --iaw-accent-soft: oklch(95.5% 0.02 233);
    --iaw-positive: oklch(58% 0.14 150);
    --iaw-positive-soft: oklch(95.8% 0.03 150);
    --iaw-warning: oklch(70% 0.13 84);
    --iaw-warning-soft: oklch(97.2% 0.024 88);
    --iaw-danger: oklch(62% 0.17 28);
    --iaw-danger-soft: oklch(96.8% 0.02 28);
    --iaw-danger-strong: #8b2b24;

    --iaw-radius-sm: 0.25rem;
    --iaw-radius: 0.4rem;
    --iaw-radius-lg: 0.55rem;
    --iaw-pill: 999px;

    --iaw-shadow-soft: none;
    --iaw-shadow: none;
    --iaw-shadow-strong: none;
    --iaw-ring: 2px solid oklch(72% 0.14 233 / 0.55);
  }

  html {
    background: #f7f7f7;
    font-size: 16px;
    line-height: 1.55;
  }

  body {
    background: #f7f7f7;
    color: #222;
    font-family: var(--iaw-font-sans);
    font-feature-settings: "dlig";
    line-height: 1.55;
  }

  ::selection {
    background: rgb(0 178 255 / 22%);
  }

  a {
    text-underline-offset: 0.12em;
  }
}

@layer components {
  .iaw-shell,
  .iaw-shell--public,
  .iaw-shell--admin {
    background: #f7f7f7;
  }

  .iaw-header {
    backdrop-filter: none;
    background: rgb(247 247 247 / 0.93);
    border-bottom: 1px solid #d6d6d6;
    box-shadow: none;
  }

  .iaw-header-inner {
    max-width: 72rem;
    padding: 0.8rem 1rem;
  }

  .iaw-header-brand {
    color: #222;
    gap: 0.6rem;
    text-decoration: none;
  }

  .iaw-header-brand:hover {
    color: #0097d8;
  }

  .iaw-header-brand-mark {
    background: #111;
    border: 1px solid #111;
    border-radius: 0.28rem;
    box-shadow: none;
    color: #fff;
    font-family: var(--iaw-font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    height: 1.7rem;
    width: 1.7rem;
  }

  .iaw-header-brand-mark--avatar {
    overflow: hidden;
    padding: 0;
  }

  .iaw-header-brand-mark__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
  }

  .iaw-header-brand-label {
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: -0.015em;
  }

  .iaw-header-brand-subtle {
    color: #666;
    font-family: var(--iaw-font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.04em;
  }

  .iaw-nav {
    gap: 0.15rem;
  }

  .iaw-nav-link {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.2rem;
    color: #222;
    font-size: 0.83rem;
    font-weight: 500;
    padding: 0.4rem 0.55rem;
  }

  .iaw-nav-link:hover {
    background: #fff;
    border-color: #d6d6d6;
    color: #0097d8;
  }

  .iaw-nav-link--active {
    background: #fff;
    border-color: #222;
    box-shadow: none;
    color: #222;
    font-weight: 700;
  }

  .iaw-main {
    max-width: 72rem;
    padding: 1.1rem 1rem 2rem;
  }

  .iaw-main--public {
    max-width: 58rem;
    padding-top: 1.4rem;
  }

  .iaw-main--admin {
    max-width: 88rem;
    padding-top: 0.9rem;
  }

  .iaw-admin-sidebar-frame {
    border-right: 1px solid #d6d6d6;
    padding: 0.8rem;
    width: 17.5rem;
  }

  .iaw-admin-mobile-header {
    background: #f7f7f7;
    border-bottom: 1px solid #d6d6d6;
    padding: 0.8rem 1rem;
  }

  .iaw-sidebar {
    background: #fff;
    border: 1px solid #d6d6d6;
    border-radius: 0.45rem;
    box-shadow: none;
    gap: 0.7rem;
    height: calc(100vh - 1.6rem);
    padding: 0.8rem;
    top: 0.8rem;
  }

  .iaw-sidebar-brand {
    border-bottom: 1px solid #ebebeb;
    margin-bottom: 0.35rem;
    padding-bottom: 0.7rem;
  }

  .iaw-sidebar-brand-title {
    font-family: var(--iaw-font-sans);
    font-size: 0.95rem;
    font-weight: 700;
  }

  .iaw-sidebar-brand-subtitle {
    color: #666;
    font-family: var(--iaw-font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.05em;
  }

  .iaw-sidebar-section-title {
    color: #777;
    font-family: var(--iaw-font-mono);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-top: 0.85rem;
  }

  .iaw-sidebar-nav {
    gap: 0.15rem;
  }

  .iaw-sidebar-link {
    border: 1px solid transparent;
    border-radius: 0.22rem;
    color: #222;
    font-size: 0.84rem;
    font-weight: 500;
    padding: 0.42rem 0.55rem;
  }

  .iaw-sidebar-link:hover {
    background: #fafafa;
    border-color: #d6d6d6;
    color: #0097d8;
  }

  .iaw-sidebar-link--active {
    background: #fff;
    border-color: #222;
    box-shadow: none;
    color: #222;
    font-weight: 700;
  }

  .iaw-sidebar-footer {
    border-top: 1px solid #e9e9e9;
    padding-top: 0.7rem;
  }

  .iaw-sidebar-footer-links {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.38rem;
  }

  .iaw-sidebar-footer-links form {
    display: inline-flex;
    margin: 0;
  }

  .iaw-sidebar-footer-links button {
    background: transparent;
    border: 0;
    cursor: pointer;
    margin: 0;
    padding: 0;
  }

  .iaw-sidebar-user-name {
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0;
  }

  .iaw-link-muted {
    align-items: center;
    color: #555;
    display: inline-flex;
    font-family: var(--iaw-font-mono);
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1;
    margin: 0;
    padding: 0;
    text-decoration: none;
  }

  .iaw-link-muted:hover {
    color: #0097d8;
  }

  .iaw-link-danger {
    color: var(--iaw-danger-strong);
  }

  .iaw-link-danger:hover {
    color: #991b1b;
  }

  .iaw-panel,
  .iaw-form-panel {
    background: #fff;
    border: 1px solid #d6d6d6;
    border-radius: 0.45rem;
    box-shadow: none;
  }

  .iaw-panel {
    padding: 1rem;
  }

  .iaw-panel--soft,
  .iaw-form-panel--soft {
    background: #fff;
    border-color: #d6d6d6;
    box-shadow: none;
  }

  .iaw-panel--compact {
    border-radius: 0.35rem;
    padding: 0.3rem;
  }

  .iaw-page-header {
    margin-bottom: 0.85rem;
  }

  .iaw-page-title {
    color: #222;
    font-family: var(--iaw-font-sans);
    font-size: clamp(1.5rem, 1.15rem + 1vw, 2.15rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.08;
  }

  .iaw-page-title--admin {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.015em;
  }

  .iaw-page-subtitle {
    color: #666;
    font-family: var(--iaw-font-mono);
    font-size: 0.76rem;
    line-height: 1.4;
    margin-top: 0.25rem;
  }

  .iaw-btn {
    border-radius: 999px;
    box-shadow: none;
    font-family: var(--iaw-font-sans);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
    padding: 0.5rem 0.78rem;
  }

  .iaw-btn-sm {
    font-size: 0.74rem;
    padding: 0.34rem 0.6rem;
  }

  .iaw-btn-secondary {
    background: #fff;
    border: 1px solid #222;
    color: #222;
  }

  .iaw-btn-secondary:hover {
    background: #fff;
    border-color: #0097d8;
    color: #0097d8;
  }

  .iaw-btn-primary {
    background: #00b2ff;
    border: 1px solid #00b2ff;
    color: #fff;
  }

  .iaw-btn-primary:hover {
    background: #0097d8;
    border-color: #0097d8;
    color: #fff;
  }

  .iaw-btn-danger {
    background: #e04b43;
    border: 1px solid #e04b43;
    color: #fff;
  }

  .iaw-btn-danger:hover {
    background: #c23e36;
    border-color: #c23e36;
  }

  .iaw-btn-ghost {
    border-radius: 0;
    color: #555;
    font-family: var(--iaw-font-mono);
    font-weight: 500;
  }

  .iaw-btn-ghost:hover {
    color: #0097d8;
  }

  .iaw-label {
    color: #444;
    font-family: var(--iaw-font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
  }

  .iaw-help,
  .iaw-inline-note,
  .iaw-mini-caption {
    color: #666;
    font-family: var(--iaw-font-mono);
    font-size: 0.73rem;
    font-weight: 400;
    letter-spacing: 0;
  }

  .iaw-input,
  .iaw-select,
  .iaw-textarea {
    background: #fff;
    border: 1px solid #cfcfcf;
    border-radius: 0.38rem;
    box-shadow: none;
    color: #222;
    font-family: var(--iaw-font-mono);
    font-size: 0.9rem;
    line-height: 1.45;
    padding: 0.62rem 0.72rem;
  }

  .iaw-input::placeholder,
  .iaw-textarea::placeholder {
    color: #8b8b8b;
  }

  .iaw-input:hover,
  .iaw-select:hover,
  .iaw-textarea:hover {
    border-color: #9f9f9f;
  }

  .iaw-input:focus,
  .iaw-select:focus,
  .iaw-textarea:focus {
    border-color: #00b2ff;
    box-shadow: 0 0 0 3px rgb(0 178 255 / 15%);
  }

  .iaw-input-file {
    background: #fafafa;
  }

  .iaw-input-file::file-selector-button {
    background: #fff;
    border: 1px solid #222;
    border-radius: 999px;
    color: #222;
    font-family: var(--iaw-font-sans);
    font-weight: 700;
  }

  .iaw-checkbox-row {
    color: #333;
    font-size: 0.84rem;
  }

  .iaw-form-errors {
    background: #fff;
    border: 1px solid #e3aaa6;
    border-left: 3px solid #e04b43;
    border-radius: 0.35rem;
    color: #7f1e18;
    margin-bottom: 0.85rem;
    padding: 0.75rem 0.85rem;
  }

  .iaw-flash {
    background: #fff;
    border-radius: 0.35rem;
    box-shadow: none;
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.8rem;
  }

  .iaw-flash__message {
    font-family: var(--iaw-font-mono);
    font-size: 0.75rem;
    font-weight: 500;
  }

  .iaw-flash--notice {
    border: 1px solid #b9e7fb;
    border-left: 3px solid #00b2ff;
    color: #0e5b78;
  }

  .iaw-flash--alert {
    border: 1px solid #f1c6c2;
    border-left: 3px solid #e04b43;
    color: #8b2b24;
  }

  .iaw-badge {
    background: transparent;
    border-radius: 999px;
    font-family: var(--iaw-font-mono);
    font-size: 0.69rem;
    font-weight: 600;
    padding: 0.24rem 0.48rem;
    text-transform: uppercase;
  }

  .iaw-badge--published {
    background: #f4fbff;
    border: 1px solid #95dcfa;
    color: #046e9a;
  }

  .iaw-badge--draft {
    background: #fffaf0;
    border: 1px solid #ead18c;
    color: #8c6a09;
  }

  .iaw-tabs {
    gap: 0.3rem;
    margin-bottom: 0.8rem;
  }

  .iaw-tab {
    background: #fff;
    border: 1px solid #d6d6d6;
    border-radius: 999px;
    box-shadow: none;
    color: #333;
    font-family: var(--iaw-font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.35rem 0.58rem;
  }

  .iaw-tab:hover {
    border-color: #222;
    color: #222;
  }

  .iaw-tab--active {
    background: #fff;
    border-color: #222;
    color: #222;
    font-weight: 700;
  }

  .iaw-table-wrap.iaw-panel {
    background: #fff;
    border-radius: 0.35rem;
    overflow: hidden;
    padding: 0;
  }

  .iaw-table {
    border-collapse: collapse;
    min-width: 100%;
  }

  .iaw-table thead {
    background: #fcfcfc;
    border-bottom: 1px solid #222;
  }

  .iaw-table tbody {
    border-bottom: 0;
  }

  .iaw-table thead th {
    border-bottom: 0;
    color: #444;
    font-family: var(--iaw-font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.6rem 0.75rem;
    text-transform: uppercase;
  }

  .iaw-table tbody td {
    border-bottom: 1px solid #e5e5e5;
    color: #222;
    font-size: 0.86rem;
    padding: 0.6rem 0.75rem;
  }

  .iaw-table tbody tr:last-child td {
    border-bottom: 0;
  }

  .iaw-table tbody tr + tr td {
    border-top: 0;
  }

  .iaw-table-row:hover td {
    background: #fafafa;
  }

  .iaw-table-cell-muted {
    color: #555 !important;
    font-family: var(--iaw-font-mono);
    font-size: 0.8rem !important;
  }

  .iaw-table-primary {
    font-size: 0.85rem;
    font-weight: 700;
  }

  .iaw-table-action-link {
    color: #222;
    font-family: var(--iaw-font-mono);
    font-size: 0.75rem;
    font-weight: 500;
  }

  .iaw-table-action-link:hover {
    color: #0097d8;
  }

  .iaw-table-action-link--danger {
    color: var(--iaw-danger-strong);
  }

  .iaw-table-action-link--danger:hover {
    color: #991b1b;
    text-decoration: underline;
  }

  .iaw-pagination {
    gap: 0.4rem;
    margin-top: 0.8rem;
  }

  .iaw-pagination__status {
    color: #666;
    font-family: var(--iaw-font-mono);
    font-size: 0.72rem;
    font-weight: 400;
  }

  .iaw-pagination__link {
    min-width: 5.4rem;
  }

  .iaw-pagination__link--disabled {
    background: #fff;
    border-color: #d6d6d6;
    color: #9a9a9a;
  }

  .iaw-tag {
    background: #fff;
    border: 1px solid #d6d6d6;
    border-radius: 999px;
    box-shadow: none;
    color: #333;
    font-family: var(--iaw-font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    padding: 0.28rem 0.48rem;
  }

  .iaw-tag:hover {
    border-color: #222;
    color: #0097d8;
  }

  .iaw-article {
    gap: 0.75rem;
  }

  .iaw-main--public .iaw-panel {
    padding: 1.15rem;
  }

  .iaw-meta-row {
    color: #666;
    font-family: var(--iaw-font-mono);
    font-size: 0.73rem;
    font-weight: 400;
    gap: 0.35rem;
  }

  .iaw-meta-dot {
    color: #999;
  }

  .iaw-article-title,
  .iaw-card-title {
    color: #222;
    font-family: var(--iaw-font-sans);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.08;
  }

  .iaw-article-title {
    font-size: clamp(1.7rem, 2vw + 1rem, 2.35rem);
    margin-top: 0.15rem;
  }

  .iaw-card-title {
    font-size: 1.1rem;
  }

  .iaw-card-title a:hover {
    color: #0097d8;
    text-decoration: underline;
  }

  .iaw-article-excerpt {
    color: #333;
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .iaw-media-frame {
    background: #fff;
    border: 1px solid #d6d6d6;
    border-radius: 0.35rem;
    box-shadow: none;
  }

  .iaw-content {
    color: #222;
    font-size: 1rem;
    line-height: 1.7;
  }

  .iaw-content :is(h1, h2, h3, h4) {
    font-family: var(--iaw-font-sans);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 1.25rem 0 0.55rem;
  }

  .iaw-content h2 {
    font-size: 1.25rem;
  }

  .iaw-content h3 {
    font-size: 1.05rem;
  }

  .iaw-content p,
  .iaw-content ul,
  .iaw-content ol,
  .iaw-content blockquote,
  .iaw-content pre {
    margin: 0.7rem 0;
  }

  .iaw-content a {
    color: #222;
    text-decoration-thickness: 0.06em;
  }

  .iaw-content a:hover {
    color: #0097d8;
  }

  .iaw-content code {
    background: #fff;
    border: 1px solid #d6d6d6;
    border-radius: 0.2rem;
    color: #222;
    font-family: var(--iaw-font-mono);
    font-size: 0.88em;
    padding: 0.04rem 0.28rem 0.08rem;
  }

  .iaw-content pre {
    background: #fff;
    border: 1px solid #d6d6d6;
    border-radius: 0.35rem;
    color: #222;
    padding: 0.75rem 0.85rem;
  }

  .iaw-content pre code {
    background: transparent;
    border: 0;
    padding: 0;
  }

  .iaw-content blockquote {
    background: #fafafa;
    border-left: 2px solid #cfcfcf;
    border-radius: 0.2rem;
    color: #333;
    padding: 0.55rem 0.7rem;
  }

  .iaw-form-stack {
    gap: 0.8rem;
  }

  .iaw-form-grid {
    gap: 0.8rem;
  }

  .iaw-mode-toggle {
    background: #fff;
    border: 1px solid #d6d6d6;
    border-radius: 999px;
    gap: 0.15rem;
    padding: 0.15rem;
  }

  .iaw-mode-toggle-link {
    border-radius: 999px;
    color: #444;
    font-family: var(--iaw-font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    padding: 0.34rem 0.55rem;
  }

  .iaw-mode-toggle-link--active,
  .iaw-mode-toggle label.iaw-mode-toggle-link:has(input:checked) {
    background: #fff;
    border: 1px solid #222;
    box-shadow: none;
    color: #222;
    font-weight: 700;
  }

  .iaw-editor-shell {
    background: #fff;
    border: 1px solid #cfcfcf;
    border-radius: 0.35rem;
    box-shadow: none;
  }

  .iaw-sticky-actions {
    backdrop-filter: none;
    background: rgb(247 247 247 / 0.94);
    border: 1px solid #d6d6d6;
    border-radius: 999px;
    box-shadow: none;
    bottom: 0.65rem;
    gap: 0.35rem;
    padding: 0.45rem;
  }

  .iaw-preview-row img {
    border-radius: 0.25rem;
    box-shadow: none;
  }
}

@layer components {
  .iaw-status-filter {
    margin-bottom: 1rem;
  }

  .iaw-main--admin {
    flex: 1;
  }

  .iaw-table-cell-actions {
    text-align: right;
  }

  .iaw-inline-cluster {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .iaw-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .iaw-media-fluid {
    display: block;
    height: auto;
    width: 100%;
  }

  .iaw-badge--orphaned {
    background: oklch(96% 0.01 260);
    border-color: var(--iaw-border);
    color: var(--iaw-ink-soft);
  }

  .iaw-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
  }

  .iaw-toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .iaw-toolbar-label {
    align-items: center;
    display: inline-flex;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--iaw-ink-soft);
  }

  .iaw-toolbar .iaw-tabs {
    margin-bottom: 0;
  }

  .iaw-media-col-preview {
    width: 5rem;
    vertical-align: middle;
  }

  .iaw-media-preview-img {
    display: block;
    height: auto;
    max-height: 3rem;
    max-width: 4rem;
    object-fit: contain;
  }

  .iaw-media-preview-placeholder {
    color: var(--iaw-ink-soft);
  }

  .iaw-media-usage {
    display: block;
  }

  .iaw-table-row--orphaned td {
    background: oklch(98% 0.01 260);
  }

  .iaw-table-empty {
    padding: 1rem 0;
    color: var(--iaw-ink-soft);
  }
}
