@import url("https://fonts.googleapis.com/css2?family=Pacifico&display=swap");

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
  padding: 0;
}

/* Custom properties */
:root {
  --color-text: #18181b;
  --color-muted: #71717a;
  --color-border: #e4e4e7;
  --color-bg: #ffffff;
  --color-primary: #18181b;
  --color-primary-hover: #3f3f46;
  --color-accent: #f4f4f5;
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-logo: "Pacifico", cursive;
  --radius: 0.5rem;
  --max-width: 1024px;

  /* Svelte app aliases */
  --border: var(--color-border);
  --text: var(--color-muted);
  --text-h: var(--color-text);
  --surface: var(--color-bg);

  /* Client portal colours */
  --color-client-bg: #eff6ff;
  --color-client-border: #bfdbfe;
  --color-client-author: #3b82f6;
}

/* Base */
html {
  font-size: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background:
    radial-gradient(
      800px 400px at 10% 0%,
      rgba(255, 210, 160, 0.25),
      transparent
    ),
    radial-gradient(
      800px 400px at 90% 10%,
      rgba(255, 190, 140, 0.2),
      transparent
    ),
    radial-gradient(
      600px 300px at 50% 100%,
      rgba(255, 220, 180, 0.15),
      transparent
    ),
    linear-gradient(#ffffff, #f8f4ee);
}

a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
ul {
  list-style: none;
}
img,
svg {
  display: block;
  max-width: 100%;
}

/* Layout utilities */
.page-wrap {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.page-fill {
  padding: 5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Text utilities */
.page-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--color-text);
}
.hint {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin: 0;
}
.load-error {
  color: #991b1b;
  font-size: 0.875rem;
  margin: 0;
}
.field-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}
.field-hint {
  font-size: 0.8125rem;
  color: var(--color-muted);
  opacity: 0.7;
}
.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-text);
  font-size: inherit;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}

/* Alerts */
.alert {
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.5;
  border: 1px solid transparent;
}
.alert--error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}
.alert--warn {
  background: #fefce8;
  color: #854d0e;
  border-color: #fde047;
}
.alert--success {
  background: #f0fdf4;
  color: #166534;
  border-color: #86efac;
}

/* Box */
.box {
  position: relative;
display: grid;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.box h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--color-text);
}
.box--row {

  align-items: center;
}
.grid-status {
grid-template-columns: 5rem 1fr 9rem;
width:100%;
}
.grid-file {
grid-template-columns: 5rem 1fr 4rem 4rem 9rem;
width:100%;
}

.box--client {
  border-color: var(--color-client-border);
  background: var(--color-client-bg);
}
.box--start {
  align-self: flex-start;
  max-width: 85%;
  min-width: 60%;
}
.box--end {
  align-self: flex-end;
  max-width: 85%;
  min-width: 60%;
}
.box--danger {
  border-color: #fca5a5;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}
.modal {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.modal h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: var(--color-text);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Input — works on <input> and <textarea> */
.input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  box-sizing: border-box;
}
.input:focus {
  border-color: var(--color-text);
  box-shadow: 0 0 0 2px rgba(24, 24, 27, 0.1);
}
.input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
textarea.input {
  font-family: var(--font-sans);
  line-height: 1.5;
  resize: vertical;
  min-height: 5rem;
  padding: 0.625rem 0.75rem;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: normal;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color 0.15s,
    opacity 0.15s;
}
.btn--default {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn--default:hover {
  background: var(--color-primary-hover);
}
.btn--outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn--outline:hover {
  background: var(--color-accent);
}
.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: transparent;
}
.btn--ghost:hover {
  background: var(--color-accent);
}
.btn--destructive {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}
.btn--destructive:hover {
  background: #dc2626;
}
.btn.disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.btn--full {
  width: 100%;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid transparent;
}
.badge--default {
  background: var(--color-accent);
  color: var(--color-text);
  border-color: var(--color-border);
}
.badge--success {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

/* Tabs */
.tabs__list {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1rem;
}
.tabs__tab {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  color: var(--color-muted);
  margin-bottom: -1px;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.tabs__tab.active,
.tabs__tab:hover {
  color: var(--color-text);
}
.tabs__tab.active {
  border-bottom-color: var(--color-text);
}

/* List */
.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* App layout */
.app-main {
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.app-h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--color-text);
}
.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.title-row__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

/* Field */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

/* Thread filter */
.thread-filter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.thread-filter .input {
  flex: 1;
  min-width: 160px;
}

.filter-check {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition:
    background 0.12s,
    border-color 0.12s,
    color 0.12s;
}
.filter-check input[type="checkbox"] {
  display: none;
}
.filter-check:has(input:checked) {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Thread */
.thread {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 60vh;
  min-height: 6rem;
  overflow-y: auto;
}
.thread-status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.875rem;
  background: var(--color-accent);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.8125rem;
}
.thread-status--current {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.thread-status--current .message-author {
  color: #166534;
}
.thread-status__body {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}


/* Compose area (dashboard send form + portal reply form) */
.compose-area {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}
.reply-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.reply-error {
  font-size: 0.8125rem;
  color: #ef4444;
}

/* Client list */
.client-list,
.portal-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.client-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.client-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 0.25rem;
}
@media (max-width: 900px) {
  .client-card {
    grid-template-columns: repeat(2, 1fr);
  }
  .client-name {
    grid-column: span 1;
  }
}
@media (max-width: 600px) {
  .client-card {
    grid-template-columns: 1fr;
  }
  .client-name {
    grid-column: span 1;
  }
}

.client-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
  grid-column: span 3;
}
.client-slug {
  font-size: 0.8125rem;
  color: var(--color-muted);
  font-family: monospace;
}
.client-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-top: 0.125rem;
}
.meta-label {
  opacity: 0.6;
}

.activity-by {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.0625rem 0.3rem;
  border-radius: 0.25rem;
}
.activity-by--business {
  background: #f0fdf4;
  color: #166534;
}
.activity-by--client {
  background: var(--color-client-bg);
  color: #1d4ed8;
}

/* Item / message */

.item-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-meta {
  font-size: 0.75rem;
  color: var(--color-muted);
}
.message-author {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  margin: 0;
}
.message-author--client {
  color: var(--color-client-author);
}
.message-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.box--end .message-meta {
  justify-content: flex-end;
}
.message-content {
  font-size: 0.875rem;
  color: var(--color-text);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}
.item-date {
  opacity: 0.6;
  position: absolute;
  bottom: 0px;
  right: 5px;
  text-align: right;
}

.item-delete {
  position: absolute;
  top: 5px;
  right: 5px;
  opacity: 0;
  transition: opacity 0.15s;
}
.box:hover .item-delete,
.thread-status:hover .item-delete {
  opacity: 1;
}

/* Account */
.account-email {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin: -0.75rem 0 0;
}
.slug-form {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.slug-form input {
  flex: 1;
}
.danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--color-border);
}
.danger-row:first-of-type {
  border-top: none;
  padding-top: 0;
}
.danger-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  margin: 0 0 0.125rem;
}
.danger-desc {
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin: 0;
}

/* ClientShare */
.client-title {
  align-items: baseline;
  justify-content: flex-start;
}
.title-subtitle {
  font-size: 0.875rem;
  color: var(--color-muted);
}
.url-box {
  font-family: monospace;
  font-size: 0.8125rem;
  background: var(--color-accent);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.625rem 0.75rem;
  word-break: break-all;
  color: var(--color-text);
}
.copy-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text);
  cursor: pointer;
  font-weight: 500;
}
.token-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Portal */
.portal-footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--color-muted);
}
.portal-footer a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
}
.portal-footer a:hover {
  text-decoration: underline;
}
.portal-title-row {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.portal-section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  margin: 0;
}
.portal-status-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.portal-status-label {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

/* Login */
.login-section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.login-wrap {
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.login__icon {
  font-size: 2rem;
  line-height: 1;
}
.login__sub {
  font-size: 0.9375rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin: 0;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

/* 404 */
.not-found {
  padding-top: 6rem;
  padding-bottom: 6rem;
  text-align: center;
}
.not-found__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.not-found__code {
  font-size: clamp(6rem, 20vw, 12rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
  color: var(--color-text);
}
.not-found__heading {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.not-found__sub {
  font-size: 1.125rem;
  color: var(--color-muted);
  max-width: 400px;
}

/* Steps (marketing how-it-works + homepage) */
span.steps-strip__num,
span.how-steps__num {
  font-size: xx-large;
  margin-right: 2rem;
}
li.steps-strip__item,
li.how-steps__item {
  margin-bottom: 2rem;
}

/* Site header */
.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 10;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-logo {
  font-family: var(--font-logo);
  font-weight: 400;
  font-size: 2rem;
  text-decoration: none;
  color: var(--color-text);
  margin: -1rem 0;
}
.site-logo:hover {
  text-decoration: none;
  opacity: 0.8;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.site-nav__link {
  font-size: 0.9375rem;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.12s;
}
.site-nav__link:hover {
  color: var(--color-text);
  text-decoration: none;
}
.site-nav__cta {
  font-size: 0.875rem;
  padding: 0.4375rem 1rem;
}

/* Site footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.site-footer__columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
}
.site-footer__heading {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}
.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.site-footer__links a {
  font-size: 0.9375rem;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.12s;
}
.site-footer__links a:hover {
  color: var(--color-text);
}
.site-footer__copy {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

/* Hero */
.hero {
  padding-top: 5rem;
  padding-bottom: 5rem;
  text-align: center;
}
.hero__title {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.05;
  color: var(--color-text);
  margin-bottom: 1.25rem;
}
.hero__sub {
  font-size: 1.125rem;
  color: var(--color-muted);
  max-width: 560px;
  margin: 0 auto 2rem;
}
.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.feature-grid__item {
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background-color: var(--color-bg);
}
.feature-grid__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}
.feature-grid__body {
  font-size: 0.9375rem;
  color: var(--color-muted);
}

/* Pricing */
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  align-items: start;
}
.pricing-card {
  padding: 2rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background-color: var(--color-bg);
}
.pricing-card--featured {
  border-color: var(--color-primary);
}
.pricing-card__name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.pricing-card__price {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
}
.pricing-card__price .state-tax {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-muted);
  margin-left: 0.5rem;
}
.pricing-card__features {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Portal file row */
.portal-file-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.portal-file-row__name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portal-file-row__meta {
  font-size: 0.75rem;
  color: var(--color-muted);
  white-space: nowrap;
}
.portal-file-row__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-left: auto;
}
.portal-comment-badge {
  margin-left: 0.25rem;
}

/* Portal sidebar */
.portal-hidden {
  display: none;
}
.portal-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 40;
}
.portal-sidebar-overlay.open {
  display: block;
}
.portal-sidebar {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  background: var(--color-bg);
  border-left: 1px solid var(--color-border);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
  z-index: 50;
  flex-direction: column;
  overflow: hidden;
}
.portal-sidebar.open {
  display: flex;
}
.portal-sidebar__header {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.portal-sidebar__header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.portal-sidebar__title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.portal-sidebar__status-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.portal-sidebar__thread {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.portal-sidebar__compose {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Comparison table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.comparison-table th,
.comparison-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}
.comparison-table th {
  font-weight: 600;
  background: var(--color-accent);
}
.comparison-table td:first-child {
  color: var(--color-muted);
}

/* ─── Blog ─────────────────────────────────────────────────── */

.blog-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2.5rem;
}
.blog-header__title {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.blog-header__sub {
  color: var(--color-muted);
  margin: 0;
}
.blog-empty {
  color: var(--color-muted);
  padding: 2rem 0;
}

/* Blog list */
.blog-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}
.blog-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.blog-card__image-wrap {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.blog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-card__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.blog-card__date {
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin: 0;
}
.blog-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}
.blog-card__title a {
  color: var(--color-text);
  text-decoration: none;
}
.blog-card__title a:hover {
  text-decoration: underline;
}
.blog-card__excerpt {
  font-size: 0.9375rem;
  color: var(--color-muted);
  margin: 0;
  flex: 1;
}
.blog-card__tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.blog-card__tag {
  font-size: 0.75rem;
  background: var(--color-accent);
  color: var(--color-muted);
  border-radius: 9999px;
  padding: 0.125rem 0.625rem;
}
.blog-card__read-more {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  margin-top: 0.25rem;
}
.blog-card__read-more:hover {
  text-decoration: underline;
}

/* Blog post */
.blog-post {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}
.blog-post__article {
  min-width: 0;
}
.blog-post__featured {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
  margin-bottom: 2rem;
}
.blog-post__header {
  margin-bottom: 2rem;
}
.blog-post__title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}
.blog-post__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.blog-post__date {
  font-size: 0.875rem;
  color: var(--color-muted);
}
.blog-post__tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.blog-post__tag {
  font-size: 0.75rem;
  background: var(--color-accent);
  color: var(--color-muted);
  border-radius: 9999px;
  padding: 0.125rem 0.625rem;
}

/* Prose styles for rendered Markdown */
.blog-post__content {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-text);
}
.blog-post__content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}
.blog-post__content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
}
.blog-post__content p {
  margin: 0 0 1.25rem;
}
.blog-post__content ul,
.blog-post__content ol {
  margin: 0 0 1.25rem 1.5rem;
}
.blog-post__content li {
  margin-bottom: 0.375rem;
}
.blog-post__content a {
  color: var(--color-text);
  text-decoration: underline;
}
.blog-post__content code {
  font-family: ui-monospace, monospace;
  font-size: 0.875em;
  background: var(--color-accent);
  border-radius: 0.25rem;
  padding: 0.125em 0.375em;
}
.blog-post__content pre {
  background: var(--color-accent);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}
.blog-post__content pre code {
  background: none;
  padding: 0;
}
.blog-post__content blockquote {
  border-left: 3px solid var(--color-border);
  margin: 0 0 1.25rem;
  padding: 0.25rem 0 0.25rem 1rem;
  color: var(--color-muted);
}
.blog-post__content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* Sidebar */
.blog-post__sidebar {
  position: sticky;
  top: 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.blog-sidebar__heading {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  margin: 0 0 1rem;
}
.blog-sidebar__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.blog-sidebar__post {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.blog-sidebar__post--active .blog-sidebar__link {
  font-weight: 600;
}
.blog-sidebar__date {
  font-size: 0.75rem;
  color: var(--color-muted);
}
.blog-sidebar__link {
  font-size: 0.9375rem;
  color: var(--color-text);
  text-decoration: none;
  line-height: 1.35;
}
.blog-sidebar__link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .blog-post {
    grid-template-columns: 1fr;
  }
  .blog-post__sidebar {
    position: static;
  }
}
