:root {
  color-scheme: light;
  --cream: #f7efe2;
  --paper: #fffaf1;
  --paper-deep: #efe0cd;
  --ink: #241f1a;
  --muted: #72665b;
  --line: #decdbb;
  --coral: #d95f45;
  --coral-dark: #aa3f2d;
  --sage: #9cad87;
  --gold: #d6a84f;
  --blue: #557e95;
  --shadow: 0 18px 50px rgb(36 31 26 / 12%);
  font-family: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgb(217 95 69 / 10%), transparent 32%),
    var(--cream);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 28px;
  border-right: 1px solid var(--line);
  background: rgb(255 250 241 / 78%);
  backdrop-filter: blur(18px);
}

.brand h1,
.masthead h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 0.94;
}

.brand h1 {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
}

.masthead h2 {
  max-width: 760px;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral-dark);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.add-feed {
  margin-top: 34px;
}

.add-feed label,
.search-wrap label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 8px;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(217 95 69 / 35%);
  outline-offset: 2px;
}

.input-row button,
.secondary-button,
.icon-button {
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
}

.input-row button {
  min-height: 46px;
  font-size: 1.3rem;
}

.secondary-button {
  padding: 10px 13px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
}

.form-help,
.small-status,
.feed-item p,
.entry-meta,
.entry-summary {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.form-help {
  margin: 10px 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
}

.feed-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 16px;
}

.small-status {
  font-size: 0.82rem;
  white-space: nowrap;
}

.feed-list {
  display: grid;
  gap: 10px;
}

.feed-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255 250 241 / 72%);
}

.feed-item h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.feed-item p {
  margin: 6px 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.feed-item.has-error {
  border-color: rgb(217 95 69 / 55%);
}

.feed-actions {
  display: flex;
  gap: 7px;
}

.content {
  padding: 32px;
}

.masthead {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 360px);
  gap: 24px;
  align-items: end;
  padding: 24px 0 28px;
}

.search-wrap {
  align-self: end;
}

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  margin-bottom: 14px;
  border: 1px solid rgb(85 126 149 / 28%);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgb(255 250 241 / 70%);
  color: var(--blue);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.notice:empty {
  display: none;
}

.notice-success {
  border-color: rgb(156 173 135 / 42%);
  color: #4e6f3f;
}

.notice-error {
  border-color: rgb(170 63 45 / 46%);
  background: rgb(217 95 69 / 10%);
  color: var(--coral-dark);
}

.notice-loading {
  border-color: rgb(85 126 149 / 34%);
  background: rgb(85 126 149 / 9%);
  color: #3f6d86;
}

.notice-spinner {
  width: 0.9rem;
  height: 0.9rem;
  flex: 0 0 auto;
  border: 2px solid rgb(85 126 149 / 24%);
  border-top-color: currentColor;
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.entry-card {
  display: grid;
  grid-template-rows: 170px 1fr;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.entry-image {
  display: grid;
  place-items: center;
  min-width: 0;
  background: var(--fallback, var(--sage));
  background-position: center;
  background-size: cover;
  color: rgb(255 250 241 / 86%);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 3rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.entry-body {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 20px;
}

.entry-meta {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.entry-card h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.entry-card h3 a {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.entry-summary {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.55;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 48px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgb(255 250 241 / 54%);
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.empty-state p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
  line-height: 1.6;
}

.loading-state {
  border-style: solid;
  border-color: rgb(85 126 149 / 28%);
  background: rgb(85 126 149 / 8%);
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1000px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .masthead {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .sidebar,
  .content {
    padding: 20px;
  }

  .feed-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .entry-grid {
    grid-template-columns: 1fr;
  }

  .entry-card {
    min-height: 0;
    grid-template-rows: 140px 1fr;
  }
}
