/* The home page's own pieces (home/templates/home/index.html). Tokens and
   shared components (.aw-panel, .aw-pill, .aw-tag...) are in theme.css. */
/* Intro */
.aw-hero { padding: 64px 0 44px; }
.aw-hero p {
  margin: 0; max-width: 1020px;
  font-family: var(--aw-serif); font-weight: 400;
  font-size: clamp(36px, 5.2vw, 60px); line-height: 1.04; letter-spacing: -0.02em;
  text-wrap: balance;
}
.aw-hero em { color: var(--aw-accent); }

/* Papers table */
.aw-table-cols {
  display: grid; gap: 0 18px; align-items: center;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1.7fr) 52px minmax(0, 1fr) 92px 112px minmax(0, 1.5fr);
}
.aw-thead {
  padding: 12px 24px; border-bottom: 1px solid var(--aw-line);
  font-family: var(--aw-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--aw-muted);
}
.aw-row { padding: 14px 24px; border-bottom: 1px solid var(--aw-line); transition: background .15s ease; }
.aw-row:last-child { border-bottom: 0; }
.aw-row:hover { background: color-mix(in srgb, var(--aw-panel-2) 70%, transparent); }
.aw-row h3 { margin: 0; font-family: var(--aw-sans); font-size: 15px; font-weight: 500; line-height: 1.35; letter-spacing: -0.005em; text-wrap: pretty; overflow-wrap: anywhere; }
.aw-row h3 a, .aw-tile h3 a { color: var(--aw-text); }
.aw-row h3 a:hover, .aw-tile h3 a:hover { color: var(--aw-accent); }
.aw-row .aw-authors, .aw-row .aw-journal { font-size: 13px; line-height: 1.4; color: var(--aw-muted); overflow-wrap: anywhere; }
.aw-row .aw-year { font-family: var(--aw-mono); font-size: 12.5px; }
.aw-cats { display: flex; flex-wrap: wrap; gap: 5px; }

@media (max-width: 1000px) {
  .aw-thead { display: none; }
  .aw-row.aw-table-cols { grid-template-columns: auto auto 1fr; gap: 8px 10px; align-items: baseline; }
  .aw-row h3, .aw-row .aw-authors, .aw-row .aw-cats { grid-column: 1 / -1; }
  .aw-row .aw-journal { grid-column: 2 / -1; }
  .aw-row .aw-cats:empty { display: none; }
  .aw-row .aw-tag.is-none { display: none; }
}

/* arXiv tiles */
.aw-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 1px; background: var(--aw-line); }
.aw-tile { background: var(--aw-panel); padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; transition: background .15s ease; }
.aw-tile:hover { background: color-mix(in srgb, var(--aw-panel-2) 70%, var(--aw-panel)); }
.aw-tile .aw-date { font-family: var(--aw-mono); font-size: 11.5px; color: var(--aw-accent); }
.aw-tile h3 { margin: 0; font-family: var(--aw-sans); font-size: 15px; font-weight: 500; line-height: 1.38; text-wrap: pretty; overflow-wrap: anywhere; }
.aw-tile h3 a::after { content: " ↗"; color: var(--aw-muted); font-size: .85em; }
.aw-tile p { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--aw-muted); }

/* Literature notes */
.aw-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 1px; background: var(--aw-line); align-items: stretch; }
.aw-note { background: var(--aw-panel); padding: 26px 26px 30px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.aw-note-book { font-family: var(--aw-serif); font-style: italic; font-size: 22px; line-height: 1.1; color: var(--aw-accent); }
.aw-note-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 6px; font-family: var(--aw-mono); font-size: 11px; color: var(--aw-muted); }
.aw-note h3 { margin: 0; font-family: var(--aw-sans); font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; }

/* Note body: HTML from literature/js/note_render.js (no classes inside). */
.aw-note-body { position: relative; font-size: 14px; line-height: 1.62; overflow-wrap: anywhere; }
.aw-note-body > * { margin: 0 0 14px; }
.aw-note-body > :last-child { margin-bottom: 0; }
.aw-note-body p { text-wrap: pretty; }
.aw-note-body h1, .aw-note-body h2, .aw-note-body h3, .aw-note-body h4, .aw-note-body h5, .aw-note-body h6 {
  margin: 20px 0 14px; padding-top: 14px; border-top: 1px solid var(--aw-line);
  font-family: var(--aw-mono); font-weight: 400; font-size: 11px; line-height: 1.4;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--aw-muted);
}
.aw-note-body > :first-child { margin-top: 0; }
.aw-note-body ul, .aw-note-body ol { padding-left: 18px; line-height: 1.5; }
.aw-note-body li + li { margin-top: 7px; }
.aw-note-body li > p { margin: 0; }
.aw-note-body strong { font-weight: 600; }
.aw-note-body img { display: block; max-width: 100%; height: auto; border-radius: var(--aw-radius-sm); background: var(--aw-panel-2); }
.aw-note-body .latex-block {
  padding: 14px; border-radius: var(--aw-radius-sm); background: var(--aw-soft); color: var(--aw-soft-text);
  overflow-x: auto; overflow-y: hidden;
}
.aw-note-body .latex-block .katex-display { margin: 0; }
.aw-note-body pre, .aw-note-body code { font-family: var(--aw-mono); font-size: 12px; }
.aw-note-body pre { padding: 14px; border-radius: var(--aw-radius-sm); background: var(--aw-panel-2); line-height: 1.6; overflow-x: auto; white-space: pre; }
.aw-note-body blockquote { padding-left: 14px; border-left: 2px solid var(--aw-accent); color: var(--aw-muted); }
.aw-note-body .note-error { color: var(--aw-muted); font-style: italic; }

/* Long notes are clipped with a fade; the button shows the rest in place. */
.aw-note-body.is-clipped { max-height: 460px; overflow: hidden; }
.aw-note-body.is-clipped::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 96px; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--aw-panel));
}
.aw-more {
  align-self: flex-start; min-height: 40px; padding: 0 16px; margin-top: -2px;
  background: none; border: 1px solid var(--aw-line); border-radius: 999px;
  color: var(--aw-text); font: 500 13px/1 var(--aw-sans); cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.aw-more:hover { border-color: var(--aw-accent); color: var(--aw-accent); }


@media (max-width: 760px) {
  .aw-hero { padding: 40px 0 28px; }
  .aw-thead, .aw-row { padding-left: 16px; padding-right: 16px; }
  .aw-tile { padding: 18px 16px 20px; }
  .aw-note { padding: 22px 16px 24px; }
}
