:root {
  --cream: #f3e7d0;
  --cream-light: #fbf7ef;
  --ink: #25291c;
  --muted: #69705e;
  --line: #d9d8bd;
  --lime: #e6e49f;
  --sage: #cccfae;
  --brown: #a8794f;
  --white: #fffdf8;
  --danger: #9e3e33;
  --shadow: 0 18px 60px rgba(37, 41, 28, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream-light);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% 0%, rgba(230, 228, 159, 0.5), transparent 34rem),
    var(--cream-light);
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 82px;
  padding: 1rem clamp(1.25rem, 4vw, 4rem);
  border-bottom: 1px solid rgba(37, 41, 28, 0.12);
  background: rgba(251, 247, 239, 0.88);
  backdrop-filter: blur(16px);
}

.brand,
.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50% 50% 46% 54%;
  color: var(--cream);
  background: var(--ink);
  font-family: Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  transform: rotate(-3deg);
}

.brand-mark.large {
  width: 54px;
  height: 54px;
  font-size: 1.8rem;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.05;
}

.brand strong {
  font-family: Georgia, serif;
  font-size: 1.15rem;
}

.brand small {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.account-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.account-name {
  color: var(--muted);
  font-size: 0.9rem;
}

.page-container {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6.5rem) 0;
}

.page-heading {
  max-width: 700px;
  margin-bottom: 2.5rem;
}

.page-heading h1,
.detail-heading h1,
.login-copy h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.page-heading h1 {
  font-size: clamp(2.75rem, 7vw, 5rem);
}

.page-heading > p:last-child,
.panel-heading p,
.login-copy > p:last-child {
  color: var(--muted);
  line-height: 1.65;
}

.eyebrow,
.client-name {
  margin: 0 0 0.7rem;
  color: var(--brown);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.website-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
}

.website-card,
.editor-panel,
.login-card {
  border: 1px solid rgba(37, 41, 28, 0.13);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.website-card {
  display: flex;
  min-height: 295px;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.6rem;
  border-radius: 24px;
}

.website-card h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 1.75rem;
  font-weight: 500;
}

.domain {
  color: var(--muted);
}

.card-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  color: #506044;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #718961;
  box-shadow: 0 0 0 4px rgba(113, 137, 97, 0.15);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}

.button-primary {
  color: var(--cream-light);
  background: var(--ink);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #3b402e;
}

.button-quiet {
  border: 1px solid rgba(37, 41, 28, 0.18);
  color: var(--ink);
  background: transparent;
}

.button-full {
  width: 100%;
}

.back-link {
  display: inline-flex;
  gap: 0.45rem;
  margin-bottom: 2.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.detail-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.detail-heading h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}

.role-badge {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  color: var(--ink);
  background: var(--lime);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.editor-panel {
  overflow: hidden;
  border-radius: 28px;
}

.panel-heading {
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border-bottom: 1px solid var(--line);
  background: rgba(243, 231, 208, 0.45);
}

.panel-heading h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 1.8rem;
  font-weight: 500;
}

.panel-heading p {
  margin-bottom: 0;
}

.content-form {
  padding: clamp(1.5rem, 4vw, 2.4rem);
}

.content-section {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
}

.content-section + .content-section {
  margin-top: 1.25rem;
}

.content-section-heading {
  margin-bottom: 1.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.content-section-heading .eyebrow {
  margin-bottom: 0.35rem;
}

.content-section-heading h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 1.45rem;
  font-weight: 500;
}

.field-group + .field-group {
  margin-top: 1.6rem;
}

.field-group label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.88rem;
  font-weight: 750;
}

.field-help {
  margin: -0.25rem 0 0.7rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.content-input,
.login-form input {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid #c7c8ad;
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: var(--white);
}

textarea.content-input {
  resize: vertical;
  line-height: 1.6;
}

.content-input:focus,
.login-form input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(230, 228, 159, 0.55);
}

.readonly-value {
  padding: 1rem;
  border-radius: 12px;
  color: var(--muted);
  background: #f2f0e7;
  line-height: 1.6;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

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

.message-list {
  position: fixed;
  z-index: 10;
  top: 96px;
  right: 1.5rem;
}

.message {
  margin: 0;
  padding: 0.9rem 1.1rem;
  border: 1px solid #aeb587;
  border-radius: 12px;
  background: var(--lime);
  box-shadow: var(--shadow);
  font-weight: 700;
}

.form-error,
.field-error {
  color: var(--danger);
}

.form-error {
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: #f7e4df;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 4rem 2rem;
  border: 1px dashed #b9b99e;
  border-radius: 24px;
  text-align: center;
}

.empty-state.compact {
  margin: 2rem;
  padding: 2.5rem 1.5rem;
}

.empty-state h2,
.empty-state h3 {
  font-family: Georgia, serif;
  font-weight: 500;
}

.empty-state p {
  color: var(--muted);
}

.empty-mark {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--cream);
  background: var(--ink);
  font-family: Georgia, serif;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1.25rem;
}

.login-card {
  width: min(100%, 470px);
  padding: clamp(1.75rem, 6vw, 3rem);
  border-radius: 30px;
}

.login-brand {
  margin-bottom: 3rem;
}

.login-brand p {
  font-family: Georgia, serif;
  font-size: 1.1rem;
}

.login-copy h1 {
  font-size: clamp(2.25rem, 8vw, 3.35rem);
  line-height: 1.02;
}

.login-form {
  margin-top: 2rem;
}

.login-help {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 640px) {
  .topbar {
    min-height: 72px;
  }

  .account-name {
    display: none;
  }

  .page-container {
    width: min(100% - 1.5rem, 1120px);
    padding-top: 2.5rem;
  }

  .detail-heading,
  .detail-actions,
  .form-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .message-list {
    right: 0.75rem;
    left: 0.75rem;
  }
}
