:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #66717d;
  --line: #d9e1e8;
  --paper: #ffffff;
  --wash: #f4f7f9;
  --brand: #146a7c;
  --brand-dark: #0f4f5d;
  --accent: #f4b84a;
  --success: #287c52;
  --shadow: 0 20px 60px rgba(23, 33, 43, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #edf4f6 0%, #f8fafb 44%, #ffffff 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.amazon-link {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 700;
}

button:hover,
.amazon-link:hover {
  background: var(--brand-dark);
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 12px 2px;
}

.topbar__label {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
}

.language-picker {
  width: min(290px, 100%);
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.language-picker select {
  min-height: 42px;
  padding: 9px 36px 9px 12px;
  background-color: #fff;
}

.hero {
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  align-items: center;
  gap: 36px;
  padding: 38px clamp(22px, 5vw, 56px);
  background:
    radial-gradient(circle at 90% 10%, rgba(244, 184, 74, 0.24), transparent 30%),
    linear-gradient(135deg, #10323d 0%, #1f6b78 58%, #6aa6a3 100%);
  color: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.hero__content {
  max-width: 650px;
}

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

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 6vw, 4.85rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.85rem;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.14rem;
  letter-spacing: 0;
}

.lead {
  max-width: 540px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero__media {
  min-height: 240px;
  position: relative;
  display: grid;
  place-items: center;
}

.parcel {
  width: min(270px, 72vw);
  aspect-ratio: 1.12;
  position: relative;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 43%, rgba(96, 60, 28, 0.26) 43% 57%, transparent 57%),
    linear-gradient(135deg, #d49a57, #b97334);
  box-shadow: 0 26px 55px rgba(0, 0, 0, 0.26);
  transform: rotate(-4deg);
}

.parcel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 46%);
}

.parcel__tape {
  position: absolute;
  inset: 0 auto 0 44%;
  width: 15%;
  background: rgba(255, 219, 128, 0.65);
}

.parcel__label {
  position: absolute;
  right: 22px;
  top: 38px;
  width: 86px;
  height: 54px;
  border-radius: 5px;
  background: #fff;
  box-shadow: inset 0 -12px 0 #e7edf2;
}

.spark {
  position: absolute;
  width: 88px;
  height: 88px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
}

.spark--one {
  left: 24px;
  top: 16px;
}

.spark--two {
  right: 4px;
  bottom: 20px;
}

.panel,
.dashboard {
  margin-top: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  display: grid;
  grid-template-columns: 0.78fr 1fr;
  gap: 26px;
  padding: clamp(22px, 4vw, 36px);
}

.panel__header p,
.welcome p,
.service-card p,
.task-form p,
.empty-state p {
  color: var(--muted);
  line-height: 1.65;
}

.form,
.task-form {
  display: grid;
  gap: 16px;
}

label,
.rating-group {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

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

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(20, 106, 124, 0.14);
}

.form-note {
  min-height: 24px;
  margin: 0;
  color: var(--success);
  font-weight: 700;
}

.dashboard {
  padding: clamp(18px, 3vw, 28px);
}

.is-hidden {
  display: none;
}

.welcome {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.button-secondary {
  background: #e9f1f4;
  color: var(--brand-dark);
}

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

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.service-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
}

.service-card p {
  flex: 1;
}

.service-card__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 50%;
  background: #fff;
  color: var(--brand);
  font-weight: 900;
}

.workspace {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.empty-state {
  min-height: 210px;
  display: grid;
  place-content: center;
  text-align: center;
}

.rating-group {
  grid-template-columns: repeat(5, minmax(70px, 1fr));
  border: 0;
  padding: 0;
}

.rating-group legend {
  grid-column: 1 / -1;
  margin-bottom: 8px;
  font-weight: 800;
}

.rating-group label {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

[dir="rtl"] .hero__content,
[dir="rtl"] .panel__header,
[dir="rtl"] .task-form,
[dir="rtl"] .service-card,
[dir="rtl"] .empty-state,
[dir="rtl"] .welcome {
  text-align: right;
}

[dir="rtl"] .service-card {
  align-items: flex-start;
}

[dir="rtl"] .language-picker select {
  padding: 9px 12px 9px 36px;
}

@media (max-width: 820px) {
  .topbar {
    display: grid;
  }

  .language-picker {
    width: 100%;
  }

  .hero,
  .panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero__media {
    order: -1;
  }

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

  .welcome {
    display: grid;
  }

  .button-secondary {
    width: 100%;
  }

  .rating-group {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 10px;
  }

  .hero,
  .panel,
  .dashboard,
  .workspace {
    border-radius: 7px;
  }

  .button-row button,
  .button-row .amazon-link {
    width: 100%;
  }
}
