/*
 * Axio AWS Technical Debt — Phase A
 * File: assets/css/technical-debt-aws-phase-a.css
 */

/* --------------------------------------------------
   Base styles
-------------------------------------------------- */

.td-aws-page {
  --aws-ink: #102b59;
  --aws-text: #405a83;
  --aws-muted: #667da2;
  --aws-blue: #0877f9;
  --aws-border: #d8e5f4;

  max-width: 1500px;
  margin: 0 auto;
  color: var(--aws-text);
  font-size: 14px;
  line-height: 1.45;
}

.td-aws-page * {
  box-sizing: border-box;
}

.td-aws-page h1,
.td-aws-page h2,
.td-aws-page strong {
  color: var(--aws-ink);
}

.td-aws-page h1 {
  margin: 8px 0 0;
  font-size: clamp(2.1rem, 3vw, 2.8rem);
  font-weight: 780;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.td-aws-page h2 {
  margin: 0 0 2px;
  font-size: 1.25rem;
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.td-aws-page p {
  margin: 0 0 8px;
}

.td-aws-page code {
  color: #17396c;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.td-aws-page ul {
  margin: 5px 0 0;
  padding-left: 19px;
}

.td-aws-page li {
  margin: 2px 0;
}

/* --------------------------------------------------
   Breadcrumb and page header
-------------------------------------------------- */

.td-aws-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 14px;
  color: #62799b;
  font-size: 12px;
}

.td-aws-home {
  color: var(--aws-blue);
  font-size: 17px;
}

.td-aws-breadcrumb strong {
  font-weight: 600;
}

.td-aws-header {
  margin-bottom: 18px;
}

.td-aws-subtitle {
  margin: 2px 0 9px !important;
  color: #687da0;
  font-size: clamp(1.3rem, 1.8vw, 1.65rem);
  font-weight: 720;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.td-aws-header > p:last-child {
  max-width: 1050px;
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.48;
}

/* --------------------------------------------------
   Summary cards
-------------------------------------------------- */

.td-aws-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0 20px;
}

.td-aws-summary-card {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  min-height: 104px;
  padding: 13px;
  border: 1px solid var(--aws-border);
  border-radius: 8px;
}

.td-aws-summary-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 15px;
}

.td-aws-summary-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.td-aws-summary-icon {
  display: grid;
  flex: 0 0 58px;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  font-size: 27px;
  font-weight: 700;
}

.td-aws-green {
  border-color: #d4f4e5;
  background: linear-gradient(110deg, #f0fff8, #fff);
}

.td-aws-green .td-aws-summary-icon {
  color: #08a86a;
  background: #d9f8e9;
}

.td-aws-purple {
  border-color: #e8dcff;
  background: linear-gradient(110deg, #faf5ff, #fff);
}

.td-aws-purple .td-aws-summary-icon {
  color: #7c3aed;
  background: #eee2ff;
}

.td-aws-amber {
  border-color: #ffe9bf;
  background: linear-gradient(110deg, #fffaf0, #fff);
}

.td-aws-amber .td-aws-summary-icon {
  color: #e99a00;
  background: #fff0cf;
}

.td-aws-blue {
  border-color: #d9eaff;
  background: linear-gradient(110deg, #f1f8ff, #fff);
}

.td-aws-blue .td-aws-summary-icon {
  color: #0877f9;
  background: #e0efff;
}

/* --------------------------------------------------
   Sections and panels
-------------------------------------------------- */

.td-aws-section {
  margin: 0 0 19px;
}

.td-aws-section > p {
  margin-bottom: 8px;
  font-size: 15px;
}

.td-aws-panel {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--aws-border);
  border-radius: 7px;
  background: linear-gradient(135deg, #f4f9ff, #fff);
}

.td-aws-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 18px;
}

/* --------------------------------------------------
   Prerequisites and IAM permissions
-------------------------------------------------- */

.td-aws-iam {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 102px;
}

.td-aws-wordmark {
  flex: 0 0 90px;
  color: #182b4a;
  font-size: 32px;
  font-weight: 750;
  letter-spacing: -2px;
  text-align: center;
}

.td-aws-wordmark span {
  display: block;
  margin-top: -15px;
  color: #f59e0b;
  font-size: 43px;
  line-height: 0.6;
  transform: scaleX(1.3);
}

.td-aws-iam ul {
  margin: 0;
}

.td-aws-iam li {
  font-size: 13px;
}

.td-aws-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 102px;
  border-color: #ffe6b5;
  background: linear-gradient(120deg, #fffaf0, #fff);
}

.td-aws-warning-icon {
  display: grid;
  flex: 0 0 27px;
  place-items: center;
  height: 27px;
  border-radius: 50%;
  color: #fff;
  background: #f59e0b;
  font-weight: 800;
}

.td-aws-warning strong {
  display: block;
  margin: 1px 0 4px; 
  font-size: 15px;
}

.td-aws-warning li {
  font-size: 15px;
}

/* --------------------------------------------------
   API table
-------------------------------------------------- */

.td-aws-table-wrap {
  overflow-x: auto;
  border: 1px solid #d4e0ee;
  border-radius: 6px;
}

.td-aws-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.35;
}

.td-aws-table thead {
  background: #edf3f9;
}

.td-aws-table th {
  padding: 7px 10px;
  border-bottom: 1px solid #d4e0ee;
  color: var(--aws-ink);
  font-weight: 750;
  text-align: left;
}

.td-aws-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #dce6f0;
  vertical-align: top;
}

.td-aws-table tr:last-child td {
  border-bottom: 0;
}

.td-aws-table th + th,
.td-aws-table td + td {
  border-left: 1px solid #dce6f0;
}

.td-aws-table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.td-aws-method {
  display: inline-block;
  min-width: 40px;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.td-aws-post {
  color: #0877f9;
  background: #e1efff;
}

.td-aws-get {
  color: #079568;
  background: #dff8ed;
}

/* --------------------------------------------------
   Request body and detail grid
-------------------------------------------------- */

.td-aws-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: start;
  gap: 22px;
}

.td-aws-code {
  position: relative;
  border: 1px solid #dce8f7;
  border-radius: 6px;
  background: linear-gradient(120deg, #f4f9ff, #fff);
}

.td-aws-code pre {
  margin: 0;
  padding: 14px;
  overflow-wrap: anywhere;
  color: #15396e;
  font-size: 12px;
  white-space: pre-wrap;
}

.td-aws-code-label {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  color: #45617f;
  background: #eaf1f8;
  font-size: 15px;
}

.td-aws-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 11px 13px;
  border: 1px solid #d7eaff;
  border-radius: 6px;
  background: #f1f8ff;
}

.td-aws-info > span {
  display: grid;
  flex: 0 0 24px;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: var(--aws-blue);
  font-weight: 800;
}

.td-aws-info p {
  margin: 0;
  font-size: 15px;
}

/* --------------------------------------------------
   Technical debt source panel
-------------------------------------------------- */

.td-aws-source-panel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.td-aws-source-icon {
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--aws-blue);
  background: #e2f0ff;
  font-size: 21px;
}

.td-aws-source-panel p {
  margin: 3px 0 0;
  font-size: 15px;
}

/* --------------------------------------------------
   Assessment steps
-------------------------------------------------- */

.td-aws-assess-list ol {
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.td-aws-assess-list li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin: 0 0 10px;
  list-style: none;
}

.td-aws-assess-list li::before {
  content: none !important;
  display: none !important;
}

.td-aws-assess-list li > span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  color: #fff;
  background: var(--aws-blue);
  font-weight: 750;
}

.td-aws-assess-list li p {
  margin: 2px 0 0;
  font-size: 15px;
  line-height: 1.5;
}

/* --------------------------------------------------
   Limits
-------------------------------------------------- */

.td-aws-limits h2 {
  display: flex;
  align-items: center;
  gap: 9px;
}

.td-aws-limits-icon {
  color: var(--aws-blue);
  font-size: 22px;
}

.td-aws-limits .td-aws-panel {
  padding: 12px 15px;
}

.td-aws-limits li {
  margin: 4px 0;
  font-size: 15px;
}

/* --------------------------------------------------
   Responsive layout
-------------------------------------------------- */

@media (max-width: 1100px) {
  .td-aws-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .td-aws-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .td-aws-page h1 {
    font-size: 2rem;
  }

  .td-aws-summary,
  .td-aws-two-col {
    grid-template-columns: 1fr;
  }

  .td-aws-iam {
    gap: 15px;
  }

  .td-aws-table {
    min-width: 760px;
  }
}
