/* PracticeLaunch Setup */

:root {
  --accent: #6588fd;
  --accent-hover: #4f73f0;
  --bg-deep: #1a0f2e;
  --bg-mid: #2a1848;
  --bg-navy: #0f1a3a;
  --text: #2e2525;
  --text-muted: #6b6565;
  --border: #d0d0d0;
  --card: #ffffff;
  --error: #b94141;
  --required: #8b3a3a;
  --prompt-bg: #1a1528;
  --prompt-border: rgba(255, 255, 255, 0.35);
  --radius: 12px;
  --font-display: "Outfit", sans-serif;
  --font-body: "Source Sans 3", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(ellipse at 20% 0%, #3d1f6b 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, #1a2a5c 0%, transparent 45%),
    linear-gradient(160deg, var(--bg-deep) 0%, var(--bg-navy) 55%, #0a1228 100%);
  background-attachment: fixed;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  padding: 1.25rem 1.5rem;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.logo img {
  display: block;
  height: 40px;
  width: auto;
}
.site-nav ul {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.15s ease;
}
.site-nav a:hover,
.site-nav a.is-active {
  color: var(--accent);
}

/* Main */
.site-main {
  max-width: 920px;
  margin: 0 auto;
  padding: 0.5rem 1.25rem 3rem;
}

.page-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2.25rem 2.5rem 2.75rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.page-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.page-intro {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.required-note {
  margin: 0 0 1.75rem;
  color: var(--required);
  font-size: 0.9rem;
}

/* Import panel */
.import-section {
  background: #f4f6ff;
  border: 1px solid #d7defc;
  border-radius: 8px;
  padding: 1.25rem 1.35rem 1.35rem !important;
  margin-bottom: 0.5rem;
  border-top: none !important;
}
.import-section h3 {
  color: var(--accent);
}
.import-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
}
.import-url-field {
  flex: 1 1 280px;
  margin-bottom: 0 !important;
}
.import-status {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 6px;
  font-size: 0.92rem;
}
.import-status.is-loading {
  background: #eef2ff;
  color: #3a4a8c;
  border: 1px solid #c8d2f5;
}
.import-status.is-success {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}
.import-status.is-error {
  background: #fdeaea;
  color: var(--error);
  border: 1px solid #f5c2c2;
}
.import-status ul {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}
#btn-import-site:disabled {
  opacity: 0.65;
  cursor: wait;
}
.field.was-imported input,
.field.was-imported textarea,
.field.was-imported select {
  box-shadow: 0 0 0 2px rgba(101, 136, 253, 0.35);
  border-color: var(--accent);
}

/* Form sections */
.form-section {
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}
.form-section:first-of-type {
  border-top: none;
  padding-top: 0;
}
.form-section h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}
.section-desc {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.section-desc a {
  color: var(--accent);
  font-weight: 700;
}

.field {
  margin-bottom: 1.15rem;
}
.field label,
.field .field-label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.field .req {
  color: var(--error);
}
.field-desc {
  margin: 0 0 0.4rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.field-desc a {
  color: var(--accent);
  font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(101, 136, 253, 0.2);
}
textarea {
  min-height: 90px;
  resize: vertical;
}
textarea.tall {
  min-height: 140px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 720px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .page-card {
    padding: 1.5rem 1.25rem 2rem;
  }
}

.address-grid .addr-city-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 720px) {
  .address-grid .addr-city-row {
    grid-template-columns: 1fr;
  }
}

.choice-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.choice-list.inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}
.choice-list label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
}
.choice-list input {
  width: auto;
  accent-color: var(--accent);
}

.color-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.color-field input[type="color"] {
  width: 44px;
  height: 44px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  background: #fff;
}
.color-field input[type="text"] {
  flex: 1;
}

/* List / repeater */
.list-field .list-rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.list-row {
  display: grid;
  gap: 0.5rem;
  align-items: start;
  padding: 0.75rem;
  background: #f8f8f8;
  border-radius: 6px;
  border: 1px solid #eee;
}
.list-row.cols-1 { grid-template-columns: 1fr auto; }
.list-row.cols-2 { grid-template-columns: 1fr 1fr auto; }
.list-row.cols-3 { grid-template-columns: 1fr 1fr 1fr auto; }
.list-row.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr auto; }
@media (max-width: 800px) {
  .list-row.cols-2,
  .list-row.cols-3,
  .list-row.cols-4 {
    grid-template-columns: 1fr;
  }
}
.list-row .col-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.btn-remove-row {
  align-self: end;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  color: var(--error);
  font-size: 0.85rem;
}
.btn-add-row {
  margin-top: 0.5rem;
  background: transparent;
  border: 1px dashed var(--accent);
  color: var(--accent);
  border-radius: 4px;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.btn-add-row:hover {
  background: rgba(101, 136, 253, 0.08);
}

.field.is-hidden,
.form-section.is-hidden {
  display: none !important;
}

.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: var(--error);
}
.error-msg {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}
.alert {
  padding: 0.85rem 1rem;
  border-radius: 6px;
  margin-bottom: 1.25rem;
}
.alert-error {
  background: #fdeaea;
  color: var(--error);
  border: 1px solid #f5c2c2;
}
.alert-success {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}
.btn-primary {
  appearance: none;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.85rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.5rem;
}
.save-panel {
  width: 100%;
  margin-top: 0.5rem;
  padding: 1rem;
  background: #f4f6ff;
  border-radius: 6px;
  display: none;
}
.save-panel.is-open {
  display: block;
}

/* Brief pages */
.brief-page .page-title {
  margin-bottom: 1rem;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.copy-btn.copied {
  background: #2e7d32;
}
.prompt-box {
  background: var(--prompt-bg);
  border: 1px solid var(--prompt-border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  color: #f0f0f0;
  font-size: 0.95rem;
  line-height: 1.65;
  overflow-x: auto;
}
.prompt-box h2 {
  color: #fff;
  font-family: var(--font-display);
  margin: 1.75rem 0 0.75rem;
  font-size: 1.35rem;
}
.prompt-box h3 {
  color: #c8d4ff;
  margin: 1.25rem 0 0.5rem;
  font-size: 1.1rem;
}
.prompt-box a {
  color: var(--accent);
}
.prompt-box strong {
  color: #fff;
}
.prompt-box hr,
.prompt-box .sep {
  border: none;
  border-top: 1px dotted rgba(255, 255, 255, 0.3);
  margin: 1.5rem 0;
}
.prompt-box table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 1rem 0;
}
.prompt-box th,
.prompt-box td {
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.4rem 0.5rem;
  text-align: left;
}
.prompt-box ul,
.prompt-box ol {
  padding-left: 1.25rem;
}

.archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.archive-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid #eee;
}
.archive-list li:last-child {
  border-bottom: none;
}
.archive-list a {
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
}
.archive-list a:hover {
  text-decoration: underline;
}
.archive-meta {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.archive-excerpt {
  margin: 0.5rem 0 0;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.empty-state {
  color: var(--text-muted);
  padding: 2rem 0;
}

/* ---------- Drag & drop file uploads ---------- */
.upload-stack {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.file-dropzone-field {
  margin-bottom: 1.15rem;
}
.file-dropzone {
  position: relative;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #fafbff 0%, #fff 100%);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.file-dropzone.is-dragover {
  border-color: var(--accent);
  background: rgba(101, 136, 253, 0.08);
  box-shadow: 0 0 0 3px rgba(101, 136, 253, 0.15);
}
.file-dropzone.has-files {
  border-style: solid;
  border-color: #c5c9d6;
}
.file-dropzone-surface {
  position: relative;
  padding: 1.35rem 1.25rem;
  text-align: center;
}
.file-dropzone-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.file-dropzone-prompt,
.file-dropzone-formats {
  position: relative;
  z-index: 0;
  pointer-events: none;
}
.file-dropzone-prompt {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}
.file-dropzone-browse {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.file-dropzone-formats {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.file-dropzone-list {
  list-style: none;
  margin: 0;
  padding: 0 0.75rem 0.75rem;
  display: grid;
  gap: 0.4rem;
}
.file-dropzone-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 0.9rem;
}
.file-dropzone-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.file-dropzone-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}
.file-dropzone-remove {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
.file-dropzone-remove:hover,
.file-dropzone-remove:focus-visible {
  color: var(--error);
  background: rgba(185, 65, 65, 0.08);
  outline: none;
}

.site-footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}
.site-footer a {
  color: rgba(255, 255, 255, 0.7);
}
