/*
Theme Name: San Diego Art Index Tier1
Theme URI: https://sandiego-art.org
Author: Linkgujodae
Author URI: https://example.com
Description: Independent web culture index theme for sandiego-art.org with broad category archives, distinct editorial layout, and post-ready category publishing.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: sandiego-art-org
*/

:root {
  --sa-paper: #fbf7ef;
  --sa-paper-deep: #efe5d4;
  --sa-ink: #191715;
  --sa-muted: #675f55;
  --sa-line: rgba(25, 23, 21, 0.18);
  --sa-clay: #b94f32;
  --sa-cobalt: #1e4f91;
  --sa-olive: #687457;
  --sa-butter: #efc45e;
  --sa-white: #fffdf8;
}

* {
  box-sizing: border-box;
}

body.sa-theme-body {
  margin: 0;
  min-height: 100vh;
  background: var(--sa-paper-deep);
  color: var(--sa-ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

body.sa-theme-body a {
  color: inherit;
  text-decoration: none;
}

body.sa-theme-body img {
  max-width: 100%;
  height: auto;
}

.sa-site {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(25, 23, 21, 0.055) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(0deg, rgba(25, 23, 21, 0.04) 1px, transparent 1px) 0 0 / 42px 42px,
    var(--sa-paper);
}

.sa-topline {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1.4fr) minmax(180px, 0.8fr);
  align-items: center;
  gap: 14px;
  padding: 10px clamp(16px, 3vw, 34px);
  background: var(--sa-ink);
  color: var(--sa-paper);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.sa-topline span:nth-child(2) {
  text-align: center;
  color: var(--sa-butter);
}

.sa-topline span:last-child {
  text-align: right;
}

.sa-layout {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  min-height: calc(100vh - 36px);
}

.sa-rail {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: calc(100vh - 36px);
  padding: 28px 22px;
  border-right: 2px solid var(--sa-ink);
  background: rgba(251, 247, 239, 0.9);
}

.admin-bar .sa-rail {
  top: 32px;
}

.sa-brand {
  display: grid;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--sa-line);
}

.sa-logo-link {
  display: inline-flex;
  width: 112px;
  max-width: 100%;
}

.sa-logo-link img {
  display: block;
  width: 112px;
  height: auto;
}

.sa-brand strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 700;
  line-height: 0.98;
}

.sa-brand small {
  display: block;
  margin-top: 8px;
  color: var(--sa-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  word-break: break-word;
}

.sa-menu {
  display: grid;
  gap: 0;
  margin: 22px 0 0;
  border-top: 1px solid var(--sa-ink);
  border-bottom: 1px solid var(--sa-ink);
}

.sa-menu a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 46px;
  padding: 10px 0;
  border-bottom: 1px solid var(--sa-line);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.sa-menu a:last-child {
  border-bottom: 0;
}

.sa-menu em {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--sa-ink);
  border-radius: 50%;
  color: var(--sa-paper);
  background: var(--sa-ink);
  font-style: normal;
  font-size: 11px;
}

.sa-rail-note {
  margin: 24px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--sa-line);
  color: var(--sa-muted);
  font-size: 13px;
  line-height: 1.55;
}

.sa-main {
  padding: clamp(22px, 4vw, 46px);
}

.sa-inner-main {
  display: grid;
  align-content: start;
  gap: 22px;
}

.sa-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: clamp(20px, 4vw, 44px);
  align-items: stretch;
  padding-bottom: 34px;
  border-bottom: 2px solid var(--sa-ink);
}

.sa-hero-copy {
  display: grid;
  align-content: space-between;
  gap: 28px;
  min-height: 410px;
}

.sa-kicker {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--sa-ink);
  background: var(--sa-butter);
  color: var(--sa-ink);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.sa-title {
  max-width: 820px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 8vw, 112px);
  line-height: 0.86;
  font-weight: 700;
}

.sa-lead {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--sa-muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.62;
}

.sa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.sa-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  max-width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--sa-ink);
  background: var(--sa-ink);
  color: var(--sa-paper);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.sa-action.secondary {
  background: var(--sa-white);
  color: var(--sa-ink);
}

.sa-ticket {
  display: grid;
  grid-template-rows: auto 1fr auto;
  border: 2px solid var(--sa-ink);
  background: var(--sa-white);
  box-shadow: 12px 12px 0 var(--sa-cobalt);
}

.sa-ticket-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--sa-ink);
  background: var(--sa-clay);
  color: var(--sa-paper);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
  text-transform: uppercase;
}

.sa-ticket-body {
  padding: 22px;
}

.sa-ticket-body h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 0.98;
}

.sa-ticket-body p {
  margin: 16px 0 0;
  color: var(--sa-muted);
  font-size: 15px;
  line-height: 1.7;
}

.sa-ticket-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--sa-ink);
}

.sa-ticket-grid span {
  min-height: 74px;
  padding: 12px;
  border-right: 1px solid var(--sa-ink);
  border-bottom: 1px solid var(--sa-ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.sa-ticket-grid span:nth-child(2n) {
  border-right: 0;
}

.sa-ticket-grid span:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.sa-section {
  padding: 34px 0 0;
}

.sa-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 420px);
  gap: 20px;
  align-items: end;
  margin-bottom: 18px;
}

.sa-section-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 0.95;
}

.sa-section-head p {
  margin: 0;
  color: var(--sa-muted);
  font-size: 15px;
  line-height: 1.65;
}

.sa-board {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 1fr;
  gap: 12px;
}

.sa-panel {
  min-height: 178px;
  padding: 18px;
  border: 1px solid var(--sa-ink);
  background: var(--sa-white);
  overflow-wrap: anywhere;
}

.sa-panel:nth-child(1) {
  grid-row: span 2;
  background: #f6d3c9;
}

.sa-panel:nth-child(2) {
  background: #e4ecdc;
}

.sa-panel:nth-child(3) {
  grid-row: span 2;
  background: #dfeafa;
}

.sa-panel:nth-child(4) {
  background: #fff0bd;
}

.sa-panel:nth-child(5) {
  background: #f8f5ee;
}

.sa-panel:nth-child(6) {
  background: #e9ddd0;
}

.sa-panel small {
  display: inline-flex;
  margin-bottom: 14px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--sa-ink);
  color: var(--sa-muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.sa-panel h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
}

.sa-panel p {
  margin: 13px 0 0;
  color: var(--sa-muted);
  font-size: 14px;
  line-height: 1.58;
}

.sa-post-links {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(25, 23, 21, 0.2);
}

.sa-post-links a {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.sa-ledger {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.sa-ledger article {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  min-height: 132px;
  border: 1px solid var(--sa-ink);
  background: var(--sa-white);
}

.sa-ledger b {
  display: grid;
  place-items: center;
  padding: 14px;
  border-right: 1px solid var(--sa-ink);
  background: var(--sa-olive);
  color: var(--sa-paper);
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.sa-ledger div {
  padding: 16px;
}

.sa-ledger h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.sa-ledger p {
  margin: 9px 0 0;
  color: var(--sa-muted);
  font-size: 14px;
  line-height: 1.55;
}

.sa-content-panel,
.sa-empty {
  max-width: 960px;
  padding: clamp(22px, 4vw, 38px);
  border: 2px solid var(--sa-ink);
  background: var(--sa-white);
  box-shadow: 10px 10px 0 var(--sa-butter);
  overflow-wrap: anywhere;
}

.sa-content-panel h1 {
  max-width: 860px;
  margin: 18px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.92;
}

.sa-content-panel h2,
.sa-related h2,
.sa-empty h2 {
  margin: 28px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.05;
}

.sa-entry {
  margin-top: 22px;
  color: var(--sa-ink);
  font-size: 17px;
  line-height: 1.78;
}

.sa-entry p,
.sa-entry ul,
.sa-entry ol {
  max-width: 760px;
}

.sa-entry a {
  color: var(--sa-cobalt);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sa-archive-description {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--sa-muted);
  font-size: 17px;
  line-height: 1.65;
}

.sa-archive-list {
  display: grid;
  gap: 12px;
  max-width: 980px;
}

.sa-archive-list article {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--sa-ink);
  background: var(--sa-white);
  overflow-wrap: anywhere;
}

.sa-archive-list time,
.sa-single-meta {
  color: var(--sa-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sa-archive-list h2,
.sa-archive-list h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
}

.sa-archive-list p,
.sa-empty p {
  max-width: 720px;
  margin: 0;
  color: var(--sa-muted);
  font-size: 15px;
  line-height: 1.65;
}

.sa-pagination {
  max-width: 980px;
  padding: 18px;
  border: 1px solid var(--sa-ink);
  background: var(--sa-paper);
  font-size: 14px;
  font-weight: 900;
}

.sa-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 16px;
}

.sa-single-meta a {
  color: var(--sa-cobalt);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sa-featured-image {
  margin-top: 22px;
  border: 1px solid var(--sa-ink);
  overflow: hidden;
}

.sa-featured-image img {
  display: block;
  width: 100%;
}

.sa-related {
  display: grid;
  gap: 12px;
}

.sa-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 36px;
  padding-top: 16px;
  border-top: 2px solid var(--sa-ink);
  color: var(--sa-muted);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 960px) {
  .sa-layout {
    grid-template-columns: 1fr;
  }

  .sa-rail {
    position: static;
    min-height: auto;
    border-right: 0;
    border-bottom: 2px solid var(--sa-ink);
  }

  .admin-bar .sa-rail {
    top: 0;
  }

  .sa-brand {
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
  }

  .sa-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
  }

  .sa-hero,
  .sa-section-head,
  .sa-ledger {
    grid-template-columns: 1fr;
  }

  .sa-hero-copy {
    min-height: auto;
  }

  .sa-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 782px) {
  .admin-bar .sa-rail {
    top: 0;
  }
}

@media (max-width: 640px) {
  .sa-topline {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .sa-topline span:nth-child(2),
  .sa-topline span:last-child {
    text-align: left;
  }

  .sa-main,
  .sa-rail {
    padding: 18px;
  }

  .sa-brand {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .sa-logo-link,
  .sa-logo-link img {
    width: 88px;
  }

  .sa-menu,
  .sa-board,
  .sa-ticket-grid,
  .sa-ledger article {
    grid-template-columns: 1fr;
  }

  .sa-ticket {
    box-shadow: 8px 8px 0 var(--sa-cobalt);
  }

  .sa-ticket-grid span,
  .sa-ticket-grid span:nth-child(2n),
  .sa-ticket-grid span:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--sa-ink);
  }

  .sa-ticket-grid span:last-child {
    border-bottom: 0;
  }

  .sa-ledger b {
    border-right: 0;
    border-bottom: 1px solid var(--sa-ink);
  }

  .sa-content-panel,
  .sa-empty {
    box-shadow: 6px 6px 0 var(--sa-butter);
  }
}
