@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/public/fonts/google-sans-400.ttf") format("truetype");
}

@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/public/fonts/google-sans-500.ttf") format("truetype");
}

@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/public/fonts/google-sans-700.ttf") format("truetype");
}

:root {
  color-scheme: light;
  --bg: #f8f6f4;
  --surface: #fbfcfb;
  --surface-strong: #ffffff;
  --ink: #1e2524;
  --muted: #66706d;
  --line: #e2dad5;
  --accent: #BA8563;
  --accent-strong: #BA8563;
  --gold: #b9862e;
  --danger: #a33f32;
  --shadow: 0 20px 55px rgba(34, 43, 39, 0.12);
  font-family: "Google Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(186, 133, 99, 0.1), rgba(185, 134, 46, 0.08)),
    var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 6px;
  font-size: 1.2rem;
}

.stat {
  min-width: 118px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  text-align: right;
}

.stat span {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.stat small {
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.form-panel,
.list-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.form-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 22px;
}

.panel-heading,
.field-wide,
.form-actions {
  grid-column: 1 / -1;
}

.panel-heading p,
.list-header p {
  margin-bottom: 0;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 7px;
}

fieldset.field {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.field span {
  color: #46514d;
  font-size: 15px;
  font-weight: 100;
}

.radio-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.radio-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid #d9c6bb;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  font-weight: 100;
  padding: 8px 12px;
}

.radio-options label:has(input:checked) {
  border-color: rgba(186, 133, 99, 0.45);
  background: #f7eee9;
  color: var(--accent-strong);
}

.radio-options input[type="radio"] {
  appearance: auto;
  flex: 0 0 auto;
  width: 14px;
  min-height: 14px;
  height: 14px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 0;
  accent-color: var(--accent);
}

.radio-options input[type="radio"]:focus {
  box-shadow: none;
}

.radio-options label:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(186, 133, 99, 0.16);
}

.radio-options span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfd9d6;
  border-radius: 7px;
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 100;
  outline: none;
  padding: 10px 12px;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(186, 133, 99, 0.16);
}

select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(186, 133, 99, 0.16);
}

select {
  appearance: none;
}

.native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.custom-select {
  position: relative;
  min-width: 0;
}

.custom-select-trigger {
  display: grid;
  grid-template-columns: 1fr 38px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  border: 1px solid #d9c6bb;
  border-radius: 7px;
  background: linear-gradient(180deg, #ffffff, #fbf6f3);
  color: var(--accent-strong);
  cursor: pointer;
  font-size: 15px;
  font-weight: 100;
  padding: 0 0 0 12px;
  text-align: left;
}

.custom-select-trigger:hover {
  border-color: #c49d86;
  background: linear-gradient(180deg, #ffffff, #f7eee9);
}

.custom-select.is-open .custom-select-trigger,
.custom-select-trigger:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(186, 133, 99, 0.16);
  outline: none;
}

.custom-select-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-icon {
  display: grid;
  place-items: center;
  align-self: stretch;
  border-left: 1px solid #e6d9d1;
  background: rgba(186, 133, 99, 0.06);
}

.custom-select-icon::before {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--accent-strong);
  border-bottom: 2px solid var(--accent-strong);
  content: "";
  transform: translateY(-2px) rotate(45deg);
}

.custom-select.is-open .custom-select-icon::before {
  transform: translateY(2px) rotate(225deg);
}

.custom-select-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: none;
  max-height: 280px;
  overflow: auto;
  border: 1px solid rgba(186, 133, 99, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(30, 37, 36, 0.18);
  padding: 6px;
}

.custom-select.is-open .custom-select-menu {
  display: grid;
  gap: 3px;
}

.custom-select-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  font-weight: 100;
  padding: 8px 10px;
  text-align: left;
}

.custom-select-speaker .custom-select-option:not([data-value=""])::before {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  background: transparent;
  content: "";
}

.custom-select-speaker .custom-select-option[aria-selected="true"]:not([data-value=""])::before {
  background: radial-gradient(circle, currentColor 0 38%, transparent 42%);
}

.custom-select-option:hover {
  background: #faf2ed;
  color: var(--accent-strong);
}

.custom-select-option[aria-selected="true"] {
  background: var(--accent);
  color: white;
}

.custom-select-filter .custom-select-trigger {
  min-height: 44px;
  background: linear-gradient(180deg, #fffdfc, #f7eee9);
}

input[type="file"] {
  min-height: 52px;
  cursor: pointer;
  padding: 12px;
}

input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 12px;
  border: 0;
  border-radius: 6px;
  background: #f2e5dd;
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: 800;
  padding: 6px 10px;
}

.file-field::after {
  min-height: 18px;
  color: var(--muted);
  content: attr(data-file-count);
  font-size: 0.82rem;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
}

.form-buttons,
.talk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

#form-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 800;
  padding: 10px 18px;
}

button:hover {
  background: var(--accent-strong);
}

.button-secondary {
  border: 1px solid var(--line);
  background: #f7eee9;
  color: var(--accent-strong);
}

.button-secondary:hover {
  background: #efdcd0;
}

.danger-button {
  border: 1px solid rgba(163, 63, 50, 0.22);
  background: #fff0ed;
  color: var(--danger);
}

.danger-button:hover {
  background: #f8d8d2;
}

.list-panel {
  min-width: 0;
  padding: 22px;
}

.list-header {
  display: grid;
  grid-template-columns: 1fr minmax(560px, 760px);
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.list-filters {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(180px, 240px) minmax(160px, 1fr);
  gap: 10px;
}

.talk-list {
  display: grid;
  gap: 12px;
}

.talk-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 16px;
}

.talk-date {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 92px;
  border-radius: 7px;
  background: #f6ece6;
  color: var(--accent-strong);
  text-align: center;
}

.talk-date strong {
  font-size: 1.75rem;
  line-height: 1;
}

.talk-date span {
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

.talk-date small {
  color: var(--muted);
}

.talk-content {
  min-width: 0;
}

.talk-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.talk-card h3 {
  margin-bottom: 0;
  font-size: 1.06rem;
  line-height: 1.32;
}

.tag {
  flex: 0 0 auto;
  max-width: 210px;
  border: 1px solid rgba(185, 134, 46, 0.4);
  border-radius: 999px;
  background: rgba(185, 134, 46, 0.12);
  color: #76541c;
  font-size: 0.78rem;
  font-weight: 800;
  overflow: hidden;
  padding: 5px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.publish-button {
  border: 1px solid #d9c7a8;
  background: #fff8ea;
  color: #76541c;
}

.publish-button[aria-pressed="true"] {
  border-color: rgba(186, 133, 99, 0.3);
  background: #f4e7df;
  color: var(--accent-strong);
}

.publish-button:hover {
  background: #f4ead5;
}

.publish-button[aria-pressed="true"]:hover {
  background: #ecd8cc;
}

.talk-card.is-published {
  border-color: rgba(186, 133, 99, 0.36);
  box-shadow: inset 4px 0 0 var(--accent);
}

dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0;
}

dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  min-width: 0;
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.talk-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.talk-links a,
.link-note,
.talk-files a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.link-note {
  font-weight: 100;
}

.talk-links a:hover,
.talk-files a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.talk-files {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.talk-files strong {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.talk-files a {
  width: fit-content;
  overflow-wrap: anywhere;
}

.empty {
  border: 1px dashed #cfc8bc;
  border-radius: 8px;
  margin: 0;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .form-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .app-shell {
    width: min(100% - 24px, 1440px);
    padding-top: 22px;
  }

  .page-header,
  .list-header,
  .talk-topline {
    align-items: stretch;
    flex-direction: column;
  }

  .page-header,
  .talk-topline {
    display: flex;
  }

  .list-header,
  .form-panel,
  .list-filters,
  dl {
    grid-template-columns: 1fr;
  }

  .talk-card {
    grid-template-columns: 1fr;
  }

  .talk-date {
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    gap: 8px;
    min-height: 0;
    padding: 12px;
  }

  .tag {
    max-width: none;
    width: fit-content;
  }

  .form-actions,
  .form-buttons,
  .talk-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Minimal table layout */
:root {
  --bg: #faf8f6;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --ink: #1f2523;
  --muted: #6b7370;
  --line: #e8ded8;
  --accent: #BA8563;
  --accent-strong: #BA8563;
  --shadow: 0 10px 30px rgba(31, 37, 35, 0.06);
}

body {
  background: var(--bg);
}

.app-shell {
  width: min(1480px, calc(100% - 56px));
  padding: 42px 0 64px;
}

.page-header {
  margin-bottom: 34px;
}

h1 {
  font-size: clamp(2.2rem, 3.4vw, 3.7rem);
  line-height: 1;
}

.stat,
.form-panel,
.list-panel {
  background: var(--surface);
  box-shadow: none;
}

.stat {
  padding: 18px 20px;
}

.workspace {
  gap: 28px;
}

.form-panel {
  gap: 20px 18px;
  padding: 30px;
}

.list-panel {
  padding: 26px;
}

input,
select,
.custom-select-trigger {
  border-color: #d8dfdc;
  background: #ffffff;
}

.custom-select-trigger,
.custom-select-filter .custom-select-trigger {
  background: #ffffff;
}

.custom-select-trigger:hover,
.custom-select-filter .custom-select-trigger:hover {
  background: #fffaf7;
}

.custom-select-icon {
  background: #faf3ef;
}

.list-header {
  grid-template-columns: 1fr minmax(620px, 820px);
  margin-bottom: 22px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.talk-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  table-layout: fixed;
}

.talk-table th,
.talk-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  vertical-align: top;
  text-align: left;
}

.talk-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fbfcfc;
  color: #68716e;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.talk-table th:nth-child(1),
.talk-table td:nth-child(1) {
  width: 104px;
}

.talk-table th:nth-child(2),
.talk-table td:nth-child(2) {
  width: 330px;
}

.talk-table th:nth-child(3),
.talk-table td:nth-child(3) {
  width: 140px;
}

.talk-table th:nth-child(4),
.talk-table td:nth-child(4) {
  width: 120px;
}

.talk-table th:nth-child(5),
.talk-table td:nth-child(5) {
  width: 230px;
}

.talk-table th:nth-child(6),
.talk-table td:nth-child(6) {
  width: 140px;
}

.talk-table th:nth-child(7),
.talk-table td:nth-child(7) {
  width: 72px;
}

.talk-table th:nth-child(8),
.talk-table td:nth-child(8) {
  width: 76px;
}

.talk-row {
  background: #ffffff;
}

.talk-row:hover {
  background: #fffaf7;
}

.talk-row:last-child td {
  border-bottom: 0;
}

.talk-row td:first-child {
  background-image: linear-gradient(to bottom, transparent, transparent);
  background-position: left top;
  background-repeat: no-repeat;
  background-size: 3px 100%;
  padding-left: 12px;
}

.talk-row.is-published td:first-child {
  background-image: linear-gradient(to bottom, #BA8563, #BA8563);
}

.date-cell {
  color: #37423f;
  font-size: 15px;
  font-weight: 100;
  white-space: nowrap;
}

.title-stack,
.meta-stack {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.status-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.talk-row h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.35;
}

.talk-row h3,
.meta-stack span,
.meta-stack small,
.talk-links a,
.link-note,
.talk-files a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.talk-row h3,
.meta-stack span {
  -webkit-line-clamp: 2;
}

.meta-stack small,
.talk-links a,
.link-note,
.talk-files a {
  -webkit-line-clamp: 1;
}

.talk-row td {
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.meta-stack small {
  color: var(--muted);
  font-size: 0.83rem;
}

.talk-links,
.talk-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
}

.talk-links a,
.link-note,
.talk-files a {
  font-size: 0.86rem;
}

.tag {
  max-width: 116px;
  border-color: #e5d6bd;
  background: #fffaf2;
  font-size: 0.72rem;
  padding: 4px 8px;
}

.talk-actions {
  justify-content: flex-end;
  gap: 8px;
}

.icon-button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
}

.icon-button svg {
  width: 16px;
  height: 16px;
}

.empty-row td {
  padding: 36px 18px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .app-shell {
    width: min(100% - 28px, 1480px);
  }

  .list-header {
    grid-template-columns: 1fr;
  }

  .list-filters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .form-panel,
  .list-panel {
    padding: 20px;
  }

  .form-actions,
  .form-buttons {
    align-items: stretch;
    flex-direction: column;
  }

  .talk-actions {
    align-items: center;
    flex-direction: row;
    justify-content: flex-end;
  }
}
