:root {
  color-scheme: light;
  --bg: #f7f4ef;
  --panel: #fffdf8;
  --ink: #22201d;
  --muted: #726c62;
  --line: #ded7cb;
  --accent: #256f5c;
  --accent-strong: #1f5d4d;
  --danger: #a63d40;
  --shadow: 0 16px 48px rgba(35, 31, 26, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(32px, 6vw, 64px);
  line-height: 0.95;
}

h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.account {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  color: var(--muted);
  font-size: 14px;
}

.account img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.login,
.entry-form,
.entries {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
}

.login p {
  margin-bottom: 0;
  color: var(--muted);
}

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

.entry-form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 12px 13px;
}

textarea {
  resize: vertical;
}

.file-row input {
  padding: 10px;
}

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

.form-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

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

.button.ghost {
  background: transparent;
}

.entries {
  min-height: 360px;
  overflow: hidden;
}

.entries-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
}

.entries-head h2 {
  margin: 0;
}

.entry-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  background: var(--panel);
  padding: 18px 20px;
}

.entry h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.entry a {
  color: var(--accent-strong);
  overflow-wrap: anywhere;
}

.entry p {
  margin: 10px 0 0;
  color: var(--muted);
  white-space: pre-wrap;
}

.entry time {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.entry-actions {
  display: flex;
  gap: 8px;
  align-items: start;
}

.entry-actions .button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.entry-actions .danger {
  color: var(--danger);
}

.empty {
  background: var(--panel);
  color: var(--muted);
  padding: 32px 20px;
}

@media (max-width: 840px) {
  .topbar,
  .login,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

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